diff options
author | James Forsyth <jf2512@att.com> | 2018-08-23 14:19:46 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-08-23 14:19:46 +0000 |
commit | 5b06b9f91e5eb34139d9957ee0b28a64a0ee6097 (patch) | |
tree | 00ec157b52c27b6b85b8e1719eed9edf710a8cb6 /aai-core/src | |
parent | c342161db9b5ea27447a366133c5bf76ee67f241 (diff) | |
parent | 49e7415df1c6a2b9682e5df77c5bf65d09314457 (diff) |
Merge "Update xsd element to generate boolean to false"
Diffstat (limited to 'aai-core/src')
-rw-r--r-- | aai-core/src/main/java/org/onap/aai/util/genxsd/PutRelationPathSet.java | 14 | ||||
-rw-r--r-- | aai-core/src/main/java/org/onap/aai/util/genxsd/XSDElement.java | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/aai-core/src/main/java/org/onap/aai/util/genxsd/PutRelationPathSet.java b/aai-core/src/main/java/org/onap/aai/util/genxsd/PutRelationPathSet.java index 0b0fd946..3d055b81 100644 --- a/aai-core/src/main/java/org/onap/aai/util/genxsd/PutRelationPathSet.java +++ b/aai-core/src/main/java/org/onap/aai/util/genxsd/PutRelationPathSet.java @@ -138,13 +138,6 @@ public class PutRelationPathSet { e.printStackTrace(); return; } - finally{ - try { - fop.close(); - } catch (IOException e) { - e.printStackTrace(); - } - } try { if(relations.size() > 0) {fop.write("[\n".getBytes());} fop.write(String.join(",\n", relations).getBytes()); @@ -155,6 +148,13 @@ public class PutRelationPathSet { e.printStackTrace(); return; } + finally{ + try { + fop.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } logger.debug(String.join(",\n", relations)); return; } diff --git a/aai-core/src/main/java/org/onap/aai/util/genxsd/XSDElement.java b/aai-core/src/main/java/org/onap/aai/util/genxsd/XSDElement.java index 91c9459d..f9ce7c11 100644 --- a/aai-core/src/main/java/org/onap/aai/util/genxsd/XSDElement.java +++ b/aai-core/src/main/java/org/onap/aai/util/genxsd/XSDElement.java @@ -297,7 +297,7 @@ public class XSDElement implements Element { sbElement.append(" type=\"xs:int\""); if ( elementType.equals("java.lang.Boolean")) sbElement.append(" type=\"xs:boolean\""); - if ( elementIsRequired == null || !elementIsRequired.equals("true")||addType != null) { + if ( ("java.lang.Boolean".equals(elementType)) || (elementIsRequired == null || !elementIsRequired.equals("true")||addType != null)) { sbElement.append(" minOccurs=\"0\""); } if ( elementContainerType != null && elementContainerType.equals("java.util.ArrayList")) { |