FULL PRODUCT VERSION :
A DESCRIPTION OF THE PROBLEM :
Almost similar as http://bugs.java.com/bugdatabase/view_bug.do?bug_id=1240786 , if I have a souce code which includes some codes like:
new Thread(){
....
}.start();
It will always return a number 0.0 at the like of "}.start();" when I use below codes to extract the numbers:
BufferedReader reader = ...;
StreamTokenizer tokenizer = new StreamTokenizer(reader);
tokenizer.parseNumbers();
int nextToken = tokenizer.nextToken();
while(nextToken != StreamTokenizer.TT_EOF){
if(nextToken == StreamTokenizer.TT_NUMBER){
System.out.println("number "+ tokenizer.nval+" on line "+tokenizer.lineno());
}
nextToken = tokenizer.nextToken();
}
reader.close();
REPRODUCIBILITY :
This bug can be reproduced always.
A DESCRIPTION OF THE PROBLEM :
Almost similar as http://bugs.java.com/bugdatabase/view_bug.do?bug_id=1240786 , if I have a souce code which includes some codes like:
new Thread(){
....
}.start();
It will always return a number 0.0 at the like of "}.start();" when I use below codes to extract the numbers:
BufferedReader reader = ...;
StreamTokenizer tokenizer = new StreamTokenizer(reader);
tokenizer.parseNumbers();
int nextToken = tokenizer.nextToken();
while(nextToken != StreamTokenizer.TT_EOF){
if(nextToken == StreamTokenizer.TT_NUMBER){
System.out.println("number "+ tokenizer.nval+" on line "+tokenizer.lineno());
}
nextToken = tokenizer.nextToken();
}
reader.close();
REPRODUCIBILITY :
This bug can be reproduced always.
- relates to
-
JDK-1240786 fp.bugs 3463 nextToken() parses a lone '.' char in the input stream as a zero
-
- Closed
-