Skip to content
This repository has been archived by the owner on Mar 17, 2021. It is now read-only.

feat(purl): add a purl to ArtifactCoordinates parser #292

Merged
merged 1 commit into from
Sep 19, 2019

Conversation

bs-ondem
Copy link
Contributor

Adds a utility method to parse a PURL to a specific ArtifactCoordinates object.

}
}

public static ArtifactCoordinates createArtifactCoordinates(String packageUrl) throws MalformedPackageURLException {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not throw the very specific exception. My proposal would be to use a IllegalArgumentException, since the String is not fulfilling the precondition of the packageUrl parameter.

}
}

public static ArtifactCoordinates createArtifactCoordinates(String packageUrl) throws MalformedPackageURLException {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function name is not fully clear. Unknowing developer could give any kind of string and hope for ArtifactCoordinates. Maybe add something like: fromPurl or fromPurlString

@bs-ondem
Copy link
Contributor Author

@neubs-bsi @blaumeiser-at-bosch please check my last force-push with your recommended changes.

Signed-off-by: Onur Demirci <Onur.Demirci@Bosch-si.com>
@bs-ondem bs-ondem force-pushed the bs-ondem/improve/purl branch from c848342 to f019abe Compare September 19, 2019 10:54
@bs-ondem bs-ondem merged commit 522c72a into eclipse-archived:master Sep 19, 2019
@blaumeiser-at-bosch blaumeiser-at-bosch deleted the bs-ondem/improve/purl branch September 19, 2019 12:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants