summaryrefslogtreecommitdiffstats
path: root/misc/rosetta/src/main/java
diff options
context:
space:
mode:
authorInstrumental <jcgmisc@stl.gathman.org>2018-03-29 21:40:16 -0500
committerInstrumental <jcgmisc@stl.gathman.org>2018-03-29 21:40:24 -0500
commitb126c6c5f625432722405538692184f5c74edaad (patch)
treedcbc3a52cb13064356fa650c56fe9c90c475f6ff /misc/rosetta/src/main/java
parent36b62be84b398044e1feae657c662dba6247782f (diff)
Clean up Sonar results 3
Issue-ID: AAF-206 Change-Id: I4494990e8e0bd702b475bbbfb140eaadd566d2a0 Signed-off-by: Instrumental <jcgmisc@stl.gathman.org>
Diffstat (limited to 'misc/rosetta/src/main/java')
-rw-r--r--misc/rosetta/src/main/java/org/onap/aaf/misc/rosetta/Marshal.java4
-rw-r--r--misc/rosetta/src/main/java/org/onap/aaf/misc/rosetta/marshal/DocMarshal.java4
-rw-r--r--misc/rosetta/src/main/java/org/onap/aaf/misc/rosetta/marshal/ObjMarshal.java4
3 files changed, 12 insertions, 0 deletions
diff --git a/misc/rosetta/src/main/java/org/onap/aaf/misc/rosetta/Marshal.java b/misc/rosetta/src/main/java/org/onap/aaf/misc/rosetta/Marshal.java
index d482b247..595bc630 100644
--- a/misc/rosetta/src/main/java/org/onap/aaf/misc/rosetta/Marshal.java
+++ b/misc/rosetta/src/main/java/org/onap/aaf/misc/rosetta/Marshal.java
@@ -22,6 +22,7 @@
package org.onap.aaf.misc.rosetta;
import java.util.Iterator;
+import java.util.NoSuchElementException;
import org.onap.aaf.misc.env.Env;
import org.onap.aaf.misc.env.TimeTaken;
@@ -58,6 +59,9 @@ public abstract class Marshal<T> implements Parse<T, Marshal.State> {
@Override
public Void next() {
+ if(!hasNext()) {
+ throw new NoSuchElementException();
+ }
return null;
}
diff --git a/misc/rosetta/src/main/java/org/onap/aaf/misc/rosetta/marshal/DocMarshal.java b/misc/rosetta/src/main/java/org/onap/aaf/misc/rosetta/marshal/DocMarshal.java
index 5249a17a..2776546f 100644
--- a/misc/rosetta/src/main/java/org/onap/aaf/misc/rosetta/marshal/DocMarshal.java
+++ b/misc/rosetta/src/main/java/org/onap/aaf/misc/rosetta/marshal/DocMarshal.java
@@ -22,6 +22,7 @@
package org.onap.aaf.misc.rosetta.marshal;
import java.util.Iterator;
+import java.util.NoSuchElementException;
import org.onap.aaf.misc.rosetta.Ladder;
import org.onap.aaf.misc.rosetta.Marshal;
@@ -67,6 +68,9 @@ public class DocMarshal<T> extends Marshal<T> {
@Override
public Void next() {
+ if(!hasNext()) {
+ throw new NoSuchElementException();
+ }
return null;
}
diff --git a/misc/rosetta/src/main/java/org/onap/aaf/misc/rosetta/marshal/ObjMarshal.java b/misc/rosetta/src/main/java/org/onap/aaf/misc/rosetta/marshal/ObjMarshal.java
index eaa7a74a..4857293e 100644
--- a/misc/rosetta/src/main/java/org/onap/aaf/misc/rosetta/marshal/ObjMarshal.java
+++ b/misc/rosetta/src/main/java/org/onap/aaf/misc/rosetta/marshal/ObjMarshal.java
@@ -22,6 +22,7 @@
package org.onap.aaf.misc.rosetta.marshal;
import java.util.Iterator;
+import java.util.NoSuchElementException;
import org.onap.aaf.misc.rosetta.Ladder;
import org.onap.aaf.misc.rosetta.Marshal;
@@ -111,6 +112,9 @@ public abstract class ObjMarshal<T> extends Marshal<T> {
@Override
public Marshal<T> next() {
+ if(!hasNext()) {
+ throw new NoSuchElementException();
+ }
return pml[++idx];
}