diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/ParserException.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/ParserException.java index df721dc20d0..77c8fbfba10 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/ParserException.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/ParserException.java @@ -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); } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/ParserMessages.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/ParserMessages.java index dbecf257d1f..8ab2c3eeece 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/ParserMessages.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/ParserMessages.java @@ -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$