You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reported by bernd_hohmann on 2004-11-12 23:57 UTC
Two minor compatibility issues:
Class ErrorMessages, declaration part
It's dangerous to create an instance of RessourceBundle
here because the IBM implementation reads the ressource
file asap which causes an ExceptionInInitializerError
in the class and it is hard to track this down.
Commented by lsf37 on 2004-12-19 09:03 UTC
Logged In: YES
user_id=93534
Thanks for the report and fixes. I've included the first and a
variation of the second into the repository version. Could you check
if they work for you?
Reported by bernd_hohmann on 2004-11-12 23:57 UTC
Two minor compatibility issues:
It's dangerous to create an instance of RessourceBundle
here because the IBM implementation reads the ressource
file asap which causes an ExceptionInInitializerError
in the class and it is hard to track this down.
Suggested change in declaration part:
private static ResourceBundle RESOURCE_BUNDLE = null;
Suggested change in public static String
get(ErrorMessages msg)
try {
if (RESOURCE_BUNDLE == null) {
RESOURCE_BUNDLE =
ResourceBundle.getBundle("JFlex.Messages");
}
return RESOURCE_BUNDLE.getString(msg.key);
} catch (MissingResourceException e) {
return '!' + msg.key + '!';
}
Or a warning to System.out if .getBundle(...) throwed a
MissingResourceException
suggested Change:
//ClassLoader l = Skeleton.class.getClassLoader();
//URL url = l.getResource("JFlex/skeleton.default");
URL url =
ClassLoader.getSystemResource("JFlex/skeleton.default");
At least for me, the first variant returns NULL as
classloader, the second variant works because jflex.jar
is in the classpath
The text was updated successfully, but these errors were encountered: