Skip to content

InterpolationException silently swallowed in AbstractEarModule.getBundleFileName() #515

Description

@elharo

Description

In AbstractEarModule.java:268-271, an InterpolationException from MappingUtils.evaluateFileNameMapping() is silently swallowed:

} catch (InterpolationException e) {
    // We currently ignore this here
    // FIXME: should we handle this better?
}

If the file name mapping evaluation fails, the exception is completely ignored. The bundleFileName field remains null, and downstream code using getUri() (which calls getBundleFileName()) may get unexpected null values. The FIXME comment confirms this is a known issue.

Expected behavior

At minimum, log a warning:

} catch (InterpolationException e) {
    getLog().warn("Failed to evaluate file name mapping", e);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions