summaryrefslogtreecommitdiffstats
path: root/luni/src/main/java/java/util/logging/FileHandler.java
diff options
context:
space:
mode:
Diffstat (limited to 'luni/src/main/java/java/util/logging/FileHandler.java')
-rw-r--r--luni/src/main/java/java/util/logging/FileHandler.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/luni/src/main/java/java/util/logging/FileHandler.java b/luni/src/main/java/java/util/logging/FileHandler.java
index 6ffef87..1fd1dbf 100644
--- a/luni/src/main/java/java/util/logging/FileHandler.java
+++ b/luni/src/main/java/java/util/logging/FileHandler.java
@@ -261,15 +261,15 @@ public class FileHandler extends StreamHandler {
boolean hasUniqueID = false;
boolean hasGeneration = false;
- // TODO privilege code?
+ String homePath = System.getProperty("user.home");
+ if (homePath == null) {
+ throw new NullPointerException("System property \"user.home\" is null");
+ }
+ boolean homePathHasSepEnd = homePath.endsWith(File.separator);
String tempPath = System.getProperty("java.io.tmpdir");
- boolean tempPathHasSepEnd = (tempPath == null ? false : tempPath
- .endsWith(File.separator));
-
- String homePath = System.getProperty("user.home");
- boolean homePathHasSepEnd = (homePath == null ? false : homePath
- .endsWith(File.separator));
+ tempPath = tempPath == null ? homePath : tempPath;
+ boolean tempPathHasSepEnd = tempPath.endsWith(File.separator);
StringBuilder sb = new StringBuilder();
pattern = pattern.replace('/', File.separatorChar);