Skip to content

Commit ebbce91

Browse files
alblueshipilev
authored andcommitted
8264681: Use the blessed modifier order in java.security
Reviewed-by: mullan, shade
1 parent ea5c55a commit ebbce91

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+160
-160
lines changed

src/java.security.jgss/share/classes/javax/security/auth/kerberos/EncryptionKey.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public final class EncryptionKey implements SecretKey {
5656
*
5757
* @serial
5858
*/
59-
final private KeyImpl key;
59+
private final KeyImpl key;
6060

6161
private transient boolean destroyed = false;
6262

src/java.security.jgss/share/classes/javax/security/auth/kerberos/KerberosCredMessage.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@
4949
*/
5050
public final class KerberosCredMessage implements Destroyable {
5151

52-
final private KerberosPrincipal sender;
53-
final private KerberosPrincipal recipient;
54-
final private byte[] message;
52+
private final KerberosPrincipal sender;
53+
private final KerberosPrincipal recipient;
54+
private final byte[] message;
5555

5656
private boolean destroyed = false;
5757

src/java.security.jgss/share/classes/javax/security/auth/kerberos/ServicePermission.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,22 +110,22 @@ public final class ServicePermission extends Permission
110110
/**
111111
* Initiate a security context to the specified service
112112
*/
113-
private final static int INITIATE = 0x1;
113+
private static final int INITIATE = 0x1;
114114

115115
/**
116116
* Accept a security context
117117
*/
118-
private final static int ACCEPT = 0x2;
118+
private static final int ACCEPT = 0x2;
119119

120120
/**
121121
* All actions
122122
*/
123-
private final static int ALL = INITIATE|ACCEPT;
123+
private static final int ALL = INITIATE|ACCEPT;
124124

125125
/**
126126
* No actions.
127127
*/
128-
private final static int NONE = 0x0;
128+
private static final int NONE = 0x0;
129129

130130
// the actions mask
131131
private transient int mask;

src/java.security.jgss/share/classes/sun/security/jgss/GSSNameImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public class GSSNameImpl implements GSSName {
9393
* its internal name type and getStringNameType() output are
9494
* always the new value.
9595
*/
96-
final static Oid oldHostbasedServiceName;
96+
static final Oid oldHostbasedServiceName;
9797

9898
static {
9999
Oid tmp = null;

src/java.security.jgss/share/classes/sun/security/jgss/HttpCaller.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
* info about what triggers the JGSS calls.
3333
*/
3434
public class HttpCaller extends GSSCaller {
35-
final private HttpCallerInfo hci;
35+
private final HttpCallerInfo hci;
3636

3737
public HttpCaller(HttpCallerInfo hci) {
3838
super("HTTP_CLIENT");

src/java.security.jgss/share/classes/sun/security/jgss/ProviderList.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public final class ProviderList {
116116
new HashMap<PreferencesEntry, MechanismFactory>(5);
117117
private HashSet<Oid> mechs = new HashSet<Oid>(5);
118118

119-
final private GSSCaller caller;
119+
private final GSSCaller caller;
120120

121121
public ProviderList(GSSCaller caller, boolean useNative) {
122122
this.caller = caller;

src/java.security.jgss/share/classes/sun/security/jgss/krb5/Krb5Context.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ class Krb5Context implements GSSContextSpi {
124124
private Credentials serviceCreds;
125125
private KrbApReq apReq;
126126
Ticket serviceTicket;
127-
final private GSSCaller caller;
127+
private final GSSCaller caller;
128128
private static final boolean DEBUG = Krb5Util.DEBUG;
129129

130130
/**

src/java.security.jgss/share/classes/sun/security/jgss/krb5/Krb5MechFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public final class Krb5MechFactory implements MechanismFactory {
6060
GSSName.NT_EXPORT_NAME,
6161
NT_GSS_KRB5_PRINCIPAL};
6262

63-
final private GSSCaller caller;
63+
private final GSSCaller caller;
6464

6565
private static Krb5CredElement getCredFromSubject(GSSNameSpi name,
6666
boolean initiate)

src/java.security.jgss/share/classes/sun/security/jgss/spnego/SpNegoContext.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public class SpNegoContext implements GSSContextSpi {
7979
private Oid internal_mech = null;
8080

8181
// the SpNegoMechFactory that creates this context
82-
final private SpNegoMechFactory factory;
82+
private final SpNegoMechFactory factory;
8383

8484
// debug property
8585
static final boolean DEBUG = GetBooleanAction

src/java.security.jgss/share/classes/sun/security/krb5/internal/NetClient.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ public static NetClient getInstance(String protocol, String hostname, int port,
4545
}
4646
}
4747

48-
abstract public void send(byte[] data) throws IOException;
49-
abstract public byte[] receive() throws IOException;
50-
abstract public void close() throws IOException;
48+
public abstract void send(byte[] data) throws IOException;
49+
public abstract byte[] receive() throws IOException;
50+
public abstract void close() throws IOException;
5151
}
5252

5353
class TCPClient extends NetClient {

src/java.security.jgss/share/classes/sun/security/krb5/internal/PAForUserEnc.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@
5656
*/
5757

5858
public class PAForUserEnc {
59-
final public PrincipalName name;
60-
final private EncryptionKey key;
61-
final public static String AUTH_PACKAGE = "Kerberos";
59+
public final PrincipalName name;
60+
private final EncryptionKey key;
61+
public static final String AUTH_PACKAGE = "Kerberos";
6262

6363
public PAForUserEnc(PrincipalName name, EncryptionKey key) {
6464
this.name = name;

src/java.security.jgss/share/classes/sun/security/krb5/internal/ReferralsCache.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ final class ReferralsCache {
4848
private static Map<ReferralCacheKey, Map<String, ReferralCacheEntry>>
4949
referralsMap = new HashMap<>();
5050

51-
static private final class ReferralCacheKey {
51+
private static final class ReferralCacheKey {
5252
private PrincipalName cname;
5353
private PrincipalName sname;
5454
ReferralCacheKey (PrincipalName cname, PrincipalName sname) {

src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/Des.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public final class Des {
5353
// string-to-key encoding. When set, the specified charset
5454
// name is used. Otherwise, the system default charset.
5555

56-
private final static String CHARSET = GetPropertyAction
56+
private static final String CHARSET = GetPropertyAction
5757
.privilegedGetProperty("sun.security.krb5.msinterop.des.s2kcharset");
5858

5959
private static final long[] bad_keys = {

src/java.security.jgss/share/classes/sun/security/krb5/internal/util/KrbDataInputStream.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public KrbDataInputStream(InputStream is){
6464
* @throws IOException if there are not enough bytes or it represents
6565
* a negative value
6666
*/
67-
final public int readLength4() throws IOException {
67+
public final int readLength4() throws IOException {
6868
int len = read(4);
6969
if (len < 0) {
7070
throw new IOException("Invalid encoding");

src/java.security.sasl/share/classes/com/sun/security/sasl/ClientFactoryImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
*
4949
* @author Rosanna Lee
5050
*/
51-
final public class ClientFactoryImpl implements SaslClientFactory {
51+
public final class ClientFactoryImpl implements SaslClientFactory {
5252
private static final String[] myMechs = {
5353
"EXTERNAL",
5454
"CRAM-MD5",

src/java.security.sasl/share/classes/com/sun/security/sasl/CramMD5Base.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ protected void finalize() {
141141
clearPassword();
142142
}
143143

144-
static private final int MD5_BLOCKSIZE = 64;
144+
private static final int MD5_BLOCKSIZE = 64;
145145
/**
146146
* Hashes its input arguments according to HMAC-MD5 (RFC 2104)
147147
* and returns the resulting digest in its ASCII representation.
@@ -155,7 +155,7 @@ protected void finalize() {
155155
* opad is the byte 0x5c repeated 64 times
156156
* text is the data to be protected
157157
*/
158-
final static String HMAC_MD5(byte[] key, byte[] text)
158+
static final String HMAC_MD5(byte[] key, byte[] text)
159159
throws NoSuchAlgorithmException {
160160

161161
MessageDigest md5 = MessageDigest.getInstance("MD5");

src/java.security.sasl/share/classes/com/sun/security/sasl/ServerFactoryImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
*
4141
* @author Rosanna Lee
4242
*/
43-
final public class ServerFactoryImpl implements SaslServerFactory {
43+
public final class ServerFactoryImpl implements SaslServerFactory {
4444
private static final String[] myMechs = {
4545
"CRAM-MD5", //
4646
};

src/java.security.sasl/share/classes/com/sun/security/sasl/digest/DigestMD5Base.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ public Object getNegotiatedProperty(String propName) {
272272
*/
273273

274274
/** This array maps the characters to their 6 bit values */
275-
private final static char[] pem_array = {
275+
private static final char[] pem_array = {
276276
// 0 1 2 3 4 5 6 7
277277
'A','B','C','D','E','F','G','H', // 0
278278
'I','J','K','L','M','N','O','P', // 1
@@ -807,9 +807,9 @@ private static void extractDirective(String key, byte[] value,
807807
*/
808808
class DigestIntegrity implements SecurityCtx {
809809
/* Used for generating integrity keys - specified in RFC 2831*/
810-
static final private String CLIENT_INT_MAGIC = "Digest session key to " +
810+
private static final String CLIENT_INT_MAGIC = "Digest session key to " +
811811
"client-to-server signing key magic constant";
812-
static final private String SVR_INT_MAGIC = "Digest session key to " +
812+
private static final String SVR_INT_MAGIC = "Digest session key to " +
813813
"server-to-client signing key magic constant";
814814

815815
/* Key pairs for integrity checking */
@@ -1086,9 +1086,9 @@ protected void incrementSeqNum() {
10861086
*/
10871087
final class DigestPrivacy extends DigestIntegrity implements SecurityCtx {
10881088
/* Used for generating privacy keys - specified in RFC 2831 */
1089-
static final private String CLIENT_CONF_MAGIC =
1089+
private static final String CLIENT_CONF_MAGIC =
10901090
"Digest H(A1) to client-to-server sealing key magic constant";
1091-
static final private String SVR_CONF_MAGIC =
1091+
private static final String SVR_CONF_MAGIC =
10921092
"Digest H(A1) to server-to-client sealing key magic constant";
10931093

10941094
private Cipher encCipher;

src/java.security.sasl/share/classes/com/sun/security/sasl/ntlm/NTLMClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ final class NTLMClient implements SaslClient {
9090
"com.sun.security.sasl.ntlm.version";
9191
private static final String NTLM_RANDOM =
9292
"com.sun.security.sasl.ntlm.random";
93-
private final static String NTLM_DOMAIN =
93+
private static final String NTLM_DOMAIN =
9494
"com.sun.security.sasl.ntlm.domain";
95-
private final static String NTLM_HOSTNAME =
95+
private static final String NTLM_HOSTNAME =
9696
"com.sun.security.sasl.ntlm.hostname";
9797

9898
private final Client client;

src/java.security.sasl/share/classes/com/sun/security/sasl/ntlm/NTLMServer.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,11 @@
8383

8484
final class NTLMServer implements SaslServer {
8585

86-
private final static String NTLM_VERSION =
86+
private static final String NTLM_VERSION =
8787
"com.sun.security.sasl.ntlm.version";
88-
private final static String NTLM_DOMAIN =
88+
private static final String NTLM_DOMAIN =
8989
"com.sun.security.sasl.ntlm.domain";
90-
private final static String NTLM_HOSTNAME =
90+
private static final String NTLM_HOSTNAME =
9191
"com.sun.security.sasl.ntlm.hostname";
9292
private static final String NTLM_RANDOM =
9393
"com.sun.security.sasl.ntlm.random";

src/java.security.sasl/share/classes/com/sun/security/sasl/util/PolicyUtils.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,17 @@
3434
*
3535
* @author Rosanna Lee
3636
*/
37-
final public class PolicyUtils {
37+
public final class PolicyUtils {
3838
// Can't create one of these
3939
private PolicyUtils() {
4040
}
4141

42-
public final static int NOPLAINTEXT = 0x0001;
43-
public final static int NOACTIVE = 0x0002;
44-
public final static int NODICTIONARY = 0x0004;
45-
public final static int FORWARD_SECRECY = 0x0008;
46-
public final static int NOANONYMOUS = 0x0010;
47-
public final static int PASS_CREDENTIALS = 0x0200;
42+
public static final int NOPLAINTEXT = 0x0001;
43+
public static final int NOACTIVE = 0x0002;
44+
public static final int NODICTIONARY = 0x0004;
45+
public static final int FORWARD_SECRECY = 0x0008;
46+
public static final int NOANONYMOUS = 0x0010;
47+
public static final int PASS_CREDENTIALS = 0x0200;
4848

4949
/**
5050
* Determines whether a mechanism's characteristics, as defined in flags,

src/java.xml.crypto/share/classes/javax/xml/crypto/dsig/CanonicalizationMethod.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,31 +62,31 @@ public interface CanonicalizationMethod extends Transform {
6262
* The <a href="http://www.w3.org/TR/2001/REC-xml-c14n-20010315">Canonical
6363
* XML (without comments)</a> canonicalization method algorithm URI.
6464
*/
65-
final static String INCLUSIVE =
65+
static final String INCLUSIVE =
6666
"http://www.w3.org/TR/2001/REC-xml-c14n-20010315";
6767

6868
/**
6969
* The
7070
* <a href="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments">
7171
* Canonical XML with comments</a> canonicalization method algorithm URI.
7272
*/
73-
final static String INCLUSIVE_WITH_COMMENTS =
73+
static final String INCLUSIVE_WITH_COMMENTS =
7474
"http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments";
7575

7676
/**
7777
* The <a href="http://www.w3.org/2001/10/xml-exc-c14n#">Exclusive
7878
* Canonical XML (without comments)</a> canonicalization method algorithm
7979
* URI.
8080
*/
81-
final static String EXCLUSIVE =
81+
static final String EXCLUSIVE =
8282
"http://www.w3.org/2001/10/xml-exc-c14n#";
8383

8484
/**
8585
* The <a href="http://www.w3.org/2001/10/xml-exc-c14n#WithComments">
8686
* Exclusive Canonical XML with comments</a> canonicalization method
8787
* algorithm URI.
8888
*/
89-
final static String EXCLUSIVE_WITH_COMMENTS =
89+
static final String EXCLUSIVE_WITH_COMMENTS =
9090
"http://www.w3.org/2001/10/xml-exc-c14n#WithComments";
9191

9292
/**
@@ -95,7 +95,7 @@ public interface CanonicalizationMethod extends Transform {
9595
*
9696
* @since 13
9797
*/
98-
final static String INCLUSIVE_11 = "http://www.w3.org/2006/12/xml-c14n11";
98+
static final String INCLUSIVE_11 = "http://www.w3.org/2006/12/xml-c14n11";
9999

100100
/**
101101
* The <a href="https://www.w3.org/TR/xml-c14n11/#WithComments">
@@ -104,7 +104,7 @@ public interface CanonicalizationMethod extends Transform {
104104
*
105105
* @since 13
106106
*/
107-
final static String INCLUSIVE_11_WITH_COMMENTS =
107+
static final String INCLUSIVE_11_WITH_COMMENTS =
108108
"http://www.w3.org/2006/12/xml-c14n11#WithComments";
109109

110110
/**

src/java.xml.crypto/share/classes/javax/xml/crypto/dsig/Manifest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public interface Manifest extends XMLStructure {
6969
* specified as the value of the <code>type</code> parameter of the
7070
* {@link Reference} class to identify the referent's type).
7171
*/
72-
final static String TYPE = "http://www.w3.org/2000/09/xmldsig#Manifest";
72+
static final String TYPE = "http://www.w3.org/2000/09/xmldsig#Manifest";
7373

7474
/**
7575
* Returns the Id of this <code>Manifest</code>.

src/java.xml.crypto/share/classes/javax/xml/crypto/dsig/SignatureProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public interface SignatureProperties extends XMLStructure {
6868
* can be specified as the value of the <code>type</code> parameter of the
6969
* {@link Reference} class to identify the referent's type).
7070
*/
71-
final static String TYPE =
71+
static final String TYPE =
7272
"http://www.w3.org/2000/09/xmldsig#SignatureProperties";
7373

7474
/**

src/java.xml.crypto/share/classes/javax/xml/crypto/dsig/Transform.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,32 +69,32 @@ public interface Transform extends XMLStructure, AlgorithmMethod {
6969
* The <a href="http://www.w3.org/2000/09/xmldsig#base64">Base64</a>
7070
* transform algorithm URI.
7171
*/
72-
final static String BASE64 = "http://www.w3.org/2000/09/xmldsig#base64";
72+
static final String BASE64 = "http://www.w3.org/2000/09/xmldsig#base64";
7373

7474
/**
7575
* The <a href="http://www.w3.org/2000/09/xmldsig#enveloped-signature">
7676
* Enveloped Signature</a> transform algorithm URI.
7777
*/
78-
final static String ENVELOPED =
78+
static final String ENVELOPED =
7979
"http://www.w3.org/2000/09/xmldsig#enveloped-signature";
8080

8181
/**
8282
* The <a href="http://www.w3.org/TR/1999/REC-xpath-19991116">XPath</a>
8383
* transform algorithm URI.
8484
*/
85-
final static String XPATH = "http://www.w3.org/TR/1999/REC-xpath-19991116";
85+
static final String XPATH = "http://www.w3.org/TR/1999/REC-xpath-19991116";
8686

8787
/**
8888
* The <a href="http://www.w3.org/2002/06/xmldsig-filter2">
8989
* XPath Filter 2</a> transform algorithm URI.
9090
*/
91-
final static String XPATH2 = "http://www.w3.org/2002/06/xmldsig-filter2";
91+
static final String XPATH2 = "http://www.w3.org/2002/06/xmldsig-filter2";
9292

9393
/**
9494
* The <a href="http://www.w3.org/TR/1999/REC-xslt-19991116">XSLT</a>
9595
* transform algorithm URI.
9696
*/
97-
final static String XSLT = "http://www.w3.org/TR/1999/REC-xslt-19991116";
97+
static final String XSLT = "http://www.w3.org/TR/1999/REC-xslt-19991116";
9898

9999
/**
100100
* Returns the algorithm-specific input parameters associated with this

src/java.xml.crypto/share/classes/javax/xml/crypto/dsig/XMLObject.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public interface XMLObject extends XMLStructure {
8686
* specified as the value of the <code>type</code> parameter of the
8787
* {@link Reference} class to identify the referent's type).
8888
*/
89-
final static String TYPE = "http://www.w3.org/2000/09/xmldsig#Object";
89+
static final String TYPE = "http://www.w3.org/2000/09/xmldsig#Object";
9090

9191
/**
9292
* Returns an {@link java.util.Collections#unmodifiableList unmodifiable

0 commit comments

Comments
 (0)