[PATCH] Using varargs for message arguments

Wald Commits scm-commit at wald.intevation.org
Thu Jan 18 18:21:36 CET 2018


# HG changeset patch
# User gernotbelger
# Date 1516296090 -3600
# Node ID e4aadc953665a39dc8e25058392c7fc31d921ee7
# Parent  4ba55fae5ef33956de4bb2111fc5a7818d11ec6f
Using varargs for message arguments

diff -r 4ba55fae5ef3 -r e4aadc953665 artifacts/src/main/java/org/dive4elements/river/artifacts/resources/Resources.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/resources/Resources.java	Thu Jan 18 17:59:39 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/resources/Resources.java	Thu Jan 18 18:21:30 2018 +0100
@@ -124,18 +124,18 @@
      * @return a translated string.
      */
     public static String getMsg(
-            CallMeta meta,
-            String   key,
-            String   def,
-            Object[] args)
+    		CallMeta meta,
+    		String   key,
+    		String   def,
+    		Object... args)
     {
-        String template = getMsg(meta, key, (String)null);
-
-        if (template == null) {
-            return def;
-        }
-
-        return format(meta, template, args);
+    	String template = getMsg(meta, key, (String)null);
+    	
+    	if (template == null) {
+    		return def;
+    	}
+    	
+    	return format(meta, template, args);
     }
 
     public static String format(


More information about the Dive4Elements-commits mailing list