summaryrefslogtreecommitdiffstats
path: root/misc/rosetta
diff options
context:
space:
mode:
Diffstat (limited to 'misc/rosetta')
-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];
}