8081603: erroneous dot file generated from Nashorn --print-code
Summary: Emit a dot label string-conformant line break instead of a hard one to avoid strings ranging across an EOL.
Reviewed-by: attila, lagergren, sundar
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/ir/debug/NashornTextifier.java Tue Jun 02 10:55:17 2015 +0200
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/ir/debug/NashornTextifier.java Tue Jun 02 10:40:10 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -1109,7 +1109,7 @@
}
final String ex = catches.get(node);
if (ex != null) {
- sb.append("*** CATCH: ").append(ex).append(" ***\n");
+ sb.append("*** CATCH: ").append(ex).append(" ***\\l");
}
sb.append(c);
sb.append("\"]\n");