java.lang.NullPointerException

GitHub | glennsarti | 3 months ago
  1. 0

    GitHub comment 7720#245400347

    GitHub | 3 months ago | glennsarti
    java.lang.NullPointerException
  2. 0

    NullPointerException on loading XmlSuites programmatically

    GitHub | 12 months ago | ispitkovskyi
    java.lang.NullPointerException
  3. 0

    FULL PRODUCT VERSION : java version "1.8.0_05" Java(TM) SE Runtime Environment (build 1.8.0_05-b13) Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode) ADDITIONAL OS VERSION INFORMATION : Linux xxx 3.2.0-4-amd64 #1 SMP Debian 3.2.60-1+deb7u1 x86_64 GNU/Linux A DESCRIPTION OF THE PROBLEM : java.lang.NullPointerException at sun.nio.fs.UnixPath.normalizeAndCheck(UnixPath.java:77) at sun.nio.fs.UnixPath.(UnixPath.java:71) at sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:281) at java.nio.file.Paths.get(Paths.java:84) when using Path p = Paths.get(null); There is no javadoc indicating the NullPointerException, and according to the javadoc it should throw "InvalidPathException - if the path string cannot be converted to a Path" STEPS TO FOLLOW TO REPRODUCE THE PROBLEM : Just use Paths.get(null); on an unix system (which will use UnixPath) I just tested other things on windows : Paths.get(null) leads to : Exception in thread "main" java.lang.NullPointerException at java.nio.file.Paths.get(Paths.java:132) at atest.test.main(test.java:15) and Paths.get((String)null); leads to : Exception in thread "main" java.lang.NullPointerException at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:98) at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77) at sun.nio.fs.WindowsPath.parse(WindowsPath.java:94) at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:255) at java.nio.file.Paths.get(Paths.java:84) at atest.test.main(test.java:16) EXPECTED VERSUS ACTUAL BEHAVIOR : EXPECTED - I expect some javadocs comments or correct exceptions to be thrown (IllegalArgumentException ?) ACTUAL - Multiple different errors depending on the platform and the signature of Paths.get used. REPRODUCIBILITY : This bug can be reproduced always. ---------- BEGIN SOURCE ---------- public static void main(String[] args) { try { Paths.get(null); } catch (Exception e) { System.out.println("Path.get(URI) with null arg error"); e.printStackTrace(); } try { Paths.get((String) null); } catch (Exception e) { System.out.println("Path.get(String...varargs) with null arg error"); e.printStackTrace(); } } ---------- END SOURCE ---------- CUSTOMER SUBMITTED WORKAROUND : Null check before using Paths.get() with "if"

    JDK Bug System | 1 year ago | Webbug Group
    java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    FULL PRODUCT VERSION : java version "1.8.0_05" Java(TM) SE Runtime Environment (build 1.8.0_05-b13) Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode) ADDITIONAL OS VERSION INFORMATION : Linux xxx 3.2.0-4-amd64 #1 SMP Debian 3.2.60-1+deb7u1 x86_64 GNU/Linux A DESCRIPTION OF THE PROBLEM : java.lang.NullPointerException at sun.nio.fs.UnixPath.normalizeAndCheck(UnixPath.java:77) at sun.nio.fs.UnixPath.(UnixPath.java:71) at sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:281) at java.nio.file.Paths.get(Paths.java:84) when using Path p = Paths.get(null); There is no javadoc indicating the NullPointerException, and according to the javadoc it should throw "InvalidPathException - if the path string cannot be converted to a Path" STEPS TO FOLLOW TO REPRODUCE THE PROBLEM : Just use Paths.get(null); on an unix system (which will use UnixPath) I just tested other things on windows : Paths.get(null) leads to : Exception in thread "main" java.lang.NullPointerException at java.nio.file.Paths.get(Paths.java:132) at atest.test.main(test.java:15) and Paths.get((String)null); leads to : Exception in thread "main" java.lang.NullPointerException at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:98) at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77) at sun.nio.fs.WindowsPath.parse(WindowsPath.java:94) at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:255) at java.nio.file.Paths.get(Paths.java:84) at atest.test.main(test.java:16) EXPECTED VERSUS ACTUAL BEHAVIOR : EXPECTED - I expect some javadocs comments or correct exceptions to be thrown (IllegalArgumentException ?) ACTUAL - Multiple different errors depending on the platform and the signature of Paths.get used. REPRODUCIBILITY : This bug can be reproduced always. ---------- BEGIN SOURCE ---------- public static void main(String[] args) { try { Paths.get(null); } catch (Exception e) { System.out.println("Path.get(URI) with null arg error"); e.printStackTrace(); } try { Paths.get((String) null); } catch (Exception e) { System.out.println("Path.get(String...varargs) with null arg error"); e.printStackTrace(); } } ---------- END SOURCE ---------- CUSTOMER SUBMITTED WORKAROUND : Null check before using Paths.get() with "if"

    JDK Bug System | 1 year ago | Webbug Group
    java.lang.NullPointerException
  6. 0

    GitHub comment 20#69728183

    GitHub | 2 years ago | LarsWH
    java.lang.ExceptionInInitializerError

    2 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at sun.nio.fs.WindowsPathParser.parse()
    2. Java RT
      Paths.get
      1. sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:98)
      2. sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
      3. sun.nio.fs.WindowsPath.parse(WindowsPath.java:94)
      4. sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:255)
      5. java.nio.file.Paths.get(Paths.java:84)
      5 frames
    3. org.neo4j.commandline
      AdminTool.main
      1. org.neo4j.commandline.admin.AdminTool.main(AdminTool.java:34)
      1 frame