Bug 60848 - [reconciling] Unclosed Comment in Java Texteditor
Summary: [reconciling] Unclosed Comment in Java Texteditor
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.0 M9   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-04 03:07 EDT by Dirk Petzoldt CLA
Modified: 2004-05-18 12:37 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Petzoldt CLA 2004-05-04 03:07:52 EDT
I forgot closing an /* */ comment at the end of a Java source file (the comment 
was placed outside the top level class code).

The eclipse Java editor did not mark that error and also the class icon in the 
class browser did not indicate an error.

(However, the package browser indicated that the package contains an error and 
at runtime an compilation error occured when I accessed the class via Java 
reflection.)

With kind regards
Dirk Petzoldt
Comment 1 Dani Megert CLA 2004-05-04 03:10:55 EDT
- which build?
- was the error maybe there before?
- did you save?
- autobuild on or off?
- did you build?
- anything in .log?

Please reopen once above questions are answered

Note: works for me using I20040428
Comment 2 Dirk Petzoldt CLA 2004-05-04 03:30:17 EDT
-Build is M8
-the error can be reproduced by deleting the last two characters of a source 
file like

	public class MyClass {
	// some code
	}
	/*
	// some comments
	*/
-save doesn't help
-autobuild on
-does not produce messages in .log
Comment 3 Dani Megert CLA 2004-05-04 03:36:33 EDT
> that the package contains an error
What about the Java file in the Package Explorer?
Comment 4 Dirk Petzoldt CLA 2004-05-04 03:43:23 EDT
Same problem in the package explorer:
The class node is clean, the (parent) package node is dirty
(You may want to reproduce the bug yourself ... ?)
Comment 5 Dani Megert CLA 2004-05-04 09:50:34 EDT
The problem reported by the reconciler has a very large length which exceeds the
source's end:
position= Position  (id=5059)
	offset= 44
	length= 51
Comment 6 Olivier Thomann CLA 2004-05-04 10:16:17 EDT
I will have a look.
Comment 7 Olivier Thomann CLA 2004-05-04 17:39:41 EDT
Fixed and released in HEAD.
Regression tests added in ParserTest (test015, 016, 017 and 018) and
ASTConverterTest2.test0551.

Change in Scanner (update of the current position in case of
ArrayIndexOutOfBoundsException).

Applied the same change in PublicScanner.
Comment 8 David Audel CLA 2004-05-18 12:37:12 EDT
Verified for 3.0M9