Thomas Vachuska

Fixed some javadoc warning/errors.

Fixed NPE error in objective tracker.
Preparing for upgrade to Java 8 and Karaf 3.0.2.
......@@ -135,6 +135,11 @@ public class ObjectiveTracker implements ObjectiveTrackerService {
@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);
......
......@@ -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>
......
......@@ -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>
......
......@@ -13,8 +13,11 @@ if [ -z "${JAVA_HOME}" ]; then
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
......
......@@ -135,7 +135,7 @@ public final class TestUtils {
}
/**
* 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
......
......@@ -116,6 +116,7 @@ public abstract class AbstractGraphPathSearch<V extends Vertex, E extends Edge<V
/**
* 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 @@ public abstract class AbstractGraphPathSearch<V extends Vertex, E extends Edge<V
* 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 @@ public abstract class AbstractGraphPathSearch<V extends Vertex, E extends Edge<V
* 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 @@ public abstract class AbstractGraphPathSearch<V extends Vertex, E extends Edge<V
* 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 @@ public abstract class AbstractGraphPathSearch<V extends Vertex, E extends Edge<V
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;
}
......
......@@ -28,14 +28,16 @@ import static com.google.common.base.Preconditions.checkNotNull;
/**
* 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
*/
......
......@@ -32,12 +32,14 @@ public class TarjanGraphSearch<V extends Vertex, E extends Edge<V>>
/**
* {@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) {
......
......@@ -49,8 +49,8 @@ import com.codahale.metrics.Timer;
* 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&lt;Long&gt; gauge =
* new {@literal Gauge&lt;Long&gt}() {
* {@literal @}Override
* public Long getValue() {
* return gaugeValue;
......