Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
apollo
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
openSource
apollo
Commits
dc38354f
Commit
dc38354f
authored
Apr 20, 2017
by
Jason Song
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix coverity bug
parent
37788d86
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
NetworkInterfaceManager.java
...amework/foundation/internals/NetworkInterfaceManager.java
+12
-3
No files found.
apollo-core/src/main/java/com/ctrip/framework/foundation/internals/NetworkInterfaceManager.java
View file @
dc38354f
...
@@ -98,8 +98,12 @@ public enum NetworkInterfaceManager {
...
@@ -98,8 +98,12 @@ public enum NetworkInterfaceManager {
try
{
try
{
Enumeration
<
NetworkInterface
>
interfaces
=
NetworkInterface
.
getNetworkInterfaces
();
Enumeration
<
NetworkInterface
>
interfaces
=
NetworkInterface
.
getNetworkInterfaces
();
List
<
NetworkInterface
>
nis
=
interfaces
==
null
?
Collections
.<
NetworkInterface
>
emptyList
()
List
<
NetworkInterface
>
nis
;
:
Collections
.
list
(
NetworkInterface
.
getNetworkInterfaces
());
if
(
interfaces
==
null
)
{
nis
=
Collections
.
emptyList
();
}
else
{
nis
=
Collections
.
list
(
NetworkInterface
.
getNetworkInterfaces
());
}
List
<
InetAddress
>
addresses
=
new
ArrayList
<
InetAddress
>();
List
<
InetAddress
>
addresses
=
new
ArrayList
<
InetAddress
>();
InetAddress
local
=
null
;
InetAddress
local
=
null
;
...
@@ -113,9 +117,14 @@ public enum NetworkInterfaceManager {
...
@@ -113,9 +117,14 @@ public enum NetworkInterfaceManager {
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
// ignore
// ignore
}
}
m_local
=
local
;
if
(
local
!=
null
)
{
m_local
=
local
;
return
;
}
}
catch
(
SocketException
e
)
{
}
catch
(
SocketException
e
)
{
// ignore it
// ignore it
}
}
m_local
=
InetAddress
.
getLoopbackAddress
();
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment