Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 415911 - [1.8][compiler] NPE when TYPE_USE annotated method with missing return type
Summary: [1.8][compiler] NPE when TYPE_USE annotated method with missing return type
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.4   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: BETA J8   Edit
Assignee: Stephan Herrmann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 287648
  Show dependency tree
 
Reported: 2013-08-26 15:51 EDT by Srikanth Sankaran CLA
Modified: 2013-08-26 20:57 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Srikanth Sankaran CLA 2013-08-26 15:51:47 EDT
BETA_JAVA8:

// --
import java.lang.annotation.ElementType;
import java.lang.annotation.Target;

@Target(ElementType.TYPE_USE)
@interface Marker {
}

public class X {
	@Marker
	foo(String s) {

	}
}


This snippet triggers an NPE on HEAD.
Comment 1 Srikanth Sankaran CLA 2013-08-26 15:52:12 EDT
Anirban, please follow up, TIA
Comment 2 Stephan Herrmann CLA 2013-08-26 16:25:06 EDT
Sorry, I just fixed this :)

I assume the fix is part of commit 37207b2312332e7eb9b138e12e2db23f9f9da53e,
see bug 415850 comment 1.

I've released your test case as TypeAnnotationTest.testBug415911()
(commit 4ff288f9c14eba5c9780f50be4522a4e3396a5cb)
Comment 3 Srikanth Sankaran CLA 2013-08-26 20:57:47 EDT
(In reply to comment #2)
> Sorry, I just fixed this :)

Thanks ! :)