Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipse-dev] Re: Eclipse Compiler change notification

I realize I forgot to mention how to fix it: you should qualify the access
to the enclosing method, e.g.

class T {
      void foo(boolean b) {}
}

public class X {
      void foo(int i) {}
      void bar() {
            new T() {
                  {
                        X.this.foo(0); // Qualified access is OK
                  }
            };
      }
}



|---------+--------------------------->
|         |           Philippe Mulet  |
|         |                           |
|         |           01/28/2002 08:34|
|         |           PM              |
|         |                           |
|---------+--------------------------->
  >--------------------------------------------------------------------------------------------------------------------|
  |                                                                                                                    |
  |        To:      eclipse-dev@xxxxxxxxxxx                                                                            |
  |        cc:      Darin Wright/WPG/OTI@OTI, Erich Gamma/ZRH/OTI@OTI                                                  |
  |        Subject: Eclipse Compiler change notification                                                               |
  >--------------------------------------------------------------------------------------------------------------------|



The Eclipse compiler used to accept the following incorrect code (javac
1.3.1 and 1.4 would reject it) :

------
class T {
      void foo(boolean b) {}
}

public class X {
      void foo(int i) {}
      void bar() {
            new T() {
                  {
                        foo(0); // Inherited method should prevail
                  }
            };
      }
}
------

A fix for this will soon be released, and will cause some Eclipse code to
be flagged as incorrect in (based on 20020125 sources):

* org.eclipse.jdt.debug
* org.eclipse.search

Marker 1:
  Resource:
/org.eclipse.jdt.debug/src-jdimodel/org/eclipse/jdt/internal/debug/core/hcr/JavaHotCodeReplaceManager.java,

Line: 295
  Message: The method notify() in the type java.lang.Object is not
applicable for the arguments (java.util.List, java.util.List,
java.util.List)
  Marker type: org.eclipse.jdt.core.problem
  Priority: Normal


Marker 1:
  Resource:
/org.eclipse.search/src-search/org/eclipse/search/internal/ui/SortDropDownAction.java,

Line: 94
  Message: The method setChecked(boolean) in the type
org.eclipse.jface.action.Action is not applicable for the arguments
(org.eclipse.search.internal.ui.SorterDescriptor)
  Marker type: org.eclipse.jdt.core.problem
  Priority: Normal





Back to the top