Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8006334

javap, JavapTask constructor breaks with null pointer exception if parameter options is null

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 8
    • 8
    • tools
    • b78
    • Verified

    Description

      The constructor:
      public JavapTask(Writer out,
                  JavaFileManager fileManager,
                  DiagnosticListener<? super JavaFileObject> diagnosticListener,
                  Iterable<String> options,
                  Iterable<String> classes)

      breaks with null pointer exception if parameter options is null. It does not make sense for the user of this method to create an empty List instance for it to work. Which is not a valid workaround, because the method will print the usage (as in the case of a wrong option) and later will process the classes parameter and produce the output if the last parameter is correct. So it is possible to end up having more output than expected. This behavior can make some tests, for example, to find false positives.

      Attachments

        Activity

          People

            vromero Vicente Arturo Romero Zaldivar
            vromero Vicente Arturo Romero Zaldivar
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: