Skip to content

[MPIR-479] ProjectInfoProjectStub sweeps exceptions under the rug #328

@jira-importer

Description

@jira-importer

Elliotte Rusty Harold opened MPIR-479 and commented

Way back when someone got lazy with exceptions and simply converted them into runtime exceptions without considering what could fail and what the appropriate response was. Fix this.

 

public ProjectInfoProjectStub() {
MavenXpp3Reader pomReader = new MavenXpp3Reader();
try (Reader reader = ReaderFactory.newXmlReader(new File(getBasedir(), getPOM()))) {
model = pomReader.read(reader);
setModel(model);
} catch (IOException | XmlPullParserException e) {
throw new RuntimeException(e);
}

 
This might involve changing method signatures and refactoring code. For instance it's generally a bad idea to read files in constructors so we might want to do that somewhere else.


No further details from MPIR-479

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority:majorMajor loss of function

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions