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 121249 - Broken test compilation
Summary: Broken test compilation
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jan Lahoda
URL: http://deadlock.netbeans.org/hudson/j...
Keywords: TEST
Depends on:
Blocks:
 
Reported: 2007-11-06 07:39 UTC by Jesse Glick
Modified: 2007-12-07 16:37 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2007-11-06 07:39:56 UTC
http://deadlock.netbeans.org/hudson/job/test-compilation/169/changes

I think due to mmetelka's commit (issue #120052):

/space/src/nb_all/java/hints/test/unit/src/org/netbeans/modules/java/hints/infrastructure/HintsTestBase.java:142:
<anonymous org.netbeans.modules.java.hints.infrastructure.HintsTestBase$2> is not abstract and does not override
abstract method
findLanguageEmbedding(org.netbeans.api.lexer.Token<?>,org.netbeans.api.lexer.LanguagePath,org.netbeans.api.lexer.InputAttributes)
in org.netbeans.spi.lexer.LanguageProvider
                public LanguageEmbedding<?> findLanguageEmbedding(Token<? extends TokenId> token,
                                            ^
Comment 1 Jan Lahoda 2007-11-06 09:43:25 UTC
Should be OK now:
Checking in HintsTestBase.java;
/cvs/java/hints/test/unit/src/org/netbeans/modules/java/hints/infrastructure/HintsTestBase.java,v  <--  HintsTestBase.java
new revision: 1.7; previous revision: 1.6
done
Comment 2 Jesse Glick 2007-11-06 10:03:53 UTC
Should consider merging this to branch in case someone wants to run tests on release60.

BTW I am not sure what the purpose of LanguageProvider.java 1.12 was; Language, LanguageEmbedding, and Token all have to
take a type parameter extending TokenId anyway. I am a little surprised javac even lets you refer to Token<?>, as if
e.g. Token<String> were even possible.
Comment 3 Miloslav Metelka 2007-11-06 15:20:44 UTC
I was trying to simplify <? extends TokenId> to just <?> where possible since if

class Language<T extends TokenId>

then IIUC Language<?> should be equivalent to Language<? extends TokenId>. Javac seems to have no problem to compile

    Language<? extends TokenId> lang = Language.find("text/plain");

where

    public static Language<?> find(String mimeType) { ... }

within lexer module's code (although now I see that an incremental building problem gets hit in this case too). However
when compiling the same code in other module then javac always fails with incompatible types problem. So it's likely a
difference between compiling against jar file versus sources. Anyway it seems fixed in JDK6 - the code compiles anywhere.
Comment 4 Jesse Glick 2007-11-06 15:43:03 UTC
I have noticed generally that a lot of generics-related bugs in JDK 5's javac are fixed in JDK 6.