< prev index next >

src/jdk.jextract/share/classes/com/sun/tools/jextract/JavaSourceBuilder.java

Print this page

        

*** 144,154 **** } Object value = fields.get(key); if (value instanceof String) { sb.append('"'); ! sb.append(value.toString()); sb.append('"'); } else if (value instanceof Enum) { sb.append(value.getClass().getSimpleName()); sb.append('.'); sb.append(((Enum)value).name()); --- 144,154 ---- } Object value = fields.get(key); if (value instanceof String) { sb.append('"'); ! sb.append(Utils.quote(value.toString())); sb.append('"'); } else if (value instanceof Enum) { sb.append(value.getClass().getSimpleName()); sb.append('.'); sb.append(((Enum)value).name());
*** 158,168 **** } else if (value instanceof String[]) { sb.append("{ "); String[] strs = (String[])value; for (int i = 0; i < strs.length; i++) { sb.append('"'); ! sb.append(strs[i]); sb.append('"'); if (i != strs.length - 1) { sb.append(", "); } } --- 158,168 ---- } else if (value instanceof String[]) { sb.append("{ "); String[] strs = (String[])value; for (int i = 0; i < strs.length; i++) { sb.append('"'); ! sb.append(Utils.quote(strs[i])); sb.append('"'); if (i != strs.length - 1) { sb.append(", "); } }
< prev index next >