Failed

org.eclipse.jdt.core.tests.compiler.regression.ProgrammingProblemsTest.testBug410218c - 10 (from org.eclipse.jdt.core.tests.compiler.regression.TestAll)

Failing for the past 6 builds (Since Failed#111 )
Took 1.2 sec.

Error Message

testBug410218c - Eclipse found warning(s) but Javac did not find any.
----------- Expected ------------

------------ but was ------------
----------\n
1. WARNING in X.java (at line 4)\n
 if (m.containsKey("ONE")) // bad\n
                   ^^^^^\n
Unlikely argument type String for containsKey(Object) on a Map<capture#1-of ? extends Number,Number>\n
----------\n
2. WARNING in X.java (at line 5)\n
 m.remove("ONE"); // bad\n
          ^^^^^\n
Unlikely argument type String for remove(Object) on a Map<capture#2-of ? extends Number,Number>\n
----------\n
3. WARNING in X.java (at line 6)\n
 if (m.containsValue("ONE")) // bad\n
                     ^^^^^\n
Unlikely argument type String for containsValue(Object) on a Map<capture#3-of ? extends Number,Number>\n
----------\n
4. WARNING in X.java (at line 7)\n
 m.remove("ONE"); // bad\n
          ^^^^^\n
Unlikely argument type String for remove(Object) on a Map<capture#4-of ? extends Number,Number>\n
----------\n
5. WARNING in X.java (at line 14)\n
 return m.get("ONE"); // bad\n
              ^^^^^\n
Unlikely argument type String for get(Object) on a Map<capture#9-of ? extends Number,Number>\n
----------\n

--------- Difference is ----------
 expected:<[]> but was:<[----------\n
1. WARNING in X.java (at line 4)\n
 if (m.containsKey("ONE")) // bad\n
                   ^^^^^\n
Unlikely argument type String for containsKey(Object) on a Map<capture#1-of ? extends Number,Number>\n
----------\n
2. WARNING in X.java (at line 5)\n
 m.remove("ONE"); // bad\n
          ^^^^^\n
Unlikely argument type String for remove(Object) on a Map<capture#2-of ? extends Number,Number>\n
----------\n
3. WARNING in X.java (at line 6)\n
 if (m.containsValue("ONE")) // bad\n
                     ^^^^^\n
Unlikely argument type String for containsValue(Object) on a Map<capture#3-of ? extends Number,Number>\n
----------\n
4. WARNING in X.java (at line 7)\n
 m.remove("ONE"); // bad\n
          ^^^^^\n
Unlikely argument type String for remove(Object) on a Map<capture#4-of ? extends Number,Number>\n
----------\n
5. WARNING in X.java (at line 14)\n
 return m.get("ONE"); // bad\n
              ^^^^^\n
Unlikely argument type String for get(Object) on a Map<capture#9-of ? extends Number,Number>\n
----------\n
]>

Stacktrace

junit.framework.ComparisonFailure: 
testBug410218c - Eclipse found warning(s) but Javac did not find any.
----------- Expected ------------

------------ but was ------------
----------\n
1. WARNING in X.java (at line 4)\n
	if (m.containsKey("ONE")) // bad\n
	                  ^^^^^\n
Unlikely argument type String for containsKey(Object) on a Map<capture#1-of ? extends Number,Number>\n
----------\n
2. WARNING in X.java (at line 5)\n
	m.remove("ONE"); // bad\n
	         ^^^^^\n
Unlikely argument type String for remove(Object) on a Map<capture#2-of ? extends Number,Number>\n
----------\n
3. WARNING in X.java (at line 6)\n
	if (m.containsValue("ONE")) // bad\n
	                    ^^^^^\n
Unlikely argument type String for containsValue(Object) on a Map<capture#3-of ? extends Number,Number>\n
----------\n
4. WARNING in X.java (at line 7)\n
	m.remove("ONE"); // bad\n
	         ^^^^^\n
Unlikely argument type String for remove(Object) on a Map<capture#4-of ? extends Number,Number>\n
----------\n
5. WARNING in X.java (at line 14)\n
	return m.get("ONE"); // bad\n
	             ^^^^^\n
Unlikely argument type String for get(Object) on a Map<capture#9-of ? extends Number,Number>\n
----------\n

--------- Difference is ----------
 expected:<[]> but was:<[----------\n
1. WARNING in X.java (at line 4)\n
	if (m.containsKey("ONE")) // bad\n
	                  ^^^^^\n
Unlikely argument type String for containsKey(Object) on a Map<capture#1-of ? extends Number,Number>\n
----------\n
2. WARNING in X.java (at line 5)\n
	m.remove("ONE"); // bad\n
	         ^^^^^\n
Unlikely argument type String for remove(Object) on a Map<capture#2-of ? extends Number,Number>\n
----------\n
3. WARNING in X.java (at line 6)\n
	if (m.containsValue("ONE")) // bad\n
	                    ^^^^^\n
Unlikely argument type String for containsValue(Object) on a Map<capture#3-of ? extends Number,Number>\n
----------\n
4. WARNING in X.java (at line 7)\n
	m.remove("ONE"); // bad\n
	         ^^^^^\n
Unlikely argument type String for remove(Object) on a Map<capture#4-of ? extends Number,Number>\n
----------\n
5. WARNING in X.java (at line 14)\n
	return m.get("ONE"); // bad\n
	             ^^^^^\n
Unlikely argument type String for get(Object) on a Map<capture#9-of ? extends Number,Number>\n
----------\n
]>
	at org.eclipse.jdt.core.tests.compiler.regression.ProgrammingProblemsTest.testBug410218c(ProgrammingProblemsTest.java:2841)

Standard Output

org.eclipse.jdt.core.tests.compiler.regression.ProgrammingProblemsTest#testBug410218c - 10
X.java [
import java.util.*;
class X {
  Number test(Map<? extends Number, Number> m, boolean f) {
	if (m.containsKey("ONE")) // bad
		m.remove("ONE"); // bad
	if (m.containsValue("ONE")) // bad
		m.remove("ONE"); // bad
	short one = 1;
	if (m.containsKey(one)) // almost ok
		m.remove(one); // almost ok
	if (m.containsValue(Short.valueOf(one))) // ok
		m.remove(Short.valueOf(one)); // almost ok
	if (f)
		return m.get("ONE"); // bad
	return m.get(one);
 // almost ok
  }
}

]


Full results sent to /tmp/comptest/run.1575176690486/10.0.2_20191201_050454.txt

Standard Error

----------------------------------------