Revision: 582
http://japi.svn.sourceforge.net/japi/?rev=582&view=rev
Author: christianhujer
Date: 2007-08-17 12:00:49 -0700 (Fri, 17 Aug 2007)
Log Message:
-----------
Add key as information to the NPE thrown by format().
Modified Paths:
--------------
libs/swing-action/trunk/src/net/sf/japi/swing/DefaultActionBuilder.java
Modified: libs/swing-action/trunk/src/net/sf/japi/swing/DefaultActionBuilder.java
===================================================================
--- libs/swing-action/trunk/src/net/sf/japi/swing/DefaultActionBuilder.java 2007-08-15 16:41:40 UTC (rev 581)
+++ libs/swing-action/trunk/src/net/sf/japi/swing/DefaultActionBuilder.java 2007-08-17 19:00:49 UTC (rev 582)
@@ -907,7 +907,11 @@
* @see MessageFormat#format(String,Object...)
*/
public String format(@NotNull final String key, final Object... args) {
- return MessageFormat.format(getString(key), args);
+ try {
+ return MessageFormat.format(getString(key), args);
+ } catch (final NullPointerException e) {
+ throw new NullPointerException("No format for key " + key + " (" + e + ")");
+ }
}
/** Show a localized confirmation dialog which the user can suppress in future (remembering his choice).
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|