diff --git a/src/java.base/share/classes/java/util/Properties.java b/src/java.base/share/classes/java/util/Properties.java index 015cdbc7107..6e02c3f5a23 100644 --- a/src/java.base/share/classes/java/util/Properties.java +++ b/src/java.base/share/classes/java/util/Properties.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -70,10 +70,10 @@ import jdk.internal.util.xml.PropertiesDefaultHandler; * {@code Properties} object. Their use is strongly discouraged as they * allow the caller to insert entries whose keys or values are not * {@code Strings}. The {@code setProperty} method should be used - * instead. If the {@code store} or {@code save} method is called + * instead. If the {@code store}, {@code save}, or {@code list} method is called * on a "compromised" {@code Properties} object that contains a * non-{@code String} key or value, the call will fail. Similarly, - * the call to the {@code propertyNames} or {@code list} method + * the call to the {@code propertyNames} method * will fail if it is called on a "compromised" {@code Properties} * object that contains a non-{@code String} key. * @@ -1215,8 +1215,8 @@ public class Properties extends Hashtable { * This method is useful for debugging. * * @param out an output stream. - * @throws ClassCastException if any key in this property list - * is not a string. + * @throws ClassCastException if either a key or a value + * in this property list is not a string. */ public void list(PrintStream out) { out.println("-- listing properties --"); @@ -1237,8 +1237,8 @@ public class Properties extends Hashtable { * This method is useful for debugging. * * @param out an output stream. - * @throws ClassCastException if any key in this property list - * is not a string. + * @throws ClassCastException if either a key or a value + * in this property list is not a string. * @since 1.1 */ /*