File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
javascript-console-repo/source/java/de/fme/jsconsole Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,9 @@ public void print(Object obj) {
67
67
68
68
@ SuppressWarnings ("unchecked" )
69
69
private String formatValue (Object value ) {
70
+
71
+ if (value == null ) return "null" ;
72
+
70
73
if (value instanceof ScriptNode ) {
71
74
return formatScriptNode ((ScriptNode ) value );
72
75
} else if (value instanceof ScriptContent ) {
@@ -92,10 +95,12 @@ private String formatValue(Object value) {
92
95
private String formatMap (Map <String , Object > map ) {
93
96
StringBuffer buffer = new StringBuffer ();
94
97
for (Map .Entry <String , Object > entry : map .entrySet ()) {
95
- buffer .append (formatValue (entry .getKey ()));
96
- buffer .append (" : " );
97
- buffer .append (formatValue (entry .getValue ()));
98
- buffer .append ("\n " );
98
+ if (entry != null ) {
99
+ buffer .append (formatValue (entry .getKey ()));
100
+ buffer .append (" : " );
101
+ buffer .append (formatValue (entry .getValue ()));
102
+ buffer .append ("\n " );
103
+ }
99
104
}
100
105
return buffer .toString ();
101
106
}
You can’t perform that action at this time.
0 commit comments