1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Fixed warning.

This commit is contained in:
Sergey Prigogin 2008-05-26 18:22:03 +00:00
parent 2384cbd3f2
commit 5ddcabbe62
2 changed files with 12 additions and 15 deletions

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2001, 2006 IBM Corporation and others.
* Copyright (c) 2001, 2008 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -10,11 +10,10 @@
*******************************************************************************/
package org.eclipse.cdt.internal.core.parser;
public class ParserException extends Exception {
private static final long serialVersionUID = -1589821762220079641L;
public ParserException( String msg )
{
super( msg );
public ParserException(String msg) {
super(msg);
}
}

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2004, 2006 IBM Corporation and others.
* Copyright (c) 2004, 2008 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -8,24 +8,22 @@
* Contributors:
* IBM Rational Software - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.core.parser;
import java.text.MessageFormat;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
/**
* @author aniefer
*
* To change the template for this generated type comment go to
* Window - Preferences - Java - Code Generation - Code and Comments
*/
public class ParserMessages {
private static final String BUNDLE_NAME = "org.eclipse.cdt.internal.core.parser.ParserMessages";//$NON-NLS-1$
private static final String BUNDLE_NAME = ParserMessages.class.getName();
private static ResourceBundle resourceBundle;
static {
try {
resourceBundle = ResourceBundle.getBundle( BUNDLE_NAME );
resourceBundle = ResourceBundle.getBundle(BUNDLE_NAME);
} catch (MissingResourceException x) {
resourceBundle = null;
}
@ -35,7 +33,7 @@ public class ParserMessages {
}
public static String getString(String key) {
if( resourceBundle == null )
if (resourceBundle == null)
return '#' + key +'#';
try {
return resourceBundle.getString(key);
@ -50,7 +48,7 @@ public class ParserMessages {
* @param key the string used to get the bundle value, must not be null
*/
public static String getFormattedString(String key, Object[] args) {
String format = getString( key );
String format = getString(key);
return MessageFormat.format(format, args);
}
@ -60,7 +58,7 @@ public class ParserMessages {
* @param key the string used to get the bundle value, must not be null
*/
public static String getFormattedString(String key, Object arg) {
String format = getString( key );
String format = getString(key);
if (arg == null)
arg = ""; //$NON-NLS-1$