1
1
#! /bin/bash
2
2
#
3
+ # Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
3
4
# Copyright 2015 Google, Inc. All Rights Reserved.
4
5
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5
6
#
@@ -26,12 +27,17 @@ usage() {
26
27
echo " $0 DIR ..."
27
28
echo " Modifies in place all the java source files found"
28
29
echo " in the given directories so that all java language modifiers"
29
- echo " are in the canonical order given by Modifier#toString() ."
30
+ echo " are in the canonical order."
30
31
echo " Tries to get it right even within javadoc comments,"
31
32
echo " and even if the list of modifiers spans 2 lines."
32
33
echo
33
34
echo " See:"
34
- echo " https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Modifier.html#toString-int-"
35
+ echo " https://docs.oracle.com/javase/specs/jls/se21/html/jls-8.html#jls-8.1.1"
36
+ echo " https://docs.oracle.com/javase/specs/jls/se21/html/jls-8.html#jls-8.3.1"
37
+ echo " https://docs.oracle.com/javase/specs/jls/se21/html/jls-8.html#jls-8.4.3"
38
+ echo " https://docs.oracle.com/javase/specs/jls/se21/html/jls-8.html#jls-8.8.3"
39
+ echo " https://docs.oracle.com/javase/specs/jls/se21/html/jls-9.html#jls-9.1.1"
40
+ echo " https://docs.oracle.com/javase/specs/jls/se21/html/jls-9.html#jls-9.4"
35
41
echo
36
42
echo " Example:"
37
43
echo " $0 jdk/src/java.base jdk/test/java/{util,io,lang}"
@@ -46,7 +52,7 @@ for dir in "${dirs[@]}"; do [[ -d "$dir" ]] || usage; done
46
52
47
53
declare -ar modifiers=(
48
54
public protected private
49
- abstract static final transient
55
+ abstract default static final sealed non-sealed transient
50
56
volatile synchronized native strictfp
51
57
)
52
58
declare -r SAVE_IFS=" $IFS "
0 commit comments