Bug 108201 - Java file validator not identifying problem
Summary: Java file validator not identifying problem
Status: RESOLVED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2005-08-27 16:23 EDT by Kapil CLA
Modified: 2009-08-30 02:06 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 Kapil CLA 2005-08-27 16:23:52 EDT
If you enter something like this construct in a java file the validator doesnt
point out the the missing brace but confuses the user by showing totally
different (non-existing) errors 

        for(;;) {
            if(false) {
                    if(true)
                        System.out.println("temp");
                    else
                        System.out.println("temp");
                
            
        }
Comment 1 Jess Garms CLA 2005-08-29 18:39:04 EDT
Core issue. Reassigning.
Comment 2 Olivier Thomann CLA 2005-08-30 09:22:59 EDT
Could you please describe what you are doing?
Steps to reproduce?
Build id?
Comment 3 Kapil CLA 2005-08-30 09:53:26 EDT
3.1.0 Final
I20050627-1435
If you have a sufficiently long java file and such a construct with syntax
errors exists, you go on a wild goose chase before finding the actual error.
(can take 10-15 mins on a large java file). Validator doesnt show indicate
proper error. I guess the partitioner is getting confused..

Comment 4 Olivier Thomann CLA 2005-08-30 09:55:47 EDT
Could you please provide a test case?
Comment 5 Olivier Thomann CLA 2005-08-30 11:04:23 EDT
Trying to insert this construct in the Parser class (9401 lines), I could
immediately locate the error.
I got an error:
Syntax error on token(s), misplaced construct(s)

And clicking on this error, I went immediately to the incorrect code.
Now it is possible that in your case, it is more difficult to locate the error.
But we would like your test case in order to find out if we can improve the
error recovery.
Comment 6 Kapil CLA 2005-08-30 11:29:58 EDT
I will post a test case soon.
Comment 7 Olivier Thomann CLA 2006-10-06 16:05:13 EDT
Closing as REMIND.
Error recovery has been added in 3.2 and should make this case obsolete.
Please let us know if you still get issue on 3.2.1.
Comment 8 Denis Roy CLA 2009-08-30 02:06:59 EDT
As of now 'LATER' and 'REMIND' resolutions are no longer supported.
Please reopen this bug if it is still valid for you.