Author: nextgens
Date: 2007-04-11 16:33:56 +0000 (Wed, 11 Apr 2007)
New Revision: 12578

Modified:
   trunk/freenet/src/freenet/l10n/L10n.java
Log:
Throw an illegalArgumentException on L10n.getString(...) if necessary

Modified: trunk/freenet/src/freenet/l10n/L10n.java
===================================================================
--- trunk/freenet/src/freenet/l10n/L10n.java    2007-04-11 16:02:07 UTC (rev 
12577)
+++ trunk/freenet/src/freenet/l10n/L10n.java    2007-04-11 16:33:56 UTC (rev 
12578)
@@ -101,6 +101,7 @@
         * @return the translated string or the default value from the default 
language or the key if nothing is found
         */
        public static String getString(String key, String[] patterns, String[] 
values) {
+               if((patterns == null) || (values == null)) throw new 
IllegalArgumentException();
                assert(patterns.length == values.length);
                String result = getString(key);



Reply via email to