Summary: | Incorrect type visibility and/or import statement handling | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Alexander Pavlenko <apavlenko> | ||||||||
Component: | Core | Assignee: | Srikanth Sankaran <srikanth_sankaran> | ||||||||
Status: | VERIFIED INVALID | QA Contact: | |||||||||
Severity: | major | ||||||||||
Priority: | P3 | CC: | amj87.iitr, daniel_megert, jarthana, Olivier_Thomann | ||||||||
Version: | 3.7 | ||||||||||
Target Milestone: | 3.7 M4 | ||||||||||
Hardware: | All | ||||||||||
OS: | All | ||||||||||
Whiteboard: | |||||||||||
Attachments: |
|
Description
Alexander Pavlenko
2010-12-05 16:06:39 EST
Created attachment 184564 [details]
sample java file
Created attachment 184565 [details]
screenshot 1
Created attachment 184566 [details]
screenshot 2
Both com.vaadin.terminal.Terminal.ErrorEvent and com.vaadin.terminal.Terminal.ErrorListener are nested interfaces of the interface com.vaadin.terminal.Terminal Can reproduce with I20101205-2000. What does 'javac' do? Can reproduce all the way to 3.3.2 which is the earliest version I have a copy. Actually I can reproduce with javac too :) C:\jtests>C:\ibm-java2-sdk-50-win-i386\bin\javac.exe -g -Xlint:unchecked -Xlint: deprecation -Xlint:rawtypes -sourcepath c:\jtests -source 1.5 -classpath C:\vaad in-6.4.8\vaadin-6.4.8\WebContent\WEB-INF\lib\vaadin-6.4.8.jar VaadinApplication. java VaadinApplication.java:24: <anonymous ru.alfabank.orrpp.forms.VaadinApplication$ 1> is not abstract and does not override abstract method terminalError(com.vaadi n.terminal.Terminal.ErrorEvent) in com.vaadin.terminal.Terminal.ErrorListener public void terminalError(ErrorEvent event) { ^ VaadinApplication.java:23: method does not override a method from its superclass @Override ^ 2 errors I believe what you are observing is the right behavior. Since VaadinApplication extends Application and since Application implements URIHandler, in the absence of qualification, ErrorEvent should bind to URIHandler's ErrorEvent (as it does). Confirmed that JDK7 barks too. >ErrorEvent should bind to URIHandler's ErrorEvent
Shouldn't it bind to imported com.vaadin.terminal.Terminal.ErrorEvent?
(In reply to comment #8) > >ErrorEvent should bind to URIHandler's ErrorEvent > Shouldn't it bind to imported com.vaadin.terminal.Terminal.ErrorEvent? No, Since URIHandler is a super type of VaadinApplication, com.vaadin.terminal.URIHandler.ErrorEvent is a member (albeit inherited) of VaadinApplication. So the unqualified reference to ErrorEvent should bind to the member. This is no different from : import java.util.List; public class Test { public interface List { } List l; } The field l's type is not java.util.List here. Verified for 3.7M4 using build I20101205-2000. (In reply to comment #9) > (In reply to comment #8) > > >ErrorEvent should bind to URIHandler's ErrorEvent > > Shouldn't it bind to imported com.vaadin.terminal.Terminal.ErrorEvent? > > No, Since URIHandler is a super type of VaadinApplication, > com.vaadin.terminal.URIHandler.ErrorEvent is a member (albeit > inherited) of VaadinApplication. Ah, right! |