This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 169970

Summary: Java 1.3 projects get [rawtypes] warnings
Product: java Reporter: kurti <kurti>
Component: HintsAssignee: Max Sauer <msauer>
Status: RESOLVED FIXED    
Severity: blocker CC: msauer, tzezula
Priority: P3 Keywords: API, API_REVIEW_FAST
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: Screenshot of the project properties and the warning in the java editor
Proposed API change

Description kurti 2009-08-06 11:16:11 UTC
I have a Maven project set to Java 1.3 source code level. The editor shows a warning about missing generic type, but 1.3
does not support generics.

I will attach a screenshot.
Comment 1 kurti 2009-08-06 11:16:50 UTC
Created attachment 85896 [details]
Screenshot of the project properties and the warning in the java editor
Comment 2 Max Sauer 2009-08-06 13:10:59 UTC
It will be nice to be able to determine sourcelevel from CompilationInfo. This will be useful for this issue and also some other problems in code completion 
etc. Thanks Dusane.
Comment 3 Dusan Balek 2009-08-06 14:52:49 UTC
Created attachment 85911 [details]
Proposed API change
Comment 4 Dusan Balek 2009-08-06 15:00:48 UTC
I would like to propose a small change to the java.source API to allow for getting the source version used by the javac
compiler from CompilationInfo (diff is attached).
Comment 5 Tomas Zezula 2009-08-06 15:12:34 UTC
Seems good to me.
Comment 6 Max Sauer 2009-08-07 08:42:43 UTC
Seems OK to me also.
Comment 7 Jaroslav Tulach 2009-08-07 09:05:06 UTC
Y01 Missing test?
Y02 Don't forget to increase dependency of modules that will use the new method to 0.46
Comment 8 Dusan Balek 2009-08-12 10:13:24 UTC
Requested API change integrated into jet-main (including missing test).

http://hg.netbeans.org/jet-main/rev/4671b2a6fde5
Comment 9 Quality Engineering 2009-08-13 06:05:30 UTC
Integrated into 'main-golden', will be available in build *200908130201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/4671b2a6fde5
User: Dusan Balek <dbalek@netbeans.org>
Log: CompilationInfo.getSourceVersion() method added (see issue #169970).
Comment 10 Max Sauer 2009-08-13 16:17:37 UTC
Fixed.
---
http://hg.netbeans.org/jet-main/rev/798d21d29894
Comment 11 Quality Engineering 2009-08-14 06:01:17 UTC
Integrated into 'main-golden', will be available in build *200908140201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/798d21d29894
User: Max Sauer <msauer@netbeans.org>
Log: #169970: Java 1.3 projects get [rawtypes] warnings
Comment 12 Quality Engineering 2009-08-21 06:14:24 UTC
Integrated into 'main-golden', will be available in build *200908210201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/1b32260fc9ac
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #169970(better fix): disabling the rawtypes warning for source levels < 1.5 on compiler level.
Comment 13 kurti 2009-08-21 07:36:46 UTC
Jan's change does nothing more than to reverts Max' changes, so the issue is open again.
Comment 14 Jan Lahoda 2009-08-21 08:06:59 UTC
And did you actually try to reproduce the problem on a build with my change? My change reverts Max's change *and*
installs new javac:
     2.1 --- a/libs.javacimpl/external/binaries-list
     2.2 +++ b/libs.javacimpl/external/binaries-list
     2.3 @@ -1,1 +1,1 @@
     2.4 -2C677BED0467528931E819A88F43BA5750F33510 javac-impl-nb-7.0-b07.jar
     2.5 +9CD5A09E5146CA7E7605303FD3393098653C23B2 javac-impl-nb-7.0-b07.jar

Max's change is no longer needed with the new javac:
http://hg.netbeans.org/main/nb-javac/rev/cce9961e143a
Comment 15 kurti 2009-08-21 08:18:08 UTC
Jan, I did not try to reproduce. I did not understand what your change to a binary file did as your only comment was
"better fix". I close the issue as fixed.