From b7004ae04f0cdd9d134ec6f24bdb2e63686e0ed3 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Fri, 21 Feb 2014 14:44:35 +0000 Subject: [PATCH] JAL-1354 use real var-args method signature to avoid ambiguity --- src/jalview/gui/AlignFrame.java | 4 ++-- src/jalview/util/MessageManager.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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); } } -- 1.7.10.2