mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-28 09:58:30 +01:00
I apparently don't understand how varargs works in java
This commit is contained in:
parent
3c76de6851
commit
01c94d91cd
1 changed files with 8 additions and 6 deletions
|
@ -148,11 +148,6 @@ public class LocUtils {
|
|||
}
|
||||
|
||||
public static String getString( Context context, int id )
|
||||
{
|
||||
return getString( context, id, (Object)null );
|
||||
}
|
||||
|
||||
public static String getString( Context context, int id, Object... params )
|
||||
{
|
||||
String result = null;
|
||||
String key = keyForID( context, id );
|
||||
|
@ -164,7 +159,14 @@ public class LocUtils {
|
|||
result = context.getString( id );
|
||||
}
|
||||
|
||||
if ( null != result && null != params ) {
|
||||
return result;
|
||||
}
|
||||
|
||||
public static String getString( Context context, int id, Object... params )
|
||||
{
|
||||
Assert.assertNotNull( params );
|
||||
String result = getString( context, id );
|
||||
if ( null != result ) {
|
||||
result = String.format( result, params );
|
||||
}
|
||||
return result;
|
||||
|
|
Loading…
Reference in a new issue