Skip to content

[Bug] OS/2 Java 1.1.8 Issues [sf#71] #73

@lsf37

Description

@lsf37

Reported by bernd_hohmann on 2004-11-12 23:57 UTC
Two minor compatibility issues:

  1. 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.

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

  1. Skeleton#readDefault()
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugNot working as intended

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions