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:
parent
fa3911cd90
commit
fe9dd6f594
3 changed files with 5 additions and 5 deletions
|
@ -31,11 +31,11 @@ public class LaunchUIMessages {
|
|||
private LaunchUIMessages() {}
|
||||
|
||||
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) {
|
||||
return MessageFormat.format(getString(key), (Object[])args);
|
||||
return MessageFormat.format(getString(key), args);
|
||||
}
|
||||
|
||||
public static String getString(String key) {
|
||||
|
|
|
@ -32,11 +32,11 @@ public class LaunchMessages {
|
|||
private LaunchMessages() {}
|
||||
|
||||
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) {
|
||||
return MessageFormat.format(getString(key), (Object[])args);
|
||||
return MessageFormat.format(getString(key), args);
|
||||
}
|
||||
|
||||
public static String getString(String key) {
|
||||
|
|
|
@ -678,7 +678,7 @@ public abstract class AbstractMIControl extends AbstractDsfService
|
|||
clientMsg.append("Error message from debugger back end:\n"); //$NON-NLS-1$
|
||||
if (parameters != null) {
|
||||
try {
|
||||
clientMsg.append(MessageFormat.format(message, (Object[])parameters));
|
||||
clientMsg.append(MessageFormat.format(message, parameters));
|
||||
} catch(IllegalArgumentException e2) {
|
||||
// Message format string invalid. Fallback to just appending the strings.
|
||||
clientMsg.append(message);
|
||||
|
|
Loading…
Add table
Reference in a new issue