cc: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=351551 When I run a CDK based test suite [1], the "OpenSource JVM Test Suite", I get a NullPointerException, because of this situation: - reader.ready() returns true - a subsequent reader.readLine() returns null The code I deduce this from is: protected void loadClassList(String classList) throws Exception { classesToTest = new Vector(); // get the src/core.javafiles file BufferedReader reader = new BufferedReader(new InputStreamReader( this.getClass().getClassLoader().getResourceAsStream(classList) )); while (reader.ready()) { // load them one by one String rawClassName = reader.readLine(); rawClassName = rawClassName.substring(20); String className = convertSlash2Dot( rawClassName.substring(0, rawClassName.indexOf('.')) ); classesToTest.add(className); } } The NullPointerException occurs on this line: rawClassName = rawClassName.substring(20); Because rawClassName is null. This happens with cacao and jamvm, but not with kaffe, so seems a Classpath problem. Egon
Could you add more context. I cannot replicate this. I tried downloading the src/core.javafiles file from the cdt test suite, but even with this file I cannot make this particular snippet of code fail. If you have a standalone example that would help. Or if you have some simple instructions for running the whole test suite plus steps to get to this particular failure.
Argg... forgot to give [1]: http://sourceforge.net/project/showfiles.php?group_id=20024 It contains two CDK jars and a script to run the test suite. The above bug occurs with 'benchmark II'. See also the README in that distrib. BTW, the *.javafiles are generated from the CDK sources by running: ant runDoclet CDK's build.xml should automatically pick up gjdoc. Egon