Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 325717 - API checker misses invalid method reference to execution environment
Summary: API checker misses invalid method reference to execution environment
Status: CLOSED WONTFIX
Alias: None
Product: PDE
Classification: Eclipse Project
Component: API Tools (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: PDE API Tools Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-20 03:57 EDT by Philippe Coucaud CLA
Modified: 2019-09-09 02:20 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Coucaud CLA 2010-09-20 03:57:30 EDT
Eclipse build-ID: I20100915-2024

Let's consider the following class:
-------------------------------------------
package test;

import org.eclipse.swt.events.VerifyEvent;
import org.eclipse.swt.events.VerifyListener;
import org.eclipse.swt.widgets.Text;

public class Test {
  static Text text;

  public static void main(String[] args) {
    "".isEmpty();

    text.addVerifyListener(new VerifyListener() {
      public void verifyText(VerifyEvent e) {
        "".isEmpty();
      }
    });
  }
}
-------------------------------------------

1. create an eclipse plug-in project with J2SE-1.5 as minimal environment and use a 6.0 JRE.
2. enable API tooling
3. add aforementioned class to project
4. the API checker correctly reports the first erroneous reference to String.isEmpty() (which does not exist in J2SE-1.5), but misses the second one inside the anonymous inner class:

The method String.isEmpty() referenced in test.Test.main(String[]) is not defined in the bundle's required execution environment: J2SE-1.5
Comment 1 Eclipse Webmaster CLA 2019-09-06 15:37:52 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.
Comment 2 Julian Honnen CLA 2019-09-09 02:20:12 EDT
Please remove the stalebug flag, if this issue is still relevant and can be reproduced on the latest release.