patrickp172 / javaparser

Automatically exported from code.google.com/p/javaparser
0 stars 0 forks source link

Some comments before pacakge declaration miss #46

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a Java like this:
/*
 * Comment 1
 */

/*
 * Comment 2
 */

/*
 * Comment 3
 */

package net.perfectbug.test;

public class Test {

}
2. Parse it with JavaParser.
3. Use CompilationUnit.toString() to get the parsed source code.

What is the expected output? What do you see instead?
Expected:
All comments should be print.
Observation:
Not comments are print.
And CompilationUnit.comments only contains comment 3. It doesn't contains 
neither comment 1 nor comment 2.

What version of the product are you using? On what operating system?
1.0.8 on Windows XP.

Please provide any additional information below.

Original issue reported on code.google.com by longhua1...@gmail.com on 28 Jun 2011 at 10:26