Bug 40098 - No more compliance control
Summary: No more compliance control
Status: RESOLVED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.0 M3   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 40378 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-07-15 09:17 EDT by Alex Chapiro CLA
Modified: 2003-07-17 11:06 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Chapiro CLA 2003-07-15 09:17:32 EDT
I'm using Sun VM + JDK 1.4.1. If I set compiler preferences / compiler 
compliance level to 1.3, I expect to get an error message would I try to use in 
code any class or method that was introduced in JDK 1.4. But if I type in my 
program something like that:
Boolean.toString(true); // Since 1.4
compiler does not complaine to the compliance violation.
I think it worked for 2.0.
I aplogize if I missed any other option to activate this feature. This sort of 
errors is not listed in severety error level pages. Unfortunatelly help doesn't 
provide more information.
Comment 1 Philipe Mulet CLA 2003-07-15 09:36:04 EDT
Did you enable the warning in 
 Preferences > Java > Compiler > Build Path>Incompatible Required Libraries
?
Comment 2 Philipe Mulet CLA 2003-07-15 09:36:46 EDT
Note that we never checked on an individual reference basis.
Comment 3 Alex Chapiro CLA 2003-07-15 09:48:53 EDT
Incomplete build path : Error
Circular dependecies:   Error
Duplicate resource:     Error
All other check boxes are checked.

There is no field "Incompatible Required Libraries"
Comment 4 Philipe Mulet CLA 2003-07-15 10:29:58 EDT
This warning is only available in 3.0 stream. Note that as I said, you would 
not get individual diagnosis, but rather a coarse grain warning/error when 
setting the classpath.

In order to flag individual usage, it would require to perform 2 compile 
actions, one against jdk1.4 and one again jdk1.3, then compare/notify 
differences. This would be overkill.

It is far simply for you to manually to simply switch your JRE setting for the 
project match your expectation (see installed JREs preferences, and add the 
ones you care about).
Comment 5 Alex Chapiro CLA 2003-07-15 11:23:59 EDT
So what are the compliance options for?
Comment 6 Philipe Mulet CLA 2003-07-16 05:34:04 EDT
The Eclipse compiler is both a 1.3 and 1.4 compiler. You decide which flavor 
you want (there are numerous subtle differences in between these, denoting the 
evolution of the language).

Source level allows you to enable/disable 1.4 features like assertions 
(equivalent to javac -source option).
Target level allows you to tag classfiles with target JRE version (equivalent 
to javac -target option).
Comment 7 Philipe Mulet CLA 2003-07-16 07:46:56 EDT
OK to close ?
Comment 8 Alex Chapiro CLA 2003-07-16 08:05:54 EDT
Thanks for explanation.
It is a surprise not only for me. I surveyed my colleagues and found that all 
of them had this illusion about active compliance control.
Anyway could you please close this bug report? I apologize for the wrong alarm.
Comment 9 Philipe Mulet CLA 2003-07-16 08:16:40 EDT
No problem. This would be a cool diagnosis though, but unfortunately 
unaffordable.
Comment 10 Philipe Mulet CLA 2003-07-16 08:17:15 EDT
Closing
Comment 11 Philipe Mulet CLA 2003-07-17 11:06:48 EDT
*** Bug 40378 has been marked as a duplicate of this bug. ***