Order modifiers to align with JLS

This commit also applies Checkstyle ModifierOrder to enforce it.

See gh-31368
This commit is contained in:
Johnny Lim
2023-10-05 21:52:29 +09:00
committed by Stéphane Nicoll
parent f60791a8e2
commit 919faa2ce2
108 changed files with 175 additions and 172 deletions

View File

@@ -346,7 +346,7 @@ class BridgeMethodResolverTests {
}
public static abstract class Bar<T> {
public abstract static class Bar<T> {
void someMethod(Map<?, ?> m, Object otherArg) {
}
@@ -358,7 +358,7 @@ class BridgeMethodResolverTests {
}
public static abstract class InterBar<T> extends Bar<T> {
public abstract static class InterBar<T> extends Bar<T> {
}
@@ -380,7 +380,7 @@ class BridgeMethodResolverTests {
}
public static abstract class AbstractDateAdder implements Adder<Date> {
public abstract static class AbstractDateAdder implements Adder<Date> {
@Override
public abstract void add(Date date);
@@ -475,7 +475,7 @@ class BridgeMethodResolverTests {
}
static abstract class AbstractDaoImpl<T, S> implements Dao<T, S> {
abstract static class AbstractDaoImpl<T, S> implements Dao<T, S> {
protected T object;
@@ -706,7 +706,7 @@ class BridgeMethodResolverTests {
}
public static abstract class BaseUserInitiatedEvent extends GenericEvent implements UserInitiatedEvent {
public abstract static class BaseUserInitiatedEvent extends GenericEvent implements UserInitiatedEvent {
}
@@ -743,7 +743,7 @@ class BridgeMethodResolverTests {
@SuppressWarnings({"unused", "unchecked"})
public static abstract class GenericEventBroadcasterImpl<T extends Event>
public abstract static class GenericEventBroadcasterImpl<T extends Event>
extends GenericBroadcasterImpl implements EventBroadcaster {
private Class<T>[] subscribingEvents;
@@ -1053,7 +1053,7 @@ class BridgeMethodResolverTests {
}
public static abstract class AbstractDao<T> {
public abstract static class AbstractDao<T> {
public void save(T t) {
}
@@ -1081,7 +1081,7 @@ class BridgeMethodResolverTests {
}
public static abstract class BusinessGenericDao<T, PK extends Serializable>
public abstract static class BusinessGenericDao<T, PK extends Serializable>
implements DaoInterface<T, PK> {
public void save(T object) {
@@ -1181,7 +1181,7 @@ class BridgeMethodResolverTests {
@SuppressWarnings("unused")
private static abstract class AbstractImplementsInterface<D extends DomainObjectSuper> implements IGenericInterface<D> {
private abstract static class AbstractImplementsInterface<D extends DomainObjectSuper> implements IGenericInterface<D> {
@Override
public <T> void doSomething(D domainObject, T value) {
@@ -1297,7 +1297,7 @@ class BridgeMethodResolverTests {
// SPR-16103 classes
//-------------------
public static abstract class BaseEntity {
public abstract static class BaseEntity {
}
public static class FooEntity extends BaseEntity {

View File

@@ -376,9 +376,9 @@ class GenericTypeResolverTests {
class TestImpl<I extends A, T extends B<I>> extends TestIfc<T>{
}
static abstract class BiGenericClass<T extends B<?>, V extends A> {}
abstract static class BiGenericClass<T extends B<?>, V extends A> {}
static abstract class SpecializedBiGenericClass<U extends C> extends BiGenericClass<D, U>{}
abstract static class SpecializedBiGenericClass<U extends C> extends BiGenericClass<D, U>{}
static class TypeFixedBiGenericClass extends SpecializedBiGenericClass<E> {}
@@ -392,12 +392,12 @@ class GenericTypeResolverTests {
}
}
static abstract class WithArrayBase<T> {
abstract static class WithArrayBase<T> {
public abstract T[] array(T... args);
}
static abstract class WithArray<T> extends WithArrayBase<T> {
abstract static class WithArray<T> extends WithArrayBase<T> {
}
interface Repository<T, ID extends Serializable> {

View File

@@ -1388,7 +1388,7 @@ class AnnotatedElementUtilsTests {
void handleFromInterface();
}
static abstract class AbstractClassWithInheritedAnnotation<T> implements InterfaceWithInheritedAnnotation {
abstract static class AbstractClassWithInheritedAnnotation<T> implements InterfaceWithInheritedAnnotation {
@Transactional
public abstract void handle();

View File

@@ -1133,7 +1133,7 @@ class AnnotationUtilsTests {
boolean readOnly() default false;
}
public static abstract class Foo<T> {
public abstract static class Foo<T> {
@Order(1)
public abstract void something(T arg);
@@ -1243,7 +1243,7 @@ class AnnotationUtilsTests {
}
}
public static abstract class BaseClassWithGenericAnnotatedMethod<T> {
public abstract static class BaseClassWithGenericAnnotatedMethod<T> {
@Order
abstract void foo(T t);

View File

@@ -770,7 +770,7 @@ class AnnotationsScannerTests {
void method();
}
static abstract class MultipleMethods implements MultipleMethodsInterface {
abstract static class MultipleMethods implements MultipleMethodsInterface {
@TestAnnotation1
public void method() {
@@ -800,7 +800,7 @@ class AnnotationsScannerTests {
void method(T argument);
}
static abstract class GenericNonOverride implements GenericNonOverrideInterface<String> {
abstract static class GenericNonOverride implements GenericNonOverrideInterface<String> {
@TestAnnotation1
public void method(StringBuilder argument) {

View File

@@ -2695,7 +2695,7 @@ class MergedAnnotationsTests {
void handleFromInterface();
}
static abstract class AbstractClassWithInheritedAnnotation<T>
abstract static class AbstractClassWithInheritedAnnotation<T>
implements InterfaceWithInheritedAnnotation {
@Transactional
@@ -2999,7 +2999,7 @@ class MergedAnnotationsTests {
}
}
public static abstract class SimpleGeneric<T> {
public abstract static class SimpleGeneric<T> {
@Order(1)
public abstract void something(T arg);
@@ -3089,7 +3089,7 @@ class MergedAnnotationsTests {
}
}
public static abstract class BaseClassWithGenericAnnotatedMethod<T> {
public abstract static class BaseClassWithGenericAnnotatedMethod<T> {
@Order
abstract void foo(T t);

View File

@@ -276,7 +276,7 @@ class CollectionToCollectionConverterTests {
public EnumSet<MyEnum> enumSet;
public static abstract class BaseResource implements Resource {
public abstract static class BaseResource implements Resource {
@Override
public InputStream getInputStream() throws IOException {

View File

@@ -94,7 +94,7 @@ class SimpleAsyncTaskExecutorTests {
}
private static abstract class AbstractNotifyingRunnable implements Runnable {
private abstract static class AbstractNotifyingRunnable implements Runnable {
private final Object monitor;

View File

@@ -269,7 +269,7 @@ public abstract class AbstractMethodMetadataTests {
}
public static abstract class WithDirectAnnotation {
public abstract static class WithDirectAnnotation {
@Tag
@DirectAnnotation
@@ -277,7 +277,7 @@ public abstract class AbstractMethodMetadataTests {
}
public static abstract class WithMetaAnnotation {
public abstract static class WithMetaAnnotation {
@Tag
@MetaAnnotation
@@ -294,7 +294,7 @@ public abstract class AbstractMethodMetadataTests {
@interface MetaAnnotation {
}
public static abstract class WithAnnotationAttributes {
public abstract static class WithAnnotationAttributes {
@Tag
@AnnotationAttributes(name = "test", size = 1)
@@ -302,7 +302,7 @@ public abstract class AbstractMethodMetadataTests {
}
public static abstract class WithMetaAnnotationAttributes {
public abstract static class WithMetaAnnotationAttributes {
@Tag
@MetaAnnotationAttributes1