@@ -987,10 +987,9 @@ public static KeyStore getInstance(String type, Provider provider)
987987 * if no such property exists.
988988 * @see java.security.Security security properties
989989 */
990- @ SuppressWarnings ("removal" )
991990 public static final String getDefaultType () {
992- String kstype ;
993- kstype = AccessController .doPrivileged (new PrivilegedAction <>() {
991+ @ SuppressWarnings ( "removal" )
992+ String kstype = AccessController .doPrivileged (new PrivilegedAction <>() {
994993 public String run () {
995994 return Security .getProperty (KEYSTORE_TYPE );
996995 }
@@ -1957,7 +1956,6 @@ public ProtectionParameter getProtectionParameter(String alias)
19571956 * of either PasswordProtection or CallbackHandlerProtection; or
19581957 * if file does not exist or does not refer to a normal file
19591958 */
1960- @ SuppressWarnings ("removal" )
19611959 public static Builder newInstance (String type , Provider provider ,
19621960 File file , ProtectionParameter protection ) {
19631961 if ((type == null ) || (file == null ) || (protection == null )) {
@@ -1974,8 +1972,9 @@ public static Builder newInstance(String type, Provider provider,
19741972 ("File does not exist or it does not refer " +
19751973 "to a normal file: " + file );
19761974 }
1977- return new FileBuilder (type , provider , file , protection ,
1978- AccessController .getContext ());
1975+ @ SuppressWarnings ("removal" )
1976+ var acc = AccessController .getContext ();
1977+ return new FileBuilder (type , provider , file , protection , acc );
19791978 }
19801979
19811980 /**
0 commit comments