diff --git a/src/java.base/share/classes/java/io/ObjectInputFilter.java b/src/java.base/share/classes/java/io/ObjectInputFilter.java
index f339411593d09..c9722ea23e742 100644
--- a/src/java.base/share/classes/java/io/ObjectInputFilter.java
+++ b/src/java.base/share/classes/java/io/ObjectInputFilter.java
@@ -561,7 +561,7 @@ final class Config {
/**
* Lock object for filter and filter factory.
*/
- private final static Object serialFilterLock = new Object();
+ private static final Object serialFilterLock = new Object();
/**
* The property name for the filter.
@@ -906,7 +906,7 @@ static ObjectInputFilter createFilter2(String pattern) {
* used for all ObjectInputStreams that do not set their own filters.
*
*/
- final static class Global implements ObjectInputFilter {
+ static final class Global implements ObjectInputFilter {
/**
* The pattern used to create the filter.
*/
diff --git a/src/java.base/share/classes/java/io/ObjectStreamClass.java b/src/java.base/share/classes/java/io/ObjectStreamClass.java
index 82ba054f61f59..ff8a934a887da 100644
--- a/src/java.base/share/classes/java/io/ObjectStreamClass.java
+++ b/src/java.base/share/classes/java/io/ObjectStreamClass.java
@@ -2515,7 +2515,7 @@ synchronized MethodHandle putIfAbsentAndGet(ObjectStreamField[] fields, MethodHa
}
// a key composed of ObjectStreamField[] names and types
- static abstract class Key {
+ abstract static class Key {
abstract int length();
abstract String fieldName(int i);
abstract Class> fieldType(int i);
diff --git a/src/java.base/share/classes/java/lang/Object.java b/src/java.base/share/classes/java/lang/Object.java
index d0ad7d43cd9e3..b8085b230afb0 100644
--- a/src/java.base/share/classes/java/lang/Object.java
+++ b/src/java.base/share/classes/java/lang/Object.java
@@ -278,7 +278,7 @@ public String toString() {
*
By executing the body of a {@code synchronized} statement
* that synchronizes on the object.
*
For objects of type {@code Class,} by executing a
- * synchronized static method of that class.
+ * static synchronized method of that class.
*
*
* Only one thread at a time can own an object's monitor.
diff --git a/src/java.base/share/classes/java/lang/Process.java b/src/java.base/share/classes/java/lang/Process.java
index 5fad1b889d559..88e3e473e768f 100644
--- a/src/java.base/share/classes/java/lang/Process.java
+++ b/src/java.base/share/classes/java/lang/Process.java
@@ -845,7 +845,7 @@ public long skip(long n) throws IOException {
* A nested class to delay looking up the Charset for the native encoding.
*/
private static class CharsetHolder {
- private final static Charset nativeCharset;
+ private static final Charset nativeCharset;
static {
Charset cs;
try {
diff --git a/src/java.base/share/classes/java/lang/StackStreamFactory.java b/src/java.base/share/classes/java/lang/StackStreamFactory.java
index 328154dc04ebf..22cbb2e170a9f 100644
--- a/src/java.base/share/classes/java/lang/StackStreamFactory.java
+++ b/src/java.base/share/classes/java/lang/StackStreamFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -118,7 +118,7 @@ enum WalkerState {
* For example, StackFrameInfo for StackWalker::walk or
* Class> for StackWalker::getCallerClass
*/
- static abstract class AbstractStackWalker {
+ abstract static class AbstractStackWalker {
protected final StackWalker walker;
protected final Thread thread;
protected final int maxDepth;
@@ -783,7 +783,7 @@ protected void initFrameBuffer() {
*
* Each specialized AbstractStackWalker subclass may subclass the FrameBuffer.
*/
- static abstract class FrameBuffer {
+ abstract static class FrameBuffer {
static final int START_POS = 2; // 0th and 1st elements are reserved
// buffers for VM to fill stack frame info
diff --git a/src/java.base/share/classes/java/lang/System.java b/src/java.base/share/classes/java/lang/System.java
index fac6716243572..6d4137c7aa463 100644
--- a/src/java.base/share/classes/java/lang/System.java
+++ b/src/java.base/share/classes/java/lang/System.java
@@ -331,7 +331,7 @@ private static void checkIO() {
private static class CallersHolder {
// Remember callers of setSecurityManager() here so that warning
// is only printed once for each different caller
- final static Map, Boolean> callers
+ static final Map, Boolean> callers
= Collections.synchronizedMap(new WeakHashMap<>());
}
@@ -1595,7 +1595,7 @@ public void log(Level level, ResourceBundle bundle, String format,
*
* @since 9
*/
- public static abstract class LoggerFinder {
+ public abstract static class LoggerFinder {
/**
* The {@code RuntimePermission("loggerFinder")} is
* necessary to subclass and instantiate the {@code LoggerFinder} class,
diff --git a/src/java.base/share/classes/java/lang/WeakPairMap.java b/src/java.base/share/classes/java/lang/WeakPairMap.java
index 0e521dc901ad0..f274461a5dbac 100644
--- a/src/java.base/share/classes/java/lang/WeakPairMap.java
+++ b/src/java.base/share/classes/java/lang/WeakPairMap.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -340,7 +340,7 @@ public boolean equals(Object obj) {
/**
* Common abstract supertype of a pair of WeakReference peers.
*/
- private static abstract class WeakRefPeer extends WeakReference {
+ private abstract static class WeakRefPeer extends WeakReference {
WeakRefPeer(K k, ReferenceQueue