1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-22 14:12:10 +02:00

[254200] Remove unnecessary cast which triggers warnings.

This commit is contained in:
Marc Khouzam 2009-03-13 13:53:20 +00:00
parent fa3911cd90
commit fe9dd6f594
3 changed files with 5 additions and 5 deletions

View file

@ -31,11 +31,11 @@ public class LaunchUIMessages {
private LaunchUIMessages() {} private LaunchUIMessages() {}
public static String getFormattedString(String key, String arg) { public static String getFormattedString(String key, String arg) {
return MessageFormat.format(getString(key), (Object[])new String[]{arg}); return MessageFormat.format(getString(key), new String[]{arg});
} }
public static String getFormattedString(String key, String[] args) { public static String getFormattedString(String key, String[] args) {
return MessageFormat.format(getString(key), (Object[])args); return MessageFormat.format(getString(key), args);
} }
public static String getString(String key) { public static String getString(String key) {

View file

@ -32,11 +32,11 @@ public class LaunchMessages {
private LaunchMessages() {} private LaunchMessages() {}
public static String getFormattedString(String key, String arg) { public static String getFormattedString(String key, String arg) {
return MessageFormat.format(getString(key), (Object[])new String[]{arg}); return MessageFormat.format(getString(key), new String[]{arg});
} }
public static String getFormattedString(String key, String[] args) { public static String getFormattedString(String key, String[] args) {
return MessageFormat.format(getString(key), (Object[])args); return MessageFormat.format(getString(key), args);
} }
public static String getString(String key) { public static String getString(String key) {

View file

@ -678,7 +678,7 @@ public abstract class AbstractMIControl extends AbstractDsfService
clientMsg.append("Error message from debugger back end:\n"); //$NON-NLS-1$ clientMsg.append("Error message from debugger back end:\n"); //$NON-NLS-1$
if (parameters != null) { if (parameters != null) {
try { try {
clientMsg.append(MessageFormat.format(message, (Object[])parameters)); clientMsg.append(MessageFormat.format(message, parameters));
} catch(IllegalArgumentException e2) { } catch(IllegalArgumentException e2) {
// Message format string invalid. Fallback to just appending the strings. // Message format string invalid. Fallback to just appending the strings.
clientMsg.append(message); clientMsg.append(message);