Uploaded image for project: 'Maven JXR'
  1. Maven JXR
  2. JXR-26

NPE when source code contains quoted strings "package" or "import"

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0
    • Fix Version/s: 2.1
    • Component/s: jxr
    • Labels:
      None

      Description

      Here is a sample code:

      package fr.test;
      
      public class SimpleTest
      {
          public void test()
          {
          	//String varTest = "import";
          	String varTest = "package";
          }
      }
      

      When I run mvn jxr:jxr, the following NPE happens:

      ...
      [DEBUG] parsing... fr\test\SimpleTest.java
      [INFO] ------------------------------------------------------------------------
      [ERROR] FATAL ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] null
      [INFO] ------------------------------------------------------------------------
      [DEBUG] Trace
      java.lang.NullPointerException
      at org.apache.maven.jxr.pacman.JavaFileImpl.parse(JavaFileImpl.java:95)
      at org.apache.maven.jxr.pacman.JavaFileImpl.<init>(JavaFileImpl.java:64)
      at org.apache.maven.jxr.pacman.FileManager.getFile(FileManager.java:68)
      ...

        Attachments

          Activity

            People

            • Assignee:
              dennisl@apache.org Dennis Lundberg
              Reporter:
              gduge Géraud Dugé
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: