Merge "Print error message when Oracle Java installation failed."
diff --git a/conf/checkstyle/sun_checks.xml b/conf/checkstyle/sun_checks.xml
index 533f906..9ab4e94 100644
--- a/conf/checkstyle/sun_checks.xml
+++ b/conf/checkstyle/sun_checks.xml
@@ -58,9 +58,7 @@
<!-- Checks whether files end with a new line. -->
<!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
- <module name="NewlineAtEndOfFile">
- <property name="severity" value="warning"/>
- </module>
+ <module name="NewlineAtEndOfFile"/>
<!-- Checks that property files contain the same keys. -->
<!-- See http://checkstyle.sf.net/config_misc.html#Translation -->
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/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/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/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
+}