From: Jim Procter Date: Fri, 21 Feb 2014 14:44:35 +0000 (+0000) Subject: JAL-1354 use real var-args method signature to avoid ambiguity X-Git-Tag: Jalview_2_9~205^2~2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=b7004ae04f0cdd9d134ec6f24bdb2e63686e0ed3;p=jalview.git JAL-1354 use real var-args method signature to avoid ambiguity --- diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index 180a72c..d11bd31 100644 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -5302,7 +5302,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, ++i; if (++icomp >= mcomp || i == (otherdb.size())) { - ifetch.setText(MessageManager.formatMessage("label.source_to_target",new String[]{imname,sname})); + ifetch.setText(MessageManager.formatMessage("label.source_to_target",imname,sname)); dfetch.add(ifetch); ifetch = new JMenu(); imname = null; @@ -5314,7 +5314,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, ++dbi; if (comp >= mcomp || dbi >= (dbclasses.length)) { - dfetch.setText(MessageManager.formatMessage("label.source_to_target",new String[]{mname,dbclass})); + dfetch.setText(MessageManager.formatMessage("label.source_to_target",mname,dbclass)); rfetch.add(dfetch); dfetch = new JMenu(); mname = null; diff --git a/src/jalview/util/MessageManager.java b/src/jalview/util/MessageManager.java index fcf2bfa..5f7f0e2 100644 --- a/src/jalview/util/MessageManager.java +++ b/src/jalview/util/MessageManager.java @@ -61,7 +61,7 @@ public class MessageManager { public static Locale getLocale() { return loc; } - public static String formatMessage(String key, Object[] params){ - return MessageFormat.format(rb.getString(key), params); + public static String formatMessage(String key, Object... params){ + return MessageFormat.format(rb.getString(key), (Object[]) params); } }