diff options
author | 2018-08-23 09:32:21 -0400 | |
---|---|---|
committer | 2018-08-23 09:43:51 -0400 | |
commit | 49e7415df1c6a2b9682e5df77c5bf65d09314457 (patch) | |
tree | add8dabddd159e4eb6fd8d36ca5fe927478ca497 /aai-core/src/main/java/org | |
parent | 68628a4047e9ff4bfedd55788b2cc637cc2b4f1b (diff) |
Update xsd element to generate boolean to false
Issue-ID: AAI-1536
Change-Id: If1cc9291e28dd0381115a0bf6c5a44faa7fdbe01
Signed-off-by: Kajur, Harish (vk250x) <vk250x@att.com>
Diffstat (limited to 'aai-core/src/main/java/org')
-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")) { |