diff options
Diffstat (limited to 'misc')
-rw-r--r-- | misc/xgen/src/main/java/org/onap/aaf/misc/xgen/XGen.java | 12 | ||||
-rw-r--r-- | misc/xgen/src/main/java/org/onap/aaf/misc/xgen/html/HTML5Gen.java | 2 |
2 files changed, 10 insertions, 4 deletions
diff --git a/misc/xgen/src/main/java/org/onap/aaf/misc/xgen/XGen.java b/misc/xgen/src/main/java/org/onap/aaf/misc/xgen/XGen.java index b68ad6e5..258715e1 100644 --- a/misc/xgen/src/main/java/org/onap/aaf/misc/xgen/XGen.java +++ b/misc/xgen/src/main/java/org/onap/aaf/misc/xgen/XGen.java @@ -151,7 +151,9 @@ public class XGen<RT extends XGen<RT>> { @SuppressWarnings("unchecked")
public RT text(String txt) {
- forward.append(txt);
+ if(txt!=null) {
+ forward.append(txt);
+ }
return (RT)this;
}
@@ -182,8 +184,12 @@ public class XGen<RT extends XGen<RT>> { for (int i=0;i<tabs;++i) {
forward.append(" ");
}
- forward.append(txt);
- if (pretty)forward.println();
+ if(txt!=null) {
+ forward.append(txt);
+ }
+ if (pretty) {
+ forward.println();
+ }
return (RT)this;
}
diff --git a/misc/xgen/src/main/java/org/onap/aaf/misc/xgen/html/HTML5Gen.java b/misc/xgen/src/main/java/org/onap/aaf/misc/xgen/html/HTML5Gen.java index 89a39b3a..7cf3929a 100644 --- a/misc/xgen/src/main/java/org/onap/aaf/misc/xgen/html/HTML5Gen.java +++ b/misc/xgen/src/main/java/org/onap/aaf/misc/xgen/html/HTML5Gen.java @@ -32,7 +32,7 @@ public class HTML5Gen extends HTMLGen { @Override
public HTMLGen html(String ... attrib) {
- //forward.println("<!DOCTYPE html>");
+ forward.println("<!DOCTYPE html>");
incr("html",attrib);
return this;
}
|