java: move javac bug workaround to the suppressable inspection (IDEA-258347)

GitOrigin-RevId: 131d9adc783927a143393a59f98efe2afb414c68
This commit is contained in:
Anna Kozlova authored and intellij-monorepo-bot committed 2020-12-28 16:36:13 +00:00
1 parent bb4683f8b4
commit 454edfca70
13 files changed
+95 -92

No files matched your search

@@ -1,9 +1,9 @@
class Foo<T> {
class Foo<<warning descr="Type parameter 'T' is never used">T</warning>> {
static class Nested {};
}
class Bar extends Foo<<error descr="Nested is not accessible in current context">Bar.Nested</error>> {}
class Bar extends Foo<<warning descr="Nested is not accessible in current context">Bar.Nested</warning>> {}
interface FooI<T> {
interface FooI<<warning descr="Type parameter 'T' is never used">T</warning>> {
interface Nested {};
}
interface BarI extends FooI<<error descr="Nested is not accessible in current context">BarI.Nested</error>> {}
interface BarI extends FooI<<warning descr="Nested is not accessible in current context">BarI.Nested</warning>> {}
@@ -1,9 +1,9 @@
abstract class IdeaBugTest<M extends IdeaBugTest.Mapping>
abstract class IdeaBugTest<<warning descr="Type parameter 'M' is never used">M</warning> extends IdeaBugTest.Mapping>
{
static class Mapping {}
}
class BugTestSub extends IdeaBugTest<<error descr="Mapping is not accessible in current context">BugTestSub.SubMapping</error>>
class BugTestSub extends IdeaBugTest<<warning descr="Mapping is not accessible in current context">BugTestSub.SubMapping</warning>>
{
public abstract static class SubMapping extends Mapping {}
}
@@ -16,7 +16,7 @@ class BugTestSub1 extends IdeaBugTest<BugTestSub1.SubMapping>
class AbstractSettings {
interface State {}
}
interface SomeInterface<T> {}
interface SomeInterface<<warning descr="Type parameter 'T' is never used">T</warning>> {}
class Settings extends AbstractSettings implements SomeInterface<Settings.MyState> {
static class MyState implements State {}
}
@@ -26,7 +26,7 @@ class Records {
interface RecordCategory {
}
static abstract class Record<CATEGORY_TYPE extends RecordCategory> extends Records {}
static abstract class Record<<warning descr="Type parameter 'CATEGORY_TYPE' is never used">CATEGORY_TYPE</warning> extends RecordCategory> extends Records {}
static class ResultRecord extends Record<ResultRecord.Category> {
public enum Category implements RecordCategory {
@@ -35,7 +35,7 @@ class Records {
}
}
//---------------------------------------------
class Parent<T extends Parent.NestedParent>
class Parent<<warning descr="Type parameter 'T' is never used">T</warning> extends Parent.NestedParent>
{
protected static interface NestedParent
{
@@ -44,7 +44,7 @@ class Parent<T extends Parent.NestedParent>
class Test
{
public final static class Child extends Parent<<error descr="NestedParent is not accessible in current context">Child.NestedChild</error>>
public final static class Child extends Parent<<warning descr="NestedParent is not accessible in current context">Child.NestedChild</warning>>
{
private static interface NestedChild extends NestedParent
{
@@ -1,3 +1,3 @@
class A<T> {
class B extends A<<error descr="B is not accessible in current context">B.B</error>>{}
class A<<warning descr="Type parameter 'T' is never used">T</warning>> {
class B extends A<<warning descr="B is not accessible in current context">B.B</warning>>{}
}
@@ -1,6 +1,6 @@
class A<T extends B.C>
class A<<warning descr="Type parameter 'T' is never used">T</warning> extends B.C>
{
interface C {}
}
class B extends A<<error descr="C is not accessible in current context">B.C</error>>{}
class B extends A<<warning descr="C is not accessible in current context">B.C</warning>>{}
@@ -3,6 +3,6 @@ interface A
interface B { }
}
interface C extends A, D<<error descr="B is not accessible in current context">C.B</error>> {}
interface C extends A, D<<warning descr="B is not accessible in current context">C.B</warning>> {}
interface D<T> {}
interface D<<warning descr="Type parameter 'T' is never used">T</warning>> {}
@@ -1,9 +1,9 @@
class Foo<T> {
class Foo<<warning descr="Type parameter 'T' is never used">T</warning>> {
static class Nested {};
}
class Bar extends Foo<<error descr="Nested is not accessible in current context">Bar.Nested</error>> {}
class Bar extends Foo<<warning descr="Nested is not accessible in current context">Bar.Nested</warning>> {}
interface FooI<T> {
interface FooI<<warning descr="Type parameter 'T' is never used">T</warning>> {
interface Nested {};
}
interface BarI extends FooI<<error descr="Nested is not accessible in current context">BarI.Nested</error>> {}
interface BarI extends FooI<<warning descr="Nested is not accessible in current context">BarI.Nested</warning>> {}
@@ -1,9 +1,9 @@
abstract class IdeaBugTest<M extends IdeaBugTest.Mapping>
abstract class IdeaBugTest<<warning descr="Type parameter 'M' is never used">M</warning> extends IdeaBugTest.Mapping>
{
static class Mapping {}
}
class BugTestSub extends IdeaBugTest<<error descr="Mapping is not accessible in current context">BugTestSub.SubMapping</error>>
class BugTestSub extends IdeaBugTest<<warning descr="Mapping is not accessible in current context">BugTestSub.SubMapping</warning>>
{
public abstract static class SubMapping extends Mapping {}
}
@@ -16,7 +16,7 @@ class BugTestSub1 extends IdeaBugTest<BugTestSub1.SubMapping>
class AbstractSettings {
interface State {}
}
interface SomeInterface<T> {}
interface SomeInterface<<warning descr="Type parameter 'T' is never used">T</warning>> {}
class Settings extends AbstractSettings implements SomeInterface<Settings.MyState> {
static class MyState implements State {}
}
@@ -160,7 +160,7 @@ Boolean.class, Boolean.TYPE /*,String[].class */ /*,BigDecimal.class*/);
///////////////////////
class Axx {
<T extends Runnable> T a() {
String s = a();
String s <warning descr="Though assignment is formal correct, it could lead to ClassCastException at runtime. Expected: 'String', actual: 'Runnable & String'">=</warning> a();
s.hashCode();
return null;
}