Order modifiers to align with JLS
This commit also applies Checkstyle ModifierOrder to enforce it. See gh-31368
This commit is contained in:
committed by
Stéphane Nicoll
parent
f60791a8e2
commit
919faa2ce2
@@ -32,7 +32,7 @@ public class DefaultNamingPolicy implements NamingPolicy {
|
||||
/**
|
||||
* This allows to test collisions of {@code key.hashCode()}.
|
||||
*/
|
||||
private final static boolean STRESS_HASH_CODE = Boolean.getBoolean("org.springframework.cglib.test.stressHashCodes");
|
||||
private static final boolean STRESS_HASH_CODE = Boolean.getBoolean("org.springframework.cglib.test.stressHashCodes");
|
||||
|
||||
@Override
|
||||
public String getClassName(String prefix, String source, Object key, Predicate names) {
|
||||
|
||||
@@ -82,7 +82,7 @@ abstract public class KeyFactory {
|
||||
TypeUtils.parseSignature("int getSort()");
|
||||
|
||||
//generated numbers:
|
||||
private final static int PRIMES[] = {
|
||||
private static final int PRIMES[] = {
|
||||
11, 73, 179, 331,
|
||||
521, 787, 1213, 1823,
|
||||
2609, 3691, 5189, 7247,
|
||||
|
||||
@@ -32,7 +32,7 @@ import org.springframework.util.ReflectionUtils;
|
||||
* in public static final members. The {@code asXXXX} methods of this class
|
||||
* allow these constant values to be accessed via their string names.
|
||||
*
|
||||
* <p>Consider class Foo containing {@code public final static int CONSTANT1 = 66;}
|
||||
* <p>Consider class Foo containing {@code public static final int CONSTANT1 = 66;}
|
||||
* An instance of this class wrapping {@code Foo.class} will return the constant value
|
||||
* of 66 from its {@code asNumber} method given the argument {@code "CONSTANT1"}.
|
||||
*
|
||||
|
||||
@@ -64,7 +64,7 @@ import org.springframework.util.Assert;
|
||||
*/
|
||||
public abstract class DataBufferUtils {
|
||||
|
||||
private final static Log logger = LogFactory.getLog(DataBufferUtils.class);
|
||||
private static final Log logger = LogFactory.getLog(DataBufferUtils.class);
|
||||
|
||||
private static final Consumer<DataBuffer> RELEASE_CONSUMER = DataBufferUtils::release;
|
||||
|
||||
@@ -868,7 +868,7 @@ public abstract class DataBufferUtils {
|
||||
/**
|
||||
* Base class for a {@link NestedMatcher}.
|
||||
*/
|
||||
private static abstract class AbstractNestedMatcher implements NestedMatcher {
|
||||
private abstract static class AbstractNestedMatcher implements NestedMatcher {
|
||||
|
||||
private final byte[] delimiter;
|
||||
|
||||
|
||||
@@ -163,7 +163,7 @@ public abstract class LogMessage implements CharSequence {
|
||||
}
|
||||
|
||||
|
||||
private static abstract class FormatMessage extends LogMessage {
|
||||
private abstract static class FormatMessage extends LogMessage {
|
||||
|
||||
protected final String format;
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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> {
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -94,7 +94,7 @@ class SimpleAsyncTaskExecutorTests {
|
||||
}
|
||||
|
||||
|
||||
private static abstract class AbstractNotifyingRunnable implements Runnable {
|
||||
private abstract static class AbstractNotifyingRunnable implements Runnable {
|
||||
|
||||
private final Object monitor;
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -95,7 +95,7 @@ class VirtualThreadTaskExecutorTests {
|
||||
}
|
||||
|
||||
|
||||
private static abstract class AbstractNotifyingRunnable implements Runnable {
|
||||
private abstract static class AbstractNotifyingRunnable implements Runnable {
|
||||
|
||||
private final Object monitor;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user