IDEA-120784 "Class is public should be declared in a file named <Classname>.java" for inner interface

This commit is contained in:
Alexey Kudravtsev
2014-02-18 13:55:52 +04:00
parent 65642d998f
commit c7b78f76a2
309 changed files with 381 additions and 364 deletions
@@ -1,4 +1,4 @@
public class SampleExtendsWildcard {
class SampleExtendsWildcard {
public void highlightsTheBug(Stream<String> stream) {
stream.flatMap((Block<?> sink, String element) -> {});
}
@@ -1,6 +1,6 @@
import java.util.List;
public class Sample {
class Sample {
interface Fun<A extends List <String>, B> {
B f(A a);
}
@@ -1,4 +1,4 @@
public class Sample {
class Sample {
static <T> T foo(T t) { return null; }
static {
@@ -2,7 +2,7 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
public class Sample {
class Sample {
static List<String> getList(Function<Object, String> function, ArrayList<? super String> objects) {
return transform(objects, new ArrayList<String>(), function);
@@ -1,4 +1,4 @@
public class Sample {
class Sample {
interface G<A> {}
interface G1 extends G {}
@@ -1,4 +1,4 @@
public class Sample {
class Sample {
interface G<A> {}
interface G1 extends G {}
@@ -1,4 +1,4 @@
public class Test<E_OUT> {
class Test<E_OUT> {
final <P_IN_WRAP_SINK> Sink<P_IN_WRAP_SINK> wrapSink(Sink<E_OUT> sink) {
return null;
}
@@ -1,6 +1,6 @@
import java.util.List;
public class Bug
class Bug
{
void foo(List<I> futures, I1<Object> callable){
@@ -1,11 +1,10 @@
import java.util.function.Function;
import java.util.function.Supplier;
import java.util.stream.Collector;
import java.util.stream.Stream;
import java.util.*;
public class X1 {
class X1 {
void test(Stream<Integer> stream) {
Function<List<Integer>, List<Integer>> unmodifiableList = Collections::unmodifiableList;
stream.collect(collectingAndThen(toList(), unmodifiableList)).remove(0);
@@ -14,7 +14,7 @@ class SS {
}
public class Issue1 {
class Issue1 {
public static void main(String[] args) {
@@ -1,5 +1,5 @@
import java.util.*;
public class TestInfer
class TestInfer
{
static <V, T extends V> List<V> singleton(T item)
{
@@ -1,5 +1,5 @@
import java.util.*;
public class DiamondTest {
class DiamondTest {
public <U> void foo(ArrayList<U> p) {}
@@ -1,6 +1,6 @@
import java.util.Map;
public class IDEA10166 {
class IDEA10166 {
interface BiConsumer<T, U> {
void accept(T t, U u);
}
@@ -1,5 +1,5 @@
import java.util.*;
public class Main {
class Main {
public static <T> T foo() {return null;}
public static <B> List<B> bar(B b) {return null;}
@@ -1,7 +1,7 @@
import java.util.List;
import java.util.Set;
public class Sample {
class Sample {
interface L<T> {
List<T> foo();
}
@@ -2,7 +2,7 @@ import java.util.Arrays;
import static java.lang.System.out;
public final class LambdaMain {
final class LambdaMain {
public static void main(final String... args) {
for (final A<String, X> a : Arrays.<A<String, X>>asList(new A<String, X>() {
@Override
@@ -1,4 +1,4 @@
public class CyclicReferenceTest {
class CyclicReferenceTest {
void test(Match<String, Integer> match) {
Match<String, Integer> matcher = match.or(s -> Optional.empty(), i -> 2);
Match<String, Integer> matcher1 = match.or(s -> s.startsWith("_") ? Optional.of(1) : Optional.empty(), i -> 2);
@@ -1,4 +1,4 @@
public class Main {
class Main {
interface Function<T, U> {
T fun(U t);
@@ -1,5 +1,5 @@
import java.util.*;
public class BugReportLambdaSquiggles<T> {
class BugReportLambdaSquiggles<T> {
private T t;
public <V> List<V> flatMap(Mapper<T, List<V>> mapper) {
@@ -1,5 +1,5 @@
import java.util.*;
public class Main1 {
class Main1 {
interface I<T> {
List<T> f();
@@ -1,4 +1,4 @@
public class FooBar {
class FooBar {
private static final class Bar2 {
private Bar2() {
}
@@ -1,4 +1,4 @@
public interface Iso<T, R> {
interface Iso<T, R> {
T deply(R r);
default Iso<R, T> inverse() {
@@ -1,4 +1,4 @@
public interface Nat {
interface Nat {
interface Nil extends Nat {}
}
@@ -154,7 +154,7 @@ class MyTest5 {
}
}
public class MyTest6 {
class MyTest6 {
interface I {
void _(Integer i);
}
@@ -169,7 +169,7 @@ public class MyTest6 {
}
}
public class MyTest7 {
class MyTest7 {
interface I {
void _(Number i);
}
@@ -1,4 +1,4 @@
public class Main {
class Main {
public static <T> void make(final Consumer<? super T> consumer) {
Sink<T> accept = (Sink<T>) consumer::accept;
Consumer<T> accept1 = (Consumer<T>)consumer::accept;
@@ -1,7 +1,7 @@
import java.util.ArrayList;
import java.util.List;
public class IDEA99970 {
class IDEA99970 {
public static <T, C> Collector<T, C> toCollection(Supplier<C> collectionFactory) {
return null;
}
@@ -1,4 +1,4 @@
public class InspectorTest {
class InspectorTest {
interface Stream<T> {
<A> A[] toArray(IntFunction<A[]> generator);
}
@@ -1,4 +1,4 @@
public class Test {
class Test {
interface I {
<T> String m();
@@ -4,7 +4,7 @@ import java.util.function.Function;
import java.util.stream.Collector;
import java.util.stream.Stream;
public class Bug
class Bug
{
void foo(Stream<Bug> words){
@@ -2,7 +2,7 @@ import java.util.List;
import java.util.function.BinaryOperator;
import java.util.function.Function;
public class FooBar<K> {
class FooBar<K> {
void foo(List<K > s) {}
<T, U> List<T> bar(BinaryOperator<U> kk, Function<T, U> f){
return null;
@@ -1,4 +1,4 @@
public class Tmp {
class Tmp {
Integer toInt(Number num) {
return null;
}
@@ -1,4 +1,4 @@
public class Tmp
class Tmp
{
interface BiFunction<T, U, R> {
R apply(T t, U u);
@@ -8,7 +8,7 @@ interface Function<T, R> {
R apply(T t);
}
public final class Collectors {
final class Collectors {
public static <T>
Collector<List<T>> toList() {
return null;
@@ -17,7 +17,7 @@ interface S<T> {
interface F<TF> {}
public final class Collectors {
final class Collectors {
public static <T>
Collector<List<T>> toList() {
return null;
@@ -1,4 +1,4 @@
public class Test<A,B> {
class Test<A,B> {
public static <P,Q> Test<P,Q> left(P p) { return null; }
public static <P,Q> Test<P,Q> right(Q q) { return null; }
public <C> C either(Function<A, C> leftFn, Function<B, C> rightFn){ return null; }
@@ -1,4 +1,4 @@
public abstract class Tmp<T> {
abstract class Tmp<T> {
private String concat(Tmp<String> tmp) {
return tmp.collect(StringBuilder::new, StringBuilder::append, StringBuilder::append).toString();
}
@@ -1,4 +1,4 @@
public class Test {
class Test {
{
addListener(this::editPropertyChanged);
@@ -1,4 +1,4 @@
public class Tmp
class Tmp
{
void foo(){}
@@ -2,7 +2,7 @@ import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
public class Box<TBox>
class Box<TBox>
{
public TBox getValue()
@@ -1,7 +1,7 @@
import java.util.List;
import java.util.concurrent.Callable;
public class Tmp {
class Tmp {
static void doo(Runnable action){}
static void doo(Callable<?> action){}
@@ -1,6 +1,6 @@
import java.util.Comparator;
public class Test<T extends Test<T>> {
class Test<T extends Test<T>> {
Comparator<Test<?>> bySize = Comparator.comparingInt(Test::size);
public int size() {