@@ -106,10 +106,19 @@ public final class KerberosPrincipal
106
106
*
107
107
* <p>If the input name does not contain a realm, the default realm
108
108
* is used. The default realm can be specified either in a Kerberos
109
- * configuration file or via the java.security.krb5.realm
109
+ * configuration file or via the {@systemproperty java.security.krb5.realm}
110
110
* system property. For more information, see the
111
111
* {@extLink security_guide_jgss_tutorial Kerberos Requirements}.
112
- * Additionally, if a security manager is
112
+ *
113
+ * <p>Note that when this class or any other Kerberos-related class is
114
+ * initially loaded and initialized, it may read and cache the default
115
+ * realm from the Kerberos configuration file or via the
116
+ * java.security.krb5.realm system property (the value will be empty if
117
+ * no default realm is specified), such that any subsequent calls to set
118
+ * or change the default realm by setting the java.security.krb5.realm
119
+ * system property may be ignored.
120
+ *
121
+ * <p>Additionally, if a security manager is
113
122
* installed, a {@link ServicePermission} must be granted and the service
114
123
* principal of the permission must minimally be inside the
115
124
* {@code KerberosPrincipal}'s realm. For example, if the result of
@@ -146,10 +155,19 @@ public KerberosPrincipal(String name) {
146
155
*
147
156
* <p>If the input name does not contain a realm, the default realm
148
157
* is used. The default realm can be specified either in a Kerberos
149
- * configuration file or via the java.security.krb5.realm
158
+ * configuration file or via the {@systemproperty java.security.krb5.realm}
150
159
* system property. For more information, see the
151
160
* {@extLink security_guide_jgss_tutorial Kerberos Requirements}.
152
- * Additionally, if a security manager is
161
+ *
162
+ * <p>Note that when this class or any other Kerberos-related class is
163
+ * initially loaded and initialized, it may read and cache the default
164
+ * realm from the Kerberos configuration file or via the
165
+ * java.security.krb5.realm system property (the value will be empty if
166
+ * no default realm is specified), such that any subsequent calls to set
167
+ * or change the default realm by setting the java.security.krb5.realm
168
+ * system property may be ignored.
169
+ *
170
+ * <p>Additionally, if a security manager is
153
171
* installed, a {@link ServicePermission} must be granted and the service
154
172
* principal of the permission must minimally be inside the
155
173
* {@code KerberosPrincipal}'s realm. For example, if the result of
0 commit comments