[Sablevm-bugs] [ sablevm-Bugs-694790 ] Incorrect NullPointerException in java.io.File.listFiles
Brought to you by:
egagnon
From: SourceForge.net <no...@so...> - 2003-03-09 05:07:19
|
Bugs item #694790, was opened at 2003-02-27 20:15 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105523&aid=694790&group_id=5523 Category: Execution Problem Group: SablePath Status: Open Resolution: None Priority: 5 Submitted By: Daniel Bonniot (bonniot) >Assigned to: Etienne M. Gagnon (egagnon) Summary: Incorrect NullPointerException in java.io.File.listFiles Initial Comment: The following code fails at runtime, while it works with Sun's java 1.3 and gij. The code just tries to list the files in an empty, but existing directory: import java.io.*; class Bug { public static void main(String[] args) { File f = new File("/tmp/Empty"); f.listFiles(); } } Make sure /tmp/Empty is an existing, empty directory. $ javac Bug.java $ java Bug $ sablevm Bug SableVM version 1.0.6 Copyright (C) 2000-2002 Etienne M. Gagnon <eti...@uq...> and others. All rights reserved. This software comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions. To get the name of all copyright holders and detailed license information, type "sablevm --license" or look in the directory "/usr/share/sablevm". The SableVM web site is located at http://www.sablevm.org/ . java.lang.NullPointerException at java.io.File.listFiles(File.java:1289) at java.io.File.listFiles(File.java:1259) at Bug.main(Bug.java:8) at java.lang.VirtualMachine.invokeMain(VirtualMachine.java) at java.lang.VirtualMachine.main(VirtualMachine.java:88) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105523&aid=694790&group_id=5523 |