Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 466479

Summary: [null] display of anonymous type in error message
Product: [Eclipse Project] JDT Reporter: Stephan Herrmann <stephan.herrmann>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: minor    
Priority: P3    
Version: 4.5   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Stephan Herrmann CLA 2015-05-05 13:51:25 EDT
I had externally added @Nullable to the second T in Stream's
      Stream<T> filter(Predicate<? super T> predicate);

Now this source:
//---
package m7test;

import java.util.function.Predicate;
import java.util.stream.Stream;

public class MyStreamTest {
	void test(Stream<String> s) {
		s.filter(new Predicate<String>() {
			public boolean test(String t) { return false; }
		});
	}
}
//---

triggers this warning:

Null type safety (type annotations): The expression of type '' needs unchecked conversion to conform to 'Predicate<? super @Nullable String>', corresponding supertype is 'Predicate<String>'

"The type ''" is a funny way to refer to a type...
Comment 1 Stephan Herrmann CLA 2016-03-25 10:28:46 EDT
Too much on my plate for 4.6. Bulk deferral to 4.7
Comment 2 Stephan Herrmann CLA 2017-05-16 12:05:05 EDT
Ran out of time for 4.7. Bulk move to 4.8.
Comment 3 Manoj N Palat CLA 2018-05-16 12:56:28 EDT
bulk move out of 4.8
Comment 4 Stephan Herrmann CLA 2018-08-30 14:53:11 EDT
removing target, since no one ever complained, and also the necessary information is actually present: "corresponding supertype is 'Predicate<String>'".