< prev index next >

src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/Messager.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, 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
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -122,15 +122,13 @@
                 return;
             case WARNING:
             case MANDATORY_WARNING:
                 printWarning(e, msg);
                 return;
-            case NOTE:
-                printNotice(e, msg);
-                return;
             default:
-                throw new IllegalArgumentException(String.format("unexpected option %s", kind));
+                printWarning(e, msg);
+                return;
         }
     }
 
     final String programName;
 

@@ -201,13 +199,10 @@
         if (e == null) {
             return programName;
         }
         JavacTrees trees = JavacTrees.instance(context);
         TreePath path = trees.getPath(e);
-        if (path == null) {
-            return programName;
-        }
         DocSourcePositions sourcePositions = trees.getSourcePositions();
         JCTree tree = trees.getTree(e);
         CompilationUnitTree cu = path.getCompilationUnit();
         long spos = sourcePositions.getStartPosition(cu, tree);
         long lineNumber = cu.getLineMap().getLineNumber(spos);
< prev index next >