mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-09 20:42:52 +07:00
IDEA-120784 "Class is public should be declared in a file named <Classname>.java" for inner interface
This commit is contained in:
+2
-2
@@ -1,5 +1,5 @@
|
||||
// abstract methods
|
||||
public class a {
|
||||
class a {
|
||||
<error descr="Missing method body, or declare abstract">void f();</error>
|
||||
|
||||
}
|
||||
@@ -57,7 +57,7 @@ abstract class c8 {
|
||||
|
||||
|
||||
//------- if only Bottom were in other package, it should have been abstract --------------------------
|
||||
public abstract class AbstractTest {
|
||||
abstract class AbstractTest {
|
||||
|
||||
abstract String getName();
|
||||
|
||||
|
||||
+3
@@ -53,3 +53,6 @@ class Class2 {
|
||||
}
|
||||
}
|
||||
}
|
||||
class Ax {
|
||||
public interface B {}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
public class QQQ {
|
||||
class QQQ {
|
||||
{
|
||||
new Outer(){
|
||||
void foo(){
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// call to super must be first
|
||||
public class a {
|
||||
class a {
|
||||
a() {}
|
||||
a(int i) {}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
import static <error descr="Cannot resolve symbol 'MyConstants'">MyConstants</error>.*;
|
||||
import <error descr="Cannot resolve symbol 'MyConstants'">MyConstants</error>;
|
||||
|
||||
public class MyClient
|
||||
class MyClient
|
||||
{
|
||||
private int field = MyConstants.CONSTANT;
|
||||
}
|
||||
|
||||
+2
-2
@@ -24,7 +24,7 @@ class inner_holder {
|
||||
class inner {}
|
||||
}
|
||||
|
||||
public class C1_57 extends inner_holder {
|
||||
class C1_57 extends inner_holder {
|
||||
// inner instance available through inheritance
|
||||
protected class c extends inner {
|
||||
private class iii extends inner {}
|
||||
@@ -88,7 +88,7 @@ class ABIllegal extends <error descr="No enclosing instance of type 'A' is in sc
|
||||
}
|
||||
|
||||
|
||||
public class A42 {
|
||||
class A42 {
|
||||
class B {}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -61,7 +61,7 @@ class b1 extends a1 {
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
public class FooThrow
|
||||
class FooThrow
|
||||
{
|
||||
final Foo foo = new Foo(); // Can throw FooException
|
||||
FooThrow() throws Foo {
|
||||
|
||||
+3
-3
@@ -3,7 +3,7 @@ import java.io.*;
|
||||
import java.net.*;
|
||||
import java.awt.event.*;
|
||||
|
||||
public class a {
|
||||
class a {
|
||||
/**
|
||||
* javadoc should not be highlighted
|
||||
*/
|
||||
@@ -177,7 +177,7 @@ class a20Exotic {
|
||||
int n2 = k==0 ? (k2=9) : (k2=0);
|
||||
}
|
||||
|
||||
public class cX {
|
||||
class cX {
|
||||
final int i;
|
||||
cX() {
|
||||
this(1);
|
||||
@@ -208,7 +208,7 @@ class correct {
|
||||
}
|
||||
}
|
||||
|
||||
public class X {
|
||||
class X {
|
||||
final int i;
|
||||
X() {
|
||||
try {
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
public class X extends Y {}
|
||||
public class Y {
|
||||
class X extends Y {}
|
||||
class Y {
|
||||
|
||||
private static int x = 0;
|
||||
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ abstract class CompileErrorTest implements ICompileErrorTest {
|
||||
}
|
||||
}
|
||||
|
||||
public class CompileErrorTestExtended extends CompileErrorTest {
|
||||
class CompileErrorTestExtended extends CompileErrorTest {
|
||||
public void foo() throws Exception {
|
||||
try {
|
||||
super.foo();
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
import java.io.*;
|
||||
|
||||
public class Main {
|
||||
class Main {
|
||||
static interface A
|
||||
{
|
||||
interface B { }
|
||||
|
||||
+1
-1
@@ -4,6 +4,6 @@ import java.io.IOException;
|
||||
<warning descr="Unused import statement">import java.io.IOException;</warning>
|
||||
|
||||
|
||||
public class c {
|
||||
class c {
|
||||
public IOException m;
|
||||
}
|
||||
|
||||
+1
-1
@@ -8,4 +8,4 @@ import java.io.IOException;
|
||||
import java.io.IOException;
|
||||
|
||||
|
||||
public class c {}
|
||||
class c {}
|
||||
|
||||
+5
-5
@@ -2,7 +2,7 @@
|
||||
import java.io.*;
|
||||
import java.net.*;
|
||||
|
||||
public class a extends a1 {
|
||||
class a extends a1 {
|
||||
<error descr="Static method 'f()' in 'a' cannot override instance method 'f()' in 'a1'">public static void f()</error> { }
|
||||
<error descr="Instance method 'f1()' in 'a' cannot override static method 'f1()' in 'a1'">public void f1()</error> { }
|
||||
}
|
||||
@@ -75,13 +75,13 @@ class MyInterfaceImpl implements MyInterface
|
||||
|
||||
|
||||
// Sun-style inheritance
|
||||
public class Sunc {
|
||||
class Sunc {
|
||||
protected void f() {}
|
||||
}
|
||||
public class Suncc extends Sunc {
|
||||
class Suncc extends Sunc {
|
||||
public void f() {}
|
||||
}
|
||||
public interface Suni {
|
||||
interface Suni {
|
||||
public void f();
|
||||
}
|
||||
class Sunccc extends Suncc implements Suni {
|
||||
@@ -103,7 +103,7 @@ class StB extends StA {
|
||||
class Foo {
|
||||
protected static void foo(String s) {}
|
||||
}
|
||||
public class Bar extends Foo{
|
||||
class Bar extends Foo{
|
||||
<error descr="'foo(String)' in 'Bar' clashes with 'foo(String)' in 'Foo'; attempting to assign weaker access privileges ('private'); was 'protected'">private</error> static void foo(String s) {}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// unhandled exceptions from superclases/etc
|
||||
import java.io.*;
|
||||
import java.net.*;
|
||||
public class a {
|
||||
class a {
|
||||
a(int i) {}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
public class a extends Exception {
|
||||
class a extends Exception {
|
||||
private <warning descr="Private constructor 'a(java.lang.String)' is never used">a</warning>(String s) {
|
||||
super(s);
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
public class <warning descr="Class 'XXX' is never used">XXX</warning> {
|
||||
class <warning descr="Class 'XXX' is never used">XXX</warning> {
|
||||
void <warning descr="Method 'fffff()' is never used">fffff</warning>(){}
|
||||
public void <warning descr="Method 'asdfaffffff()' is never used">asdfaffffff</warning>(){}
|
||||
protected void <warning descr="Method 'dasklfjhsad()' is never used">dasklfjhsad</warning>(){}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
public class WithMain {
|
||||
class WithMain {
|
||||
|
||||
public static void main(String[] args){
|
||||
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
public class <warning descr="Class 'XXX' is never used">XXX</warning> {
|
||||
class <warning descr="Class 'XXX' is never used">XXX</warning> {
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import java.io.*;
|
||||
|
||||
public class x {
|
||||
class x {
|
||||
static {int i;}
|
||||
}
|
||||
+1
-1
@@ -134,7 +134,7 @@ import <error descr="Cannot resolve symbol 'sun'">sun</error>.security.action.Ge
|
||||
* @see java.lang.ClassLoader#resolveClass(java.lang.Class)
|
||||
* @since JDK1.0
|
||||
*/
|
||||
public abstract class ClassLoader {
|
||||
abstract class ClassLoader {
|
||||
|
||||
private static native void registerNatives();
|
||||
static {
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@ import java.util.*;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public class Thinlet extends Container //java
|
||||
class Thinlet extends Container //java
|
||||
implements Runnable, Serializable { //java
|
||||
//midp public class Thinlet extends Canvas implements CommandListener {
|
||||
|
||||
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
package x;
|
||||
public class X {
|
||||
public interface B {}
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
package x;
|
||||
<error descr="Class 'DD' is public, should be declared in a file named 'DD.java'">public class DD</error> {}
|
||||
+1
-1
@@ -5,7 +5,7 @@ import x.n.X2;
|
||||
import x.n.X3;
|
||||
|
||||
@Deprecated
|
||||
public class Y {
|
||||
class Y {
|
||||
X1 x1;
|
||||
x.n.Class s;
|
||||
X2 x2;
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ import x.n.*;
|
||||
import java.lang.Class;
|
||||
|
||||
@Deprecated
|
||||
public class Y {
|
||||
class Y {
|
||||
X1 x1;
|
||||
x.n.Class s;
|
||||
X2 x2;
|
||||
|
||||
Reference in New Issue
Block a user