equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
106 * @since 1.1 |
106 * @since 1.1 |
107 */ |
107 */ |
108 public abstract class Provider extends Properties { |
108 public abstract class Provider extends Properties { |
109 |
109 |
110 // Declare serialVersionUID to be compatible with JDK1.1 |
110 // Declare serialVersionUID to be compatible with JDK1.1 |
|
111 @java.io.Serial |
111 private static final long serialVersionUID = -4298000515446427739L; |
112 private static final long serialVersionUID = -4298000515446427739L; |
112 |
113 |
113 private static final sun.security.util.Debug debug = |
114 private static final sun.security.util.Debug debug = |
114 sun.security.util.Debug.getInstance("provider", "Provider"); |
115 sun.security.util.Debug.getInstance("provider", "Provider"); |
115 |
116 |
400 |
401 |
401 /** |
402 /** |
402 * Reads a property list (key and element pairs) from the input stream. |
403 * Reads a property list (key and element pairs) from the input stream. |
403 * |
404 * |
404 * @param inStream the input stream. |
405 * @param inStream the input stream. |
405 * @exception IOException if an error occurred when reading from the |
406 * @throws IOException if an error occurred when reading from the |
406 * input stream. |
407 * input stream. |
407 * @see java.util.Properties#load |
408 * @see java.util.Properties#load |
408 */ |
409 */ |
409 @Override |
410 @Override |
410 public synchronized void load(InputStream inStream) throws IOException { |
411 public synchronized void load(InputStream inStream) throws IOException { |
888 * is, then its double value will be used to populate both fields. |
889 * is, then its double value will be used to populate both fields. |
889 * |
890 * |
890 * @param in the {@code ObjectInputStream} to read |
891 * @param in the {@code ObjectInputStream} to read |
891 * @serial |
892 * @serial |
892 */ |
893 */ |
|
894 @java.io.Serial |
893 private void readObject(ObjectInputStream in) |
895 private void readObject(ObjectInputStream in) |
894 throws IOException, ClassNotFoundException { |
896 throws IOException, ClassNotFoundException { |
895 Map<Object,Object> copy = new HashMap<>(); |
897 Map<Object,Object> copy = new HashMap<>(); |
896 for (Map.Entry<Object,Object> entry : super.entrySet()) { |
898 for (Map.Entry<Object,Object> entry : super.entrySet()) { |
897 copy.put(entry.getKey(), entry.getValue()); |
899 copy.put(entry.getKey(), entry.getValue()); |
1251 return s; |
1253 return s; |
1252 } |
1254 } |
1253 } |
1255 } |
1254 synchronized (this) { |
1256 synchronized (this) { |
1255 ensureLegacyParsed(); |
1257 ensureLegacyParsed(); |
1256 } |
1258 if (legacyMap != null && !legacyMap.isEmpty()) { |
1257 if (legacyMap != null && !legacyMap.isEmpty()) { |
1259 return legacyMap.get(key); |
1258 return legacyMap.get(key); |
1260 } |
1259 } |
1261 } |
1260 return null; |
1262 return null; |
1261 } |
1263 } |
1262 |
1264 |
1263 // ServiceKey from previous getService() call |
1265 // ServiceKey from previous getService() call |