Toggle navigation
Toggle navigation
This project
Loading...
Sign in
홍길동
/
onos
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
tom
2014-08-29 13:08:29 -0700
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
19bf4210e6a7b7721a3e75ae4218ed2e5109f702
19bf4210
1 parent
984d782e
Fixed some sonar-reported issues.
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
10 additions
and
11 deletions
net/api/src/main/java/org/onlab/onos/event/AbstractListenerRegistry.java
net/core/trivial/src/main/java/org/onlab/onos/event/impl/SimpleEventDispatcher.java
net/core/trivial/src/main/java/org/onlab/onos/net/trivial/impl/SimpleDeviceManager.java
utils/misc/src/main/java/org/onlab/graph/AdjacencyListsGraph.java
utils/misc/src/main/java/org/onlab/graph/BreadthFirstSearch.java
utils/misc/src/main/java/org/onlab/graph/Heap.java
net/api/src/main/java/org/onlab/onos/event/AbstractListenerRegistry.java
View file @
19bf421
...
...
@@ -45,7 +45,7 @@ public class AbstractListenerRegistry<E extends Event, L extends EventListener<E
for
(
L
listener
:
listeners
)
{
try
{
listener
.
event
(
event
);
}
catch
(
Throwable
error
)
{
}
catch
(
Exception
error
)
{
reportProblem
(
event
,
error
);
}
}
...
...
net/core/trivial/src/main/java/org/onlab/onos/event/impl/SimpleEventDispatcher.java
View file @
19bf421
...
...
@@ -82,7 +82,7 @@ public class SimpleEventDispatcher extends DefaultEventSinkRegistry
log
.
warn
(
"No sink registered for event class {}"
,
event
.
getClass
());
}
}
catch
(
Throwable
e
)
{
}
catch
(
Exception
e
)
{
log
.
warn
(
"Error encountered while dispatching event:"
,
e
);
}
}
...
...
net/core/trivial/src/main/java/org/onlab/onos/net/trivial/impl/SimpleDeviceManager.java
View file @
19bf421
...
...
@@ -141,7 +141,6 @@ public class SimpleDeviceManager
public
void
updatePorts
(
DeviceId
deviceId
,
List
<
PortDescription
>
portDescriptions
)
{
checkNotNull
(
deviceId
,
DEVICE_ID_NULL
);
checkNotNull
(
portDescriptions
,
"Port descriptions list cannot be null"
);
// FIXME: fix the interface to accept DeviceId separately
log
.
info
(
"Device {} ports updated: {}"
,
portDescriptions
);
List
<
DeviceEvent
>
events
=
store
.
updatePorts
(
deviceId
,
portDescriptions
);
for
(
DeviceEvent
event
:
events
)
{
...
...
utils/misc/src/main/java/org/onlab/graph/AdjacencyListsGraph.java
View file @
19bf421
...
...
@@ -22,8 +22,6 @@ public class AdjacencyListsGraph<V extends Vertex, E extends Edge<V>> implements
private
final
ImmutableSetMultimap
<
V
,
E
>
sources
;
private
final
ImmutableSetMultimap
<
V
,
E
>
destinations
;
private
final
Set
<
E
>
noEdges
=
ImmutableSet
.
of
();
/**
* Creates a graph comprising of the specified vertexes and edges.
*
...
...
utils/misc/src/main/java/org/onlab/graph/BreadthFirstSearch.java
View file @
19bf421
...
...
@@ -21,8 +21,8 @@ public class BreadthFirstSearch<V extends Vertex, E extends Edge<V>>
result
.
costs
.
put
(
src
,
0.0
);
frontier
.
add
(
src
);
search:
while
(!
frontier
.
isEmpty
())
{
boolean
reachedEnd
=
false
;
while
(!
reachedEnd
&&
!
frontier
.
isEmpty
())
{
// Prepare the next frontier.
Set
<
V
>
next
=
new
HashSet
<>();
...
...
@@ -40,10 +40,15 @@ public class BreadthFirstSearch<V extends Vertex, E extends Edge<V>>
true
);
// If we have reached our intended destination, bail.
if
(
nextVertex
.
equals
(
dst
))
{
break
search
;
reachedEnd
=
true
;
break
;
}
next
.
add
(
nextVertex
);
}
if
(
reachedEnd
)
{
break
;
}
}
}
...
...
utils/misc/src/main/java/org/onlab/graph/Heap.java
View file @
19bf421
...
...
@@ -25,9 +25,6 @@ import static com.google.common.base.Preconditions.checkNotNull;
*/
public
class
Heap
<
T
>
{
private
static
final
String
E_HEAP_READONLY
=
"Heap iterator is read-only"
;
private
static
final
String
E_HEAP_END
=
"Heap iterator reached end of heap"
;
private
final
List
<
T
>
data
;
private
final
Comparator
<
T
>
comparator
;
...
...
Please
register
or
login
to post a comment