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
Ray Milkey
2015-12-18 09:27:03 -0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
676249ca1a4724f06b4781aedee490dbbbcfc20f
676249ca
1 parent
0fce0404
Fix Sonar critical flagged bugs
Change-Id: I60e9f72a1a66f65366d7dbc5335922e75097c9f3
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
38 additions
and
13 deletions
core/net/src/main/java/org/onosproject/app/impl/ApplicationManager.java
drivers/src/main/java/org/onosproject/driver/handshaker/OFOpticalSwitch13.java
drivers/src/main/java/org/onosproject/driver/handshaker/OfOpticalSwitchImplLinc13.java
drivers/src/main/java/org/onosproject/driver/netconf/XmlConfigParser.java
incubator/rpc-grpc/src/main/java/org/onosproject/incubator/rpc/grpc/GrpcDeviceUtils.java
protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/RouteDistinguisher.java
protocols/ovsdb/api/src/main/java/org/onosproject/ovsdb/controller/driver/DefaultOvsdbClient.java
protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/utils/ConditionUtil.java
utils/misc/src/main/java/org/onlab/packet/IGMP.java
utils/misc/src/main/java/org/onlab/util/BoundedThreadPool.java
utils/netty/src/main/java/org/onlab/netty/MessageDecoder.java
core/net/src/main/java/org/onosproject/app/impl/ApplicationManager.java
View file @
676249c
...
...
@@ -276,6 +276,7 @@ public class ApplicationManager
}
// Invokes the specified function, if not null.
@java
.
lang
.
SuppressWarnings
(
"squid:S1217"
)
// We really do mean to call run()
private
void
invokeHook
(
Runnable
hook
,
ApplicationId
appId
)
{
if
(
hook
!=
null
)
{
try
{
...
...
drivers/src/main/java/org/onosproject/driver/handshaker/OFOpticalSwitch13.java
View file @
676249c
...
...
@@ -70,9 +70,7 @@ public class OFOpticalSwitch13 extends AbstractOpenFlowSwitch implements OpenFlo
try
{
sendHandshakeOFExperimenterPortDescRequest
();
}
catch
(
IOException
e
)
{
log
.
error
(
"Failed to send handshaker message OFExperimenterPortDescRequestfor sw {}, {}"
,
getStringId
(),
e
.
getMessage
());
e
.
printStackTrace
();
log
.
error
(
"Failed to send handshaker message OFExperimenterPortDescRequestfor sw {}"
,
e
);
}
}
...
...
drivers/src/main/java/org/onosproject/driver/handshaker/OfOpticalSwitchImplLinc13.java
View file @
676249c
...
...
@@ -96,8 +96,7 @@ public class OfOpticalSwitchImplLinc13
sendHandshakeOFExperimenterPortDescRequest
();
}
catch
(
IOException
e
)
{
log
.
error
(
"LINC-OE exception while sending experimenter port desc:"
,
e
.
getMessage
());
e
.
printStackTrace
();
e
);
}
}
...
...
drivers/src/main/java/org/onosproject/driver/netconf/XmlConfigParser.java
View file @
676249c
...
...
@@ -111,7 +111,7 @@ final class XmlConfigParser {
try
{
editcfg
.
save
(
stringWriter
);
}
catch
(
ConfigurationException
e
)
{
e
.
printStackTrace
(
);
log
.
error
(
"createControllersConfig()"
,
e
);
}
String
s
=
stringWriter
.
toString
()
.
replaceAll
(
"<controller>"
,
...
...
incubator/rpc-grpc/src/main/java/org/onosproject/incubator/rpc/grpc/GrpcDeviceUtils.java
View file @
676249c
...
...
@@ -65,6 +65,7 @@ public final class GrpcDeviceUtils {
return
MastershipRole
.
STANDBY
;
case
UNRECOGNIZED:
log
.
warn
(
"Unrecognized MastershipRole gRPC message: {}"
,
role
);
return
MastershipRole
.
NONE
;
default
:
return
MastershipRole
.
NONE
;
}
...
...
protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/RouteDistinguisher.java
View file @
676249c
...
...
@@ -71,9 +71,32 @@ public class RouteDistinguisher implements Comparable<RouteDistinguisher> {
}
@Override
public
boolean
equals
(
Object
obj
)
{
if
(
this
==
obj
)
{
return
true
;
}
if
(
obj
instanceof
RouteDistinguisher
)
{
RouteDistinguisher
that
=
(
RouteDistinguisher
)
obj
;
if
(
this
.
routeDistinguisher
==
that
.
routeDistinguisher
)
{
return
true
;
}
}
return
false
;
}
@Override
public
int
hashCode
()
{
return
Long
.
hashCode
(
routeDistinguisher
);
}
@Override
public
String
toString
()
{
return
MoreObjects
.
toStringHelper
(
getClass
())
.
add
(
"routeDistinguisher"
,
routeDistinguisher
)
.
toString
();
}
}
\ No newline at end of file
}
...
...
protocols/ovsdb/api/src/main/java/org/onosproject/ovsdb/controller/driver/DefaultOvsdbClient.java
View file @
676249c
...
...
@@ -802,7 +802,7 @@ public class DefaultOvsdbClient
operations
.
add
(
portInsert
);
// update the bridge table
Condition
condition
=
ConditionUtil
.
equals
(
"_uuid"
,
UUID
.
uuid
(
bridgeUuid
));
Condition
condition
=
ConditionUtil
.
isEqual
(
"_uuid"
,
UUID
.
uuid
(
bridgeUuid
));
Mutation
mutation
=
MutationUtil
.
insert
(
"ports"
,
UUID
.
uuid
(
"Port"
));
List
<
Condition
>
conditions
=
new
ArrayList
<>(
Arrays
.
asList
(
condition
));
List
<
Mutation
>
mutations
=
new
ArrayList
<>(
Arrays
.
asList
(
mutation
));
...
...
@@ -875,7 +875,7 @@ public class DefaultOvsdbClient
}
List
<
Condition
>
conditions
=
Lists
.
newArrayList
();
Condition
condition
=
ConditionUtil
.
equals
(
childColumnName
,
UUID
.
uuid
(
childUuid
));
Condition
condition
=
ConditionUtil
.
isEqual
(
childColumnName
,
UUID
.
uuid
(
childUuid
));
conditions
.
add
(
condition
);
Delete
del
=
new
Delete
(
childTableSchema
,
conditions
);
operations
.
add
(
del
);
...
...
@@ -898,7 +898,7 @@ public class DefaultOvsdbClient
TableSchema
tableSchema
=
dbSchema
.
getTableSchema
(
tableName
);
List
<
Condition
>
conditions
=
Lists
.
newArrayList
();
Condition
condition
=
ConditionUtil
.
equals
(
columnName
,
UUID
.
uuid
(
uuid
));
Condition
condition
=
ConditionUtil
.
isEqual
(
columnName
,
UUID
.
uuid
(
uuid
));
conditions
.
add
(
condition
);
Update
update
=
new
Update
(
tableSchema
,
row
,
conditions
);
...
...
@@ -944,7 +944,7 @@ public class DefaultOvsdbClient
mutations
.
add
(
mutation
);
List
<
Condition
>
conditions
=
Lists
.
newArrayList
();
Condition
condition
=
ConditionUtil
.
equals
(
"_uuid"
,
Condition
condition
=
ConditionUtil
.
isEqual
(
"_uuid"
,
UUID
.
uuid
(
parentUuid
));
conditions
.
add
(
condition
);
...
...
protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/utils/ConditionUtil.java
View file @
676249c
...
...
@@ -37,7 +37,7 @@ public final class ConditionUtil {
* @param data column value
* @return Condition
*/
public
static
Condition
equals
(
String
columnName
,
Object
data
)
{
public
static
Condition
isEqual
(
String
columnName
,
Object
data
)
{
Object
value
=
TransValueUtil
.
getFormatData
(
data
);
return
new
Condition
(
columnName
,
Function
.
EQUALS
,
value
);
}
...
...
utils/misc/src/main/java/org/onlab/packet/IGMP.java
View file @
676249c
...
...
@@ -156,6 +156,7 @@ public class IGMP extends BasePacket {
*
* @return the serialized IGMP message
*/
@java
.
lang
.
SuppressWarnings
(
"squid:S128"
)
// suppress switch fall through warning
@Override
public
byte
[]
serialize
()
{
byte
[]
data
=
new
byte
[
8915
];
...
...
utils/misc/src/main/java/org/onlab/util/BoundedThreadPool.java
View file @
676249c
...
...
@@ -137,6 +137,7 @@ public final class BoundedThreadPool extends ThreadPoolExecutor {
* Feedback policy that delays the caller's thread until the executor's work
* queue falls below a threshold, then runs the job on the caller's thread.
*/
@java
.
lang
.
SuppressWarnings
(
"squid:S1217"
)
// We really do mean to call run()
private
static
final
class
CallerFeedbackPolicy
implements
RejectedExecutionHandler
{
private
final
BlockingBoolean
underLoad
=
new
BlockingBoolean
(
false
);
...
...
@@ -173,4 +174,4 @@ public final class BoundedThreadPool extends ThreadPoolExecutor {
}
}
}
}
\ No newline at end of file
}
...
...
utils/netty/src/main/java/org/onlab/netty/MessageDecoder.java
View file @
676249c
...
...
@@ -54,6 +54,7 @@ public class MessageDecoder extends ReplayingDecoder<DecoderState> {
}
@Override
@java
.
lang
.
SuppressWarnings
(
"squid:S128"
)
// suppress switch fall through warning
protected
void
decode
(
ChannelHandlerContext
context
,
ByteBuf
buffer
,
...
...
Please
register
or
login
to post a comment