Skip to content

Commit 6150633

Browse files
committed
8276348: Use blessed modifier order in java.base
Reviewed-by: dfuchs, darcy, iris, rriggs, martin
1 parent 465d350 commit 6150633

21 files changed

+39
-39
lines changed

src/java.base/share/classes/java/io/ObjectInputFilter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ final class Config {
561561
/**
562562
* Lock object for filter and filter factory.
563563
*/
564-
private final static Object serialFilterLock = new Object();
564+
private static final Object serialFilterLock = new Object();
565565

566566
/**
567567
* The property name for the filter.
@@ -906,7 +906,7 @@ static ObjectInputFilter createFilter2(String pattern) {
906906
* used for all ObjectInputStreams that do not set their own filters.
907907
*
908908
*/
909-
final static class Global implements ObjectInputFilter {
909+
static final class Global implements ObjectInputFilter {
910910
/**
911911
* The pattern used to create the filter.
912912
*/

src/java.base/share/classes/java/io/ObjectStreamClass.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2515,7 +2515,7 @@ synchronized MethodHandle putIfAbsentAndGet(ObjectStreamField[] fields, MethodHa
25152515
}
25162516

25172517
// a key composed of ObjectStreamField[] names and types
2518-
static abstract class Key {
2518+
abstract static class Key {
25192519
abstract int length();
25202520
abstract String fieldName(int i);
25212521
abstract Class<?> fieldType(int i);

src/java.base/share/classes/java/lang/Object.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ public String toString() {
278278
* <li>By executing the body of a {@code synchronized} statement
279279
* that synchronizes on the object.
280280
* <li>For objects of type {@code Class,} by executing a
281-
* synchronized static method of that class.
281+
* static synchronized method of that class.
282282
* </ul>
283283
* <p>
284284
* Only one thread at a time can own an object's monitor.

src/java.base/share/classes/java/lang/Process.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,7 @@ public long skip(long n) throws IOException {
845845
* A nested class to delay looking up the Charset for the native encoding.
846846
*/
847847
private static class CharsetHolder {
848-
private final static Charset nativeCharset;
848+
private static final Charset nativeCharset;
849849
static {
850850
Charset cs;
851851
try {

src/java.base/share/classes/java/lang/StackStreamFactory.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -118,7 +118,7 @@ enum WalkerState {
118118
* For example, StackFrameInfo for StackWalker::walk or
119119
* Class<?> for StackWalker::getCallerClass
120120
*/
121-
static abstract class AbstractStackWalker<R, T> {
121+
abstract static class AbstractStackWalker<R, T> {
122122
protected final StackWalker walker;
123123
protected final Thread thread;
124124
protected final int maxDepth;
@@ -783,7 +783,7 @@ protected void initFrameBuffer() {
783783
*
784784
* Each specialized AbstractStackWalker subclass may subclass the FrameBuffer.
785785
*/
786-
static abstract class FrameBuffer<F> {
786+
abstract static class FrameBuffer<F> {
787787
static final int START_POS = 2; // 0th and 1st elements are reserved
788788

789789
// buffers for VM to fill stack frame info

src/java.base/share/classes/java/lang/System.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ private static void checkIO() {
331331
private static class CallersHolder {
332332
// Remember callers of setSecurityManager() here so that warning
333333
// is only printed once for each different caller
334-
final static Map<Class<?>, Boolean> callers
334+
static final Map<Class<?>, Boolean> callers
335335
= Collections.synchronizedMap(new WeakHashMap<>());
336336
}
337337

@@ -1595,7 +1595,7 @@ public void log(Level level, ResourceBundle bundle, String format,
15951595
*
15961596
* @since 9
15971597
*/
1598-
public static abstract class LoggerFinder {
1598+
public abstract static class LoggerFinder {
15991599
/**
16001600
* The {@code RuntimePermission("loggerFinder")} is
16011601
* necessary to subclass and instantiate the {@code LoggerFinder} class,

src/java.base/share/classes/java/lang/WeakPairMap.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -340,7 +340,7 @@ public boolean equals(Object obj) {
340340
/**
341341
* Common abstract supertype of a pair of WeakReference peers.
342342
*/
343-
private static abstract class WeakRefPeer<K> extends WeakReference<K> {
343+
private abstract static class WeakRefPeer<K> extends WeakReference<K> {
344344

345345
WeakRefPeer(K k, ReferenceQueue<Object> queue) {
346346
super(Objects.requireNonNull(k), queue);

src/java.base/share/classes/java/lang/invoke/AbstractConstantGroup.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -244,7 +244,7 @@ public Iterator<Object> iterator() {
244244
}
245245
}
246246

247-
static abstract
247+
abstract static
248248
class WithCache extends AbstractConstantGroup {
249249
@Stable final Object[] cache;
250250

src/java.base/share/classes/java/lang/invoke/CallSite.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2008, 2021, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -84,8 +84,8 @@ private static CallSite bootstrapDynamic(MethodHandles.Lookup caller, String nam
8484
* @author John Rose, JSR 292 EG
8585
* @since 1.7
8686
*/
87-
abstract
88-
public class CallSite {
87+
public
88+
abstract class CallSite {
8989

9090
// The actual payload of this call site.
9191
// Can be modified using {@link MethodHandleNatives#setCallSiteTargetNormal} or {@link MethodHandleNatives#setCallSiteTargetVolatile}.

src/java.base/share/classes/java/net/InetAddress.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ public class InetAddress implements java.io.Serializable {
215215
@Native static final int IPv6 = 2;
216216

217217
/* Specify address family preference */
218-
static transient final int preferIPv6Address;
218+
static final transient int preferIPv6Address;
219219

220220
static class InetAddressHolder {
221221
/**

0 commit comments

Comments
 (0)