summaryrefslogtreecommitdiffstats
path: root/aai-core/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'aai-core/src/main')
-rw-r--r--aai-core/src/main/java/org/onap/aai/util/genxsd/PutRelationPathSet.java14
-rw-r--r--aai-core/src/main/java/org/onap/aai/util/genxsd/XSDElement.java2
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")) {