summaryrefslogtreecommitdiff
path: root/src/jline
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-03-19 15:27:01 +0000
committerPaul Phillips <paulp@improving.org>2011-03-19 15:27:01 +0000
commit8f0ff8bc2aaaa5299ebe4f617ab9e28443f994bd (patch)
tree52ec2ea9bd731813332a6c47aafb251ac8ad1b50 /src/jline
parentffa29b1f312dfe12186fbe47ac8273ee9599eaf6 (diff)
downloadscala-8f0ff8bc2aaaa5299ebe4f617ab9e28443f994bd.tar.gz
scala-8f0ff8bc2aaaa5299ebe4f617ab9e28443f994bd.tar.bz2
scala-8f0ff8bc2aaaa5299ebe4f617ab9e28443f994bd.zip
A couple more minor tweaks to power mode, and m...
A couple more minor tweaks to power mode, and more importantly, fix for a jline NPE provoked if your classloaders loaded classes in a way other than it expected. No review.
Diffstat (limited to 'src/jline')
-rw-r--r--src/jline/src/main/java/scala/tools/jline/console/completer/CandidateListCompletionHandler.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/jline/src/main/java/scala/tools/jline/console/completer/CandidateListCompletionHandler.java b/src/jline/src/main/java/scala/tools/jline/console/completer/CandidateListCompletionHandler.java
index 002f36b52e..fa5bfd2777 100644
--- a/src/jline/src/main/java/scala/tools/jline/console/completer/CandidateListCompletionHandler.java
+++ b/src/jline/src/main/java/scala/tools/jline/console/completer/CandidateListCompletionHandler.java
@@ -181,12 +181,13 @@ public class CandidateListCompletionHandler
private static final
ResourceBundle
bundle =
- ResourceBundle.getBundle(CandidateListCompletionHandler.class.getName(),
- Locale.getDefault(),
- CandidateListCompletionHandler.class.getClassLoader());
+ ResourceBundle.getBundle(CandidateListCompletionHandler.class.getName(), Locale.getDefault());
public String format(final Object... args) {
- return String.format(bundle.getString(name()), args);
+ if (bundle == null)
+ return "";
+ else
+ return String.format(bundle.getString(name()), args);
}
}
}