Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validation assumes labels on first structMap division, and checks for wrong value (e.g. CSIP86) #181

Closed
prettybits opened this issue Jul 5, 2023 · 0 comments
Assignees
Labels
Milestone

Comments

@prettybits
Copy link

I'm separating this issue out from #165 (comment) to be able to track this independently of the CSIP88 issue.

As mentioned there, with packages following version 2.1.0 of the spec, a missing label on the first CSIP structMap division leads to a NullPointerException:

Exception in thread "main" java.lang.NullPointerException
        at org.roda_project.commons_ip2.validator.component.structuralMapComponent.StructuralMapComponentValidator.validateCSIP86(StructuralMapComponentValidator.java:615)
        at org.roda_project.commons_ip2.validator.component.structuralMapComponent.StructuralMapComponentValidator.validate(StructuralMapComponentValidator.java:92)
        at org.roda_project.commons_ip2.validator.EARKSIPValidator.validateComponents(EARKSIPValidator.java:183)
        at org.roda_project.commons_ip2.validator.EARKSIPValidator.validateRootMets(EARKSIPValidator.java:275)
        at org.roda_project.commons_ip2.validator.EARKSIPValidator.validate(EARKSIPValidator.java:159)
        at org.roda_project.commons_ip2.validator.CLI.CLIValidator.validate(CLIValidator.java:213)
        at org.roda_project.commons_ip2.validator.CLI.CLIValidator.start(CLIValidator.java:157)
        at org.roda_project.commons_ip2.validator.CLI.Main.main(Main.java:30)

While the exception needs to fixed either way, assuming validation against version 2.0.4 of the spec even with a label present the specific value that's expected for the is "CSIP" where the OBJID value would have been correct. This is currently true for CSIP86, CSIP88 and CSIP105-112.

@luis100 luis100 added the bug label Jul 6, 2023
carlosjepard added a commit that referenced this issue Jul 7, 2023
carlosjepard added a commit that referenced this issue Aug 3, 2023
hmiguim pushed a commit that referenced this issue Aug 3, 2023
@hmiguim hmiguim closed this as completed Aug 4, 2023
@hmiguim hmiguim added this to the 2.3.4 milestone Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

No branches or pull requests

4 participants