summaryrefslogtreecommitdiffstats
path: root/misc
diff options
context:
space:
mode:
Diffstat (limited to 'misc')
-rw-r--r--misc/env/src/main/java/org/onap/aaf/misc/env/jaxb/JAXBmar.java2
-rw-r--r--misc/env/src/main/java/org/onap/aaf/misc/env/jaxb/JAXBumar.java2
-rw-r--r--misc/rosetta/src/main/java/org/onap/aaf/misc/rosetta/marshal/ObjArray.java35
-rw-r--r--misc/rosetta/src/main/java/org/onap/aaf/misc/rosetta/marshal/ObjMarshal.java35
-rw-r--r--misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/JU_JSON.java4
5 files changed, 38 insertions, 40 deletions
diff --git a/misc/env/src/main/java/org/onap/aaf/misc/env/jaxb/JAXBmar.java b/misc/env/src/main/java/org/onap/aaf/misc/env/jaxb/JAXBmar.java
index cca3e68c..127eb154 100644
--- a/misc/env/src/main/java/org/onap/aaf/misc/env/jaxb/JAXBmar.java
+++ b/misc/env/src/main/java/org/onap/aaf/misc/env/jaxb/JAXBmar.java
@@ -25,7 +25,7 @@
* Created on: Apr 10, 2009
* Created by: Jonathan
*
- * Revamped to do away with ThreadLocal 5/27/2011, JG1555
+ * Revamped to do away with ThreadLocal 5/27/2011, JonathanGathman
*
* (c) 2009 SBC Knowledge Ventures, L.P. All rights reserved.
*******************************************************************
diff --git a/misc/env/src/main/java/org/onap/aaf/misc/env/jaxb/JAXBumar.java b/misc/env/src/main/java/org/onap/aaf/misc/env/jaxb/JAXBumar.java
index 94e9ba80..74072aaf 100644
--- a/misc/env/src/main/java/org/onap/aaf/misc/env/jaxb/JAXBumar.java
+++ b/misc/env/src/main/java/org/onap/aaf/misc/env/jaxb/JAXBumar.java
@@ -25,7 +25,7 @@
* Created on: Apr 10, 2009
* Created by: Jonathan
*
- * Revamped to do away with ThreadLocal 5/27/2011, JG1555
+ * Revamped to do away with ThreadLocal 5/27/2011, JonathanGathman
*
* (c) 2009 SBC Knowledge Ventures, L.P. All rights reserved.
*******************************************************************
diff --git a/misc/rosetta/src/main/java/org/onap/aaf/misc/rosetta/marshal/ObjArray.java b/misc/rosetta/src/main/java/org/onap/aaf/misc/rosetta/marshal/ObjArray.java
index 3d7d1b4e..fa95dee5 100644
--- a/misc/rosetta/src/main/java/org/onap/aaf/misc/rosetta/marshal/ObjArray.java
+++ b/misc/rosetta/src/main/java/org/onap/aaf/misc/rosetta/marshal/ObjArray.java
@@ -53,25 +53,24 @@ public abstract class ObjArray<T,S> extends Marshal<T> {
parsed.event = START_ARRAY;
parsed.name = name;
}
- } else if (DONE_ITERATOR.equals(iter)) {
- } else {
+ } else if (!DONE_ITERATOR.equals(iter)) {
ladder.ascend(); // look at field info
- Iterator<?> memIter = ladder.peek();
- ListIterator<S> mems = (ListIterator<S>)iter;
- S mem;
- if(memIter==null) {
- mem=mems.next();
- } else if(!DONE_ITERATOR.equals(memIter)) {
- mem=mems.peek();
- } else if(iter.hasNext()) {
- mem=null;
- ladder.push(null);
- } else {
- mem=null;
- }
-
- if(mem!=null)
- parsed = subMarshaller.parse(mem, parsed);
+ Iterator<?> memIter = ladder.peek();
+ ListIterator<S> mems = (ListIterator<S>)iter;
+ S mem;
+ if(memIter==null) {
+ mem=mems.next();
+ } else if(!DONE_ITERATOR.equals(memIter)) {
+ mem=mems.peek();
+ } else if(iter.hasNext()) {
+ mem=null;
+ ladder.push(null);
+ } else {
+ mem=null;
+ }
+
+ if(mem!=null)
+ parsed = subMarshaller.parse(mem, parsed);
ladder.descend();
if(mem==null) {
if(iter.hasNext()) {
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 4857293e..cb2c478a 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
@@ -73,26 +73,25 @@ public abstract class ObjMarshal<T> extends Marshal<T> {
} else {
ladder.push(DONE_ITERATOR);
}
- } else if (DONE_ITERATOR.equals(iter)) {
- } else {
+ } else if (!DONE_ITERATOR.equals(iter)) {
FieldsIterator fields = (FieldsIterator)iter;
ladder.ascend(); // look at field info
- Iterator<?> currFieldIter = ladder.peek();
- Marshal<T> marshal;
- if(currFieldIter==null) {
- marshal=fields.next();
- } else if(!DONE_ITERATOR.equals(currFieldIter)) {
- marshal=fields.peek();
- if(marshal==null && fields.hasNext())marshal=fields.next();
- } else if(fields.hasNext()) {
- marshal=fields.next();
- ladder.push(null);
- } else {
- marshal=null;
- }
-
- if(marshal!=null)
- parsed = marshal.parse(in, parsed);
+ Iterator<?> currFieldIter = ladder.peek();
+ Marshal<T> marshal;
+ if(currFieldIter==null) {
+ marshal=fields.next();
+ } else if(!DONE_ITERATOR.equals(currFieldIter)) {
+ marshal=fields.peek();
+ if(marshal==null && fields.hasNext())marshal=fields.next();
+ } else if(fields.hasNext()) {
+ marshal=fields.next();
+ ladder.push(null);
+ } else {
+ marshal=null;
+ }
+
+ if(marshal!=null)
+ parsed = marshal.parse(in, parsed);
ladder.descend();
if(marshal==null || parsed.event==NONE) {
parsed.event = END_OBJ;
diff --git a/misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/JU_JSON.java b/misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/JU_JSON.java
index 2a48edc4..080fc973 100644
--- a/misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/JU_JSON.java
+++ b/misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/JU_JSON.java
@@ -58,9 +58,9 @@ public class JU_JSON {
go(jin, jout, "{\"id\":\"Me,[}[eg[)(:x,\\\" Myself\",\"date\":1353094689100}");
// TODO: Clean out AT&T specific data
- go(jin,jout, "{\"userid\":\"jg1555\",\"timestamp\":1353097388531,\"item\":[{\"tag\":\"color\",\"value\":\"Mauve\"},{\"tag\":\"shirtsize\",\"value\":\"Xtra Large\"}]}");
+ go(jin,jout, "{\"userid\":\"xk3233\",\"timestamp\":1353097388531,\"item\":[{\"tag\":\"color\",\"value\":\"Mauve\"},{\"tag\":\"shirtsize\",\"value\":\"Xtra Large\"}]}");
//go()
- //"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><vote xmlns=\"urn:poll.att.com\"><userid>jg1555</userid><timestamp>1353082669667</timestamp></vote>");
+ //"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><vote xmlns=\"urn:poll.att.com\"><userid>xk3233</userid><timestamp>1353082669667</timestamp></vote>");
// 3/11/2015 Jonathan found a case with missing comma
go(jin,jout, "{\"start\":\"2015-03-11T18:18:05.580-05:00\",\"end\":\"2015-09-11-05:00\",\"force\":\"false\",\"perm\":{\"type\":\"org.osaaf.myns.mytype\",\"instance\":\"myInstance\",\"action\":\"myAction\"}"