summaryrefslogtreecommitdiffstats
path: root/luni/src/main/java/java/util/Properties.java
diff options
context:
space:
mode:
Diffstat (limited to 'luni/src/main/java/java/util/Properties.java')
-rw-r--r--luni/src/main/java/java/util/Properties.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/luni/src/main/java/java/util/Properties.java b/luni/src/main/java/java/util/Properties.java
index 1731ad8..57c6a00 100644
--- a/luni/src/main/java/java/util/Properties.java
+++ b/luni/src/main/java/java/util/Properties.java
@@ -243,7 +243,7 @@ public class Properties extends Hashtable<Object, Object> {
*/
public synchronized void load(InputStream in) throws IOException {
if (in == null) {
- throw new NullPointerException();
+ throw new NullPointerException("in == null");
}
load(new InputStreamReader(in, "ISO-8859-1"));
}
@@ -276,7 +276,7 @@ public class Properties extends Hashtable<Object, Object> {
@SuppressWarnings("fallthrough")
public synchronized void load(Reader in) throws IOException {
if (in == null) {
- throw new NullPointerException();
+ throw new NullPointerException("in == null");
}
int mode = NONE, unicode = 0, count = 0;
char nextChar, buf[] = new char[40];
@@ -578,7 +578,7 @@ public class Properties extends Hashtable<Object, Object> {
public synchronized void loadFromXML(InputStream in) throws IOException,
InvalidPropertiesFormatException {
if (in == null) {
- throw new NullPointerException();
+ throw new NullPointerException("in == null");
}
if (builder == null) {
@@ -690,8 +690,10 @@ public class Properties extends Hashtable<Object, Object> {
public synchronized void storeToXML(OutputStream os, String comment,
String encoding) throws IOException {
- if (os == null || encoding == null) {
- throw new NullPointerException();
+ if (os == null) {
+ throw new NullPointerException("os == null");
+ } else if (encoding == null) {
+ throw new NullPointerException("encoding == null");
}
/*