Community
Participate
Working Groups
Build Identifier: 20100917-0705 I suppose it's a generic problem but I can demonstrate it on my example using Vaadin runtime library. When I just try to refer to com.vaadin.terminal.Terminal.ErrorEvent type in the parameter of terminalError method the Java Editor reports a problem although it shouldn't because the type is correctly imported. Meanwhile the problem diagnostics contains the wrong mention of com.vaadin.terminal.URIHandler.ErrorEvent. If I use a fully qualified type in in the parameter declaration - problem disappears Reproducible: Always Steps to Reproduce: 1. Add vaadin-6.4.8.jar or any other version to classpath (can be downloaded here http://vaadin.com/downloading?package=release/6.4/6.4.8/vaadin-6.4.8.zip) 2. Open the sample VaadinApplicatin.java attached 3. See problems detected
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!