Fixed some javadoc warning/errors.
Fixed NPE error in objective tracker.
Preparing for upgrade to Java 8 and Karaf 3.0.2.
diff --git a/core/net/src/main/java/org/onlab/onos/net/intent/impl/ObjectiveTracker.java b/core/net/src/main/java/org/onlab/onos/net/intent/impl/ObjectiveTracker.java
index d080b72..53b1239 100644
--- a/core/net/src/main/java/org/onlab/onos/net/intent/impl/ObjectiveTracker.java
+++ b/core/net/src/main/java/org/onlab/onos/net/intent/impl/ObjectiveTracker.java
@@ -135,6 +135,11 @@
@Override
public void run() {
+ // If there is no delegate, why bother? Just bail.
+ if (delegate == null) {
+ return;
+ }
+
if (event.reasons() == null) {
delegate.triggerCompile(new HashSet<IntentId>(), true);
diff --git a/docs/external.xml b/docs/external.xml
index 7942d80..08f447d 100644
--- a/docs/external.xml
+++ b/docs/external.xml
@@ -48,6 +48,7 @@
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.1</version>
<configuration>
+ <additionalparam>-Xdoclint:none</additionalparam>
<show>package</show>
<excludePackageNames>org.onlab.thirdparty:*.impl:*.impl.*:org.onlab.onos.provider.*:org.onlab.onos.gui:org.onlab.onos.rest:org.onlab.onos.cli*:org.onlab.onos.tvue:org.onlab.onos.foo:org.onlab.onos.mobility:org.onlab.onos.proxyarp:org.onlab.onos.fwd:org.onlab.onos.ifwd:org.onlab.onos.optical:org.onlab.onos.config:org.onlab.onos.calendar:org.onlab.onos.sdnip*:org.onlab.onos.metrics:org.onlab.onos.store.*:org.onlab.onos.openflow.*</excludePackageNames>
<docfilessubdirs>true</docfilessubdirs>
diff --git a/docs/pom.xml b/docs/pom.xml
index ebf5357..57a6e79 100644
--- a/docs/pom.xml
+++ b/docs/pom.xml
@@ -48,6 +48,7 @@
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.1</version>
<configuration>
+ <additionalparam>-Xdoclint:none</additionalparam>
<show>package</show>
<docfilessubdirs>true</docfilessubdirs>
<doctitle>ONOS Java API</doctitle>
diff --git a/tools/dev/bash_profile b/tools/dev/bash_profile
index 2e4c564..1a0c93f 100644
--- a/tools/dev/bash_profile
+++ b/tools/dev/bash_profile
@@ -13,8 +13,11 @@
export JAVA_HOME="/usr/lib/jvm/java-7-openjdk-amd64"
fi
fi
+
export MAVEN=${MAVEN:-~/Applications/apache-maven-3.2.2}
-export KARAF=${KARAF:-~/Applications/apache-karaf-3.0.1}
+
+export KARAF_VERSION=${KARAF_VERSION:-3.0.1}
+export KARAF=${KARAF:-~/Applications/apache-karaf-$KARAF_VERSION}
export KARAF_LOG=$KARAF/data/log/karaf.log
# Setup a path
diff --git a/utils/junit/src/main/java/org/onlab/junit/TestUtils.java b/utils/junit/src/main/java/org/onlab/junit/TestUtils.java
index 04e9600..496b357 100644
--- a/utils/junit/src/main/java/org/onlab/junit/TestUtils.java
+++ b/utils/junit/src/main/java/org/onlab/junit/TestUtils.java
@@ -135,7 +135,7 @@
}
/**
- * Triggers an allocation of an object of type <T> and forces a call to
+ * Triggers an allocation of an object of type T and forces a call to
* the private constructor.
*
* @param constructor Constructor to call
diff --git a/utils/misc/src/main/java/org/onlab/graph/AbstractGraphPathSearch.java b/utils/misc/src/main/java/org/onlab/graph/AbstractGraphPathSearch.java
index 6e9330e..0d6e508 100644
--- a/utils/misc/src/main/java/org/onlab/graph/AbstractGraphPathSearch.java
+++ b/utils/misc/src/main/java/org/onlab/graph/AbstractGraphPathSearch.java
@@ -116,6 +116,7 @@
/**
* Returns the current cost to reach the specified vertex.
*
+ * @param v vertex to reach
* @return cost to reach the vertex
*/
double cost(V v) {
@@ -127,7 +128,7 @@
* Updates the cost of the vertex using its existing cost plus the
* cost to traverse the specified edge.
*
- * @param v vertex
+ * @param vertex vertex to update
* @param edge edge through which vertex is reached
* @param cost current cost to reach the vertex from the source
* @param replace true to indicate that any accrued edges are to be
@@ -135,13 +136,13 @@
* added to the previously accrued edges as they yield
* the same cost
*/
- void updateVertex(V v, E edge, double cost, boolean replace) {
- costs.put(v, cost);
+ void updateVertex(V vertex, E edge, double cost, boolean replace) {
+ costs.put(vertex, cost);
if (edge != null) {
- Set<E> edges = parents.get(v);
+ Set<E> edges = parents.get(vertex);
if (edges == null) {
edges = new HashSet<>();
- parents.put(v, edges);
+ parents.put(vertex, edges);
}
if (replace) {
edges.clear();
@@ -163,17 +164,17 @@
* If possible, relax the specified edge using the supplied base cost
* and edge-weight function.
*
- * @param e edge to be relaxed
+ * @param edge edge to be relaxed
* @param cost base cost to reach the edge destination vertex
* @param ew optional edge weight function
* @param forbidNegatives if true negative values will forbid the link
* @return true if the edge was relaxed; false otherwise
*/
- boolean relaxEdge(E e, double cost, EdgeWeight<V, E> ew,
+ boolean relaxEdge(E edge, double cost, EdgeWeight<V, E> ew,
boolean... forbidNegatives) {
- V v = e.dst();
+ V v = edge.dst();
double oldCost = cost(v);
- double hopCost = ew == null ? 1.0 : ew.weight(e);
+ double hopCost = ew == null ? 1.0 : ew.weight(edge);
if (hopCost < 0 && forbidNegatives.length == 1 && forbidNegatives[0]) {
return false;
}
@@ -182,7 +183,7 @@
boolean relaxed = newCost < oldCost;
boolean same = Math.abs(newCost - oldCost) <= samenessThreshold;
if (same || relaxed) {
- updateVertex(v, e, newCost, !same);
+ updateVertex(v, edge, newCost, !same);
}
return relaxed;
}
diff --git a/utils/misc/src/main/java/org/onlab/graph/Heap.java b/utils/misc/src/main/java/org/onlab/graph/Heap.java
index 3b2f539..ebb1a60 100644
--- a/utils/misc/src/main/java/org/onlab/graph/Heap.java
+++ b/utils/misc/src/main/java/org/onlab/graph/Heap.java
@@ -28,14 +28,16 @@
/**
* Implementation of an array-backed heap structure whose sense of order is
* imposed by the provided comparator.
- * <p/>
+ * <p>
* While this provides similar functionality to {@link java.util.PriorityQueue}
* data structure, one key difference is that external entities can control
* when to restore the heap property, which is done through invocation of the
* {@link #heapify} method.
- * <p/>
+ * </p>
+ * <p>
* This class is not thread-safe and care must be taken to prevent concurrent
* modifications.
+ * </p>
*
* @param <T> type of the items on the heap
*/
diff --git a/utils/misc/src/main/java/org/onlab/graph/TarjanGraphSearch.java b/utils/misc/src/main/java/org/onlab/graph/TarjanGraphSearch.java
index 4498939..5bf305e 100644
--- a/utils/misc/src/main/java/org/onlab/graph/TarjanGraphSearch.java
+++ b/utils/misc/src/main/java/org/onlab/graph/TarjanGraphSearch.java
@@ -32,12 +32,14 @@
/**
* {@inheritDoc}
- * <p/>
+ * <p>
* This implementation produces results augmented with information on
* SCCs within the graph.
- * <p/>
+ * </p>
+ * <p>
* To prevent traversal of an edge, the {@link EdgeWeight#weight} should
* return a negative value as an edge weight.
+ * </p>
*/
@Override
public SCCResult<V, E> search(Graph<V, E> graph, EdgeWeight<V, E> weight) {
diff --git a/utils/misc/src/main/java/org/onlab/metrics/MetricsManager.java b/utils/misc/src/main/java/org/onlab/metrics/MetricsManager.java
index 2dd31aa..5fe22f7 100644
--- a/utils/misc/src/main/java/org/onlab/metrics/MetricsManager.java
+++ b/utils/misc/src/main/java/org/onlab/metrics/MetricsManager.java
@@ -49,8 +49,8 @@
* this class, but are allocated by the caller and passed in for registration:
* <pre>
* <code>
- * private final Gauge<Long> gauge =
- * new {@literal Gauge<Long>}() {
+ * private final Gauge<Long> gauge =
+ * new {@literal Gauge<Long>}() {
* {@literal @}Override
* public Long getValue() {
* return gaugeValue;