Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / devtools / scripts / jsdoc-validator / src / org / chromium / devtools / jsdoc / ValidatorContext.java
index b7b71cb..f29f301 100644 (file)
@@ -32,6 +32,9 @@ public class ValidatorContext {
     }
 
     public String getNodeText(AstNode node) {
+        if (node == null) {
+            return null;
+        }
         return scriptText.text.substring(
                 node.getAbsolutePosition(), node.getAbsolutePosition() + node.getLength());
     }
@@ -66,7 +69,7 @@ public class ValidatorContext {
         }
         positionMarker.append('^');
         int errorAbsolutePosition = node.getAbsolutePosition() + offsetInNodeText;
-        String message = String.format("%s:%d: ERROR - %s\n%s\n%s\n",
+        String message = String.format("%s:%d: ERROR - %s%n%s%n%s%n",
                 scriptFileName,
                 position.line,
                 errorMessage,