Merge "Fixed onos.py to use new startup script."
diff --git a/conf/checkstyle/sun_checks.xml b/conf/checkstyle/sun_checks.xml
index e9bd3ea..9ab4e94 100644
--- a/conf/checkstyle/sun_checks.xml
+++ b/conf/checkstyle/sun_checks.xml
@@ -31,6 +31,17 @@
-->
+
+<!--
+ The default severity setting in checkstyle is 'error', so some
+ of the rules below are configured to change the severity to
+ 'warning'. Over time, these 'warning' settings should be
+ removed as more of the ONOS source code is modified to
+ follow the recommended rules.
+-->
+
+
+
<module name="Checker">
<!--
If you set the basedir property below, then all reported file
@@ -42,7 +53,7 @@
<!-- Checks that a package-info.java file exists for each package. -->
<!-- See http://checkstyle.sf.net/config_javadoc.html#JavadocPackage -->
<!-- ONOS does not currently supply package level Javadoc information
- in package-info files -->
+ in package-info files -->
<!-- <module name="JavadocPackage"/> -->
<!-- Checks whether files end with a new line. -->
@@ -55,7 +66,9 @@
<!-- Checks for Size Violations. -->
<!-- See http://checkstyle.sf.net/config_sizes.html -->
- <module name="FileLength"/>
+ <module name="FileLength">
+ <property name="severity" value="warning"/>
+ </module>
<!-- Checks for whitespace -->
<!-- See http://checkstyle.sf.net/config_whitespace.html -->
@@ -68,6 +81,7 @@
<property name="minimum" value="0"/>
<property name="maximum" value="0"/>
<property name="message" value="Line has trailing spaces."/>
+ <property name="severity" value="warning"/>
</module>
<!-- Checks for Headers -->
@@ -81,14 +95,21 @@
<!-- Checks for Javadoc comments. -->
<!-- See http://checkstyle.sf.net/config_javadoc.html -->
- <module name="JavadocMethod"/>
- <module name="JavadocType"/>
+ <module name="JavadocMethod">
+ <property name="severity" value="warning"/>
+ </module>
+ <module name="JavadocType">
+ <property name="severity" value="warning"/>
+ </module>
<module name="JavadocVariable">
<!-- Suppress check for private member Javadocs.
Possibly revist fixing these. -->
<property name="scope" value="public"/>
+ <property name="severity" value="warning"/>
</module>
- <module name="JavadocStyle"/>
+ <module name="JavadocStyle">
+ <property name="severity" value="warning"/>
+ </module>
<!-- Checks for Naming Conventions. -->
@@ -97,16 +118,33 @@
<!-- ONOS allows the name "log" for static final Loggers -->
<property name="format"
value="^log$|^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$"/>
+ <property name="severity" value="warning"/>
</module>
<module name="LocalFinalVariableName"/>
- <module name="LocalVariableName"/>
- <module name="MemberName"/>
- <module name="MethodName"/>
- <module name="PackageName"/>
- <module name="ParameterName"/>
- <module name="StaticVariableName"/>
- <module name="TypeName"/>
+ <module name="LocalVariableName">
+ <property name="severity" value="warning"/>
+ </module>
+
+ <module name="MemberName">
+ <property name="severity" value="warning"/>
+ </module>
+
+ <module name="MethodName">
+ <property name="severity" value="warning"/>
+ </module>
+
+ <module name="PackageName"/>
+
+ <module name="ParameterName">
+ <property name="severity" value="warning"/>
+ </module>
+
+ <module name="StaticVariableName">
+ <property name="severity" value="warning"/>
+ </module>
+
+ <module name="TypeName"/>
<!-- Checks for imports -->
<!-- See http://checkstyle.sf.net/config_import.html -->
@@ -123,29 +161,55 @@
<!-- ONOS standard usage is 80 columns, but we allow up
to 120 to not break the build. -->
<property name="max" value="120"/>
+ <property name="severity" value="warning"/>
</module>
- <module name="MethodLength"/>
- <module name="ParameterNumber"/>
+ <module name="MethodLength">
+ <property name="severity" value="warning"/>
+ </module>
+
+ <module name="ParameterNumber">
+ <property name="severity" value="warning"/>
+ </module>
<!-- Checks for whitespace -->
<!-- See http://checkstyle.sf.net/config_whitespace.html -->
- <module name="EmptyForIteratorPad"/>
+ <module name="EmptyForIteratorPad">
+ <property name="severity" value="warning"/>
+ </module>
+
<module name="GenericWhitespace"/>
<module name="MethodParamPad"/>
- <module name="NoWhitespaceAfter"/>
- <module name="NoWhitespaceBefore"/>
+
+ <module name="NoWhitespaceAfter">
+ <property name="severity" value="warning"/>
+ </module>
+
+ <module name="NoWhitespaceBefore">
+ <property name="severity" value="warning"/>
+ </module>
+
<!-- Disabled for ONOS. Default rules specify undesired behavior for the '?' operator -->
<!-- <module name="OperatorWrap"/> -->
<module name="ParenPad"/>
<module name="TypecastParenPad"/>
- <module name="WhitespaceAfter"/>
- <module name="WhitespaceAround"/>
+
+ <module name="WhitespaceAfter">
+ <property name="severity" value="warning"/>
+ </module>
+
+ <module name="WhitespaceAround">
+ <property name="severity" value="warning"/>
+ </module>
+
<!-- Modifier Checks -->
<!-- See http://checkstyle.sf.net/config_modifiers.html -->
- <module name="ModifierOrder"/>
+ <module name="ModifierOrder">
+ <property name="severity" value="warning"/>
+ </module>
+
<!-- Disabled for ONOS to allow use of public -->
<!-- modifiers in interfaces. -->
<!-- <module name="RedundantModifier"/> -->
@@ -158,43 +222,83 @@
<property name="allowInSwitchCase" value="true"/>
<property name="severity" value="warning"/>
</module>
- <module name="EmptyBlock"/>
- <module name="LeftCurly"/>
- <module name="NeedBraces"/>
- <module name="RightCurly"/>
+ <module name="EmptyBlock">
+ <property name="severity" value="warning"/>
+ </module>
+ <module name="LeftCurly"/>
+
+ <module name="NeedBraces">
+ <property name="severity" value="warning"/>
+ </module>
+
+ <module name="RightCurly"/>
<!-- Checks for common coding problems -->
<!-- See http://checkstyle.sf.net/config_coding.html -->
<!-- ONOS allows conditional operators -->
<!-- <module name="AvoidInlineConditionals"/> -->
- <module name="EmptyStatement"/>
+ <module name="EmptyStatement">
+ <property name="severity" value="warning"/>
+ </module>
+
<module name="EqualsHashCode"/>
- <module name="HiddenField"/>
+
+ <module name="HiddenField">
+ <property name="severity" value="warning"/>
+ </module>
+
<module name="IllegalInstantiation"/>
- <module name="InnerAssignment"/>
+
+ <module name="InnerAssignment">
+ <property name="severity" value="warning"/>
+ </module>
+
<!-- Many violations of this rule present, revist in a
subsequent round of cleanups -->
<!-- <module name="MagicNumber"/> -->
- <module name="MissingSwitchDefault"/>
- <module name="RedundantThrows"/>
- <module name="SimplifyBooleanExpression"/>
- <module name="SimplifyBooleanReturn"/>
+ <module name="MissingSwitchDefault">
+ <property name="severity" value="warning"/>
+ </module>
+
+ <module name="RedundantThrows">
+ <property name="severity" value="warning"/>
+ </module>
+
+ <module name="SimplifyBooleanExpression">
+ <property name="severity" value="warning"/>
+ </module>
+
+ <module name="SimplifyBooleanReturn">
+ <property name="severity" value="warning"/>
+ </module>
+
<!-- Checks for class design -->
<!-- See http://checkstyle.sf.net/config_design.html -->
<!-- ONOS produces many warnings of this type.
Fixing all of these is outside the scope of the current cleanup. -->
<!-- <module name="DesignForExtension"/> -->
- <module name="FinalClass"/>
- <module name="HideUtilityClassConstructor"/>
+ <module name="FinalClass">
+ <property name="severity" value="warning"/>
+ </module>
+
+ <module name="HideUtilityClassConstructor">
+ <property name="severity" value="warning"/>
+ </module>
+
<module name="InterfaceIsType"/>
- <module name="VisibilityModifier"/>
+
+ <module name="VisibilityModifier">
+ <property name="severity" value="warning"/>
+ </module>
+
<!-- Miscellaneous other checks. -->
<!-- See http://checkstyle.sf.net/config_misc.html -->
<module name="ArrayTypeStyle"/>
+
<!-- Many violations of this rule currently, too many to fix
in the current cleanup. -->
<!-- <module name="FinalParameters"/> -->
@@ -202,6 +306,6 @@
<!-- <module name="TodoComment"/> -->
<module name="UpperEll"/>
- </module>
+ </module>
-</module>
+ </module>
diff --git a/install-oracle-java.sh b/install-oracle-java.sh
index bbefbee..b4eed0a 100755
--- a/install-oracle-java.sh
+++ b/install-oracle-java.sh
@@ -43,8 +43,19 @@
set -e
sudo apt-get update
-sudo apt-get install ${SILENT} oracle-java7-set-default
-
+{
+ sudo apt-get install ${SILENT} oracle-java7-set-default
+} || {
+ { set +x; } 2>/dev/null
+ echo
+ echo "Installing Oracle Java failed."
+ echo "This script cannot be used if ubuntu release has reached end of life."
+ echo "Check if your ubuntu release is still supported."
+ echo " https://wiki.ubuntu.com/Releases"
+ echo
+ lsb_release -a
+ exit 1
+}
{ set +x; } 2>/dev/null
echo
echo "Done. You may need to relogin for the environment variable change to take effect."
diff --git a/pom.xml b/pom.xml
index c6b57dd..0c3286c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -41,27 +41,27 @@
<build>
<plugins>
<plugin>
- <!-- Note: the checkstyle configuration is also in the reporting section -->
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
- <version>${checkstyle-plugin.version}</version>
- <configuration>
- <configLocation>conf/checkstyle/sun_checks.xml</configLocation>
- <suppressionsLocation>
- ${basedir}/conf/checkstyle/onos_suppressions.xml
- </suppressionsLocation>
- <failsOnError>false</failsOnError>
- </configuration>
- <executions>
- <execution>
- <id>validate-checkstyle</id>
- <phase>compile</phase>
- <goals>
- <!-- Uncomment this goal to make the build fail on Checkstyle errors -->
- <!--<goal>check</goal>-->
- </goals>
- </execution>
- </executions>
+ <!-- Note: the checkstyle configuration is also in the reporting section -->
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <version>${checkstyle-plugin.version}</version>
+ <configuration>
+ <configLocation>conf/checkstyle/sun_checks.xml</configLocation>
+ <suppressionsLocation>
+ ${basedir}/conf/checkstyle/onos_suppressions.xml
+ </suppressionsLocation>
+ <failsOnError>false</failsOnError>
+ <logViolationsToConsole>true</logViolationsToConsole>
+ </configuration>
+ <executions>
+ <execution>
+ <id>validate-checkstyle</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ </execution>
+ </executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -194,12 +194,12 @@
</plugin>
-->
<plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <configuration>
- <descriptorRefs>
- <descriptorRef>jar-with-dependencies</descriptorRef>
- </descriptorRefs>
- </configuration>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <configuration>
+ <descriptorRefs>
+ <descriptorRef>jar-with-dependencies</descriptorRef>
+ </descriptorRefs>
+ </configuration>
</plugin>
<plugin>
<!-- Using groovy script to set maven property ${hostname}.
@@ -271,22 +271,22 @@
<effort>${findbugs.effort}</effort>
<excludeFilterFile>${findbugs.excludeFilterFile}</excludeFilterFile>
</configuration>
- <executions>
- <execution>
- <id>validate-findbugs</id>
- <phase>compile</phase>
- <goals>
- <!-- Uncomment this goal to make the build fail on findbugs errors -->
- <!--<goal>check</goal>-->
- </goals>
- </execution>
- </executions>
+ <executions>
+ <execution>
+ <id>validate-findbugs</id>
+ <phase>compile</phase>
+ <goals>
+ <!-- Uncomment this goal to make the build fail on findbugs errors -->
+ <!--<goal>check</goal>-->
+ </goals>
+ </execution>
+ </executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.1</version>
- <configuration>
+ <configuration>
<!--
Note: Exclusion definition exists in multiple places.
- In file ${findbugs.excludeFilterFile} defined at top of pom.xml
@@ -294,26 +294,26 @@
- maven-pmd-plugin configuration in pom.xml
(under build and reporting)
-->
- <excludes>
+ <excludes>
<exclude>**/datastore/serializers/**</exclude>
- <exclude>**/edu/stanford/**</exclude>
- <exclude>**/net/floodlightcontroller/**</exclude>
- <exclude>**/org/openflow/**</exclude>
- </excludes>
- <rulesets>
- <ruleset>${basedir}/conf/pmd/onos_ruleset.xml</ruleset>
- </rulesets>
- </configuration>
- <executions>
- <execution>
- <id>validate-pmd</id>
- <phase>compile</phase>
- <goals>
- <!-- Uncomment this goal to make the build fail on pmd errors -->
- <!--<goal>check</goal>-->
- </goals>
- </execution>
- </executions>
+ <exclude>**/edu/stanford/**</exclude>
+ <exclude>**/net/floodlightcontroller/**</exclude>
+ <exclude>**/org/openflow/**</exclude>
+ </excludes>
+ <rulesets>
+ <ruleset>${basedir}/conf/pmd/onos_ruleset.xml</ruleset>
+ </rulesets>
+ </configuration>
+ <executions>
+ <execution>
+ <id>validate-pmd</id>
+ <phase>compile</phase>
+ <goals>
+ <!-- Uncomment this goal to make the build fail on pmd errors -->
+ <!--<goal>check</goal>-->
+ </goals>
+ </execution>
+ </executions>
</plugin>
</plugins>
<pluginManagement>
@@ -404,12 +404,12 @@
</configuration>
</plugin>
<plugin>
- <!-- Note: the checkstyle configuration is also in the build section -->
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
- <version>${checkstyle-plugin.version}</version>
- <configuration>
- <configLocation>conf/checkstyle/sun_checks.xml</configLocation>
+ <!-- Note: the checkstyle configuration is also in the build section -->
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <version>${checkstyle-plugin.version}</version>
+ <configuration>
+ <configLocation>conf/checkstyle/sun_checks.xml</configLocation>
<!--
Note: Exclusion definition exists in multiple places.
- In file ${findbugs.excludeFilterFile} defined at top of pom.xml
@@ -418,17 +418,17 @@
(under build and reporting)
-->
<excludes>**/datastore/serializers/**</excludes>
- <suppressionsLocation>
+ <suppressionsLocation>
${basedir}/conf/checkstyle/onos_suppressions.xml
</suppressionsLocation>
- </configuration>
- <reportSets>
- <reportSet>
- <reports>
- <report>checkstyle</report>
- </reports>
- </reportSet>
- </reportSets>
+ </configuration>
+ <reportSets>
+ <reportSet>
+ <reports>
+ <report>checkstyle</report>
+ </reports>
+ </reportSet>
+ </reportSets>
</plugin>
<!-- Note: the findbugs configuration is also in the build section -->
<plugin>
@@ -460,19 +460,19 @@
-->
<excludes>
<exclude>**/datastore/serializers/**</exclude>
- <exclude>**/edu/stanford/**</exclude>
- <exclude>**/net/floodlightcontroller/**</exclude>
- <exclude>**/org/openflow/**</exclude>
+ <exclude>**/edu/stanford/**</exclude>
+ <exclude>**/net/floodlightcontroller/**</exclude>
+ <exclude>**/org/openflow/**</exclude>
</excludes>
- <rulesets>
- <ruleset>${basedir}/conf/pmd/onos_ruleset.xml</ruleset>
- </rulesets>
+ <rulesets>
+ <ruleset>${basedir}/conf/pmd/onos_ruleset.xml</ruleset>
+ </rulesets>
</configuration>
</plugin>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jxr-plugin</artifactId>
- <version>2.4</version>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jxr-plugin</artifactId>
+ <version>2.4</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
diff --git a/ramcloud-build-scripts/build_jni_so.sh b/ramcloud-build-scripts/build_jni_so.sh
index e549e6a..bd4be1e 100755
--- a/ramcloud-build-scripts/build_jni_so.sh
+++ b/ramcloud-build-scripts/build_jni_so.sh
@@ -1,8 +1,22 @@
#!/bin/bash
+if [ -z "${JAVA_HOME}" ]; then
+ echo "JAVA_HOME not set"
+ OPENJDK=`java -version 2>&1 | grep OpenJDK`
+ if [ -z "${OPENJDK}" -a -d "/usr/lib/jvm/java-7-oracle" ]; then
+ JAVA_HOME=/usr/lib/jvm/java-7-oracle
+ else
+ JAVA_HOME=/usr/lib/jvm/default-java
+ fi
+ echo "Assuming JAVA_HOME=${JAVA_HOME}"
+fi
+
# fail on command error
set -e
+# echo back each command
+set -x
+
JAVA_HOME=${JAVA_HOME:-/usr/lib/jvm/java-7-oracle}
ONOS_HOME=${ONOS_HOME:-~/ONOS}
RAMCLOUD_HOME=${RAMCLOUD_HOME:-~/ramcloud}
diff --git a/src/main/java/net/onrc/onos/apps/bgproute/PatriciaTrie.java b/src/main/java/net/onrc/onos/apps/bgproute/PatriciaTrie.java
index 8225d7d..817e571 100644
--- a/src/main/java/net/onrc/onos/apps/bgproute/PatriciaTrie.java
+++ b/src/main/java/net/onrc/onos/apps/bgproute/PatriciaTrie.java
@@ -4,7 +4,7 @@
import java.util.NoSuchElementException;
public class PatriciaTrie<V> implements IPatriciaTrie<V> {
- private final byte maskBits[] = {(byte) 0x00, (byte) 0x80, (byte) 0xc0, (byte) 0xe0, (byte) 0xf0,
+ private final byte[] maskBits = {(byte) 0x00, (byte) 0x80, (byte) 0xc0, (byte) 0xe0, (byte) 0xf0,
(byte) 0xf8, (byte) 0xfc, (byte) 0xfe, (byte) 0xff};
private int maxPrefixLength;
diff --git a/src/main/java/net/onrc/onos/apps/bgproute/Ptree.java b/src/main/java/net/onrc/onos/apps/bgproute/Ptree.java
index 9a0400f..b56fa0c 100644
--- a/src/main/java/net/onrc/onos/apps/bgproute/Ptree.java
+++ b/src/main/java/net/onrc/onos/apps/bgproute/Ptree.java
@@ -15,7 +15,7 @@
private int maxKeyOctets;
//private int refCount;
private PtreeNode top;
- private byte maskBits[] = {(byte) 0x00, (byte) 0x80, (byte) 0xc0, (byte) 0xe0, (byte) 0xf0, (byte) 0xf8, (byte) 0xfc, (byte) 0xfe, (byte) 0xff};
+ private byte[] maskBits = {(byte) 0x00, (byte) 0x80, (byte) 0xc0, (byte) 0xe0, (byte) 0xf0, (byte) 0xf8, (byte) 0xfc, (byte) 0xfe, (byte) 0xff};
public Ptree(int max_key_bits) {
maxKeyBits = max_key_bits;
diff --git a/src/main/java/net/onrc/onos/apps/bgproute/PtreeNode.java b/src/main/java/net/onrc/onos/apps/bgproute/PtreeNode.java
index e1b4c55..c872a4e 100644
--- a/src/main/java/net/onrc/onos/apps/bgproute/PtreeNode.java
+++ b/src/main/java/net/onrc/onos/apps/bgproute/PtreeNode.java
@@ -8,7 +8,7 @@
public PtreeNode left;
public PtreeNode right;
- public byte key[];
+ public byte[] key;
public int keyBits;
public int refCount;
diff --git a/src/main/java/net/onrc/onos/apps/bgproute/PushedFlowMod.java b/src/main/java/net/onrc/onos/apps/bgproute/PushedFlowMod.java
index fc13cd3..eaee857 100644
--- a/src/main/java/net/onrc/onos/apps/bgproute/PushedFlowMod.java
+++ b/src/main/java/net/onrc/onos/apps/bgproute/PushedFlowMod.java
@@ -28,4 +28,4 @@
public OFFlowMod getFlowMod() {
return flowMod;
}
-}
\ No newline at end of file
+}
diff --git a/src/main/java/net/onrc/onos/core/datastore/IKVTable.java b/src/main/java/net/onrc/onos/core/datastore/IKVTable.java
index 2260ad0..95e0027 100644
--- a/src/main/java/net/onrc/onos/core/datastore/IKVTable.java
+++ b/src/main/java/net/onrc/onos/core/datastore/IKVTable.java
@@ -108,4 +108,4 @@
* @return entries in this table.
*/
public Iterable<IKVEntry> getAllEntries();
-}
\ No newline at end of file
+}
diff --git a/src/main/java/net/onrc/onos/core/datastore/IKVTableID.java b/src/main/java/net/onrc/onos/core/datastore/IKVTableID.java
index c736908..cee4b90 100644
--- a/src/main/java/net/onrc/onos/core/datastore/IKVTableID.java
+++ b/src/main/java/net/onrc/onos/core/datastore/IKVTableID.java
@@ -4,4 +4,4 @@
public String getTableName();
-}
\ No newline at end of file
+}
diff --git a/src/main/java/net/onrc/onos/core/datastore/IMultiObjectOperation.java b/src/main/java/net/onrc/onos/core/datastore/IMultiObjectOperation.java
index 898327f..07bdffb 100644
--- a/src/main/java/net/onrc/onos/core/datastore/IMultiObjectOperation.java
+++ b/src/main/java/net/onrc/onos/core/datastore/IMultiObjectOperation.java
@@ -6,4 +6,4 @@
public KVObject getObject();
-}
\ No newline at end of file
+}
diff --git a/src/main/java/net/onrc/onos/core/datastore/ramcloud/RCTableID.java b/src/main/java/net/onrc/onos/core/datastore/ramcloud/RCTableID.java
index 9882ce3..450f160 100644
--- a/src/main/java/net/onrc/onos/core/datastore/ramcloud/RCTableID.java
+++ b/src/main/java/net/onrc/onos/core/datastore/ramcloud/RCTableID.java
@@ -57,4 +57,4 @@
return Objects.equals(tableName, other.tableName)
&& Objects.equals(getTableID(), other.getTableID());
}
-}
\ No newline at end of file
+}
diff --git a/src/main/java/net/onrc/onos/core/intent/PathIntent.java b/src/main/java/net/onrc/onos/core/intent/PathIntent.java
index e541454..633fe8b 100644
--- a/src/main/java/net/onrc/onos/core/intent/PathIntent.java
+++ b/src/main/java/net/onrc/onos/core/intent/PathIntent.java
@@ -15,7 +15,7 @@
}
public static String createNextId(String currentId) {
- String parts[] = currentId.split("___");
+ String[] parts = currentId.split("___");
return String.format("%s___%d", parts[0], Long.valueOf(parts[1]) + 1);
}
diff --git a/src/main/java/net/onrc/onos/core/intent/runtime/PathCalcRuntime.java b/src/main/java/net/onrc/onos/core/intent/runtime/PathCalcRuntime.java
index c582fe1..234bea9 100644
--- a/src/main/java/net/onrc/onos/core/intent/runtime/PathCalcRuntime.java
+++ b/src/main/java/net/onrc/onos/core/intent/runtime/PathCalcRuntime.java
@@ -139,4 +139,4 @@
return pathIntentOpList;
}
-}
\ No newline at end of file
+}
diff --git a/src/main/java/net/onrc/onos/core/linkdiscovery/internal/LinkDiscoveryManager.java b/src/main/java/net/onrc/onos/core/linkdiscovery/internal/LinkDiscoveryManager.java
index a395ab6..59abceb 100644
--- a/src/main/java/net/onrc/onos/core/linkdiscovery/internal/LinkDiscoveryManager.java
+++ b/src/main/java/net/onrc/onos/core/linkdiscovery/internal/LinkDiscoveryManager.java
@@ -139,8 +139,8 @@
// periodically or in response to a recieved LLDP
private static final byte TLV_DIRECTION_TYPE = 0x73;
private static final short TLV_DIRECTION_LENGTH = 1; // 1 byte
- private static final byte TLV_DIRECTION_VALUE_FORWARD[] = {0x01};
- private static final byte TLV_DIRECTION_VALUE_REVERSE[] = {0x02};
+ private static final byte[] TLV_DIRECTION_VALUE_FORWARD = {0x01};
+ private static final byte[] TLV_DIRECTION_VALUE_REVERSE = {0x02};
private static final LLDPTLV forwardTLV
= new LLDPTLV().
setType(TLV_DIRECTION_TYPE).
diff --git a/src/main/java/net/onrc/onos/core/linkdiscovery/web/LinkDiscoveryWebRoutable.java b/src/main/java/net/onrc/onos/core/linkdiscovery/web/LinkDiscoveryWebRoutable.java
index 8d3831c..f78d43a 100644
--- a/src/main/java/net/onrc/onos/core/linkdiscovery/web/LinkDiscoveryWebRoutable.java
+++ b/src/main/java/net/onrc/onos/core/linkdiscovery/web/LinkDiscoveryWebRoutable.java
@@ -24,4 +24,4 @@
public String basePath() {
return "/wm/onos/linkdiscovery";
}
-}
\ No newline at end of file
+}
diff --git a/src/main/java/net/onrc/onos/core/linkdiscovery/web/LinkWithType.java b/src/main/java/net/onrc/onos/core/linkdiscovery/web/LinkWithType.java
index 733f28c..5271794 100644
--- a/src/main/java/net/onrc/onos/core/linkdiscovery/web/LinkWithType.java
+++ b/src/main/java/net/onrc/onos/core/linkdiscovery/web/LinkWithType.java
@@ -64,4 +64,4 @@
public Class<LinkWithType> handledType() {
return LinkWithType.class;
}
-}
\ No newline at end of file
+}
diff --git a/src/main/java/net/onrc/onos/core/packet/BasePacket.java b/src/main/java/net/onrc/onos/core/packet/BasePacket.java
index 4f4f478..a47fcfc 100644
--- a/src/main/java/net/onrc/onos/core/packet/BasePacket.java
+++ b/src/main/java/net/onrc/onos/core/packet/BasePacket.java
@@ -112,4 +112,4 @@
pkt.setParent(this.parent);
return pkt;
}
-}
\ No newline at end of file
+}
diff --git a/src/main/java/net/onrc/onos/core/topology/LinkEvent.java b/src/main/java/net/onrc/onos/core/topology/LinkEvent.java
index 7434ad9..bf81f34 100644
--- a/src/main/java/net/onrc/onos/core/topology/LinkEvent.java
+++ b/src/main/java/net/onrc/onos/core/topology/LinkEvent.java
@@ -97,4 +97,4 @@
return false;
return true;
}
-}
\ No newline at end of file
+}
diff --git a/src/main/java/net/onrc/onos/core/util/PerformanceMonitor.java b/src/main/java/net/onrc/onos/core/util/PerformanceMonitor.java
index b6cdd94..fa05536 100644
--- a/src/main/java/net/onrc/onos/core/util/PerformanceMonitor.java
+++ b/src/main/java/net/onrc/onos/core/util/PerformanceMonitor.java
@@ -256,7 +256,7 @@
theInstance.reportStep(tag);
}
- public static void main(String args[]) {
+ public static void main(String[] args) {
// test the measurement overhead
String tag;
for (int i = 0; i < 2; i++) {