RMLio / RMLio/MappingWeaver-java

Bulk output flag throws error

Open Beginner friendly
#11 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
3
Forks
1
PR merge metrics
No merged PRs in 30d

Description

While trying to deduplicate the output (cf. #7), I tried running MappingWeaver with the --bulk flag, only to find that enabling this option immediately results in an error:

Exception in thread "main" java.lang.RuntimeException: java.lang.ClassCastException: class java.lang.Boolean cannot be cast to class java.lang.String (java.lang.Boolean and java.lang.String are in module java.base of loader 'bootstrap')
        at be.ugent.idlab.knows.mappingweaver.cli.Main.parseAndRun(Main.java:172)
        at be.ugent.idlab.knows.mappingweaver.cli.Main.main(Main.java:58)
Caused by: java.lang.ClassCastException: class java.lang.Boolean cannot be cast to class java.lang.String (java.lang.Boolean and java.lang.String are in module java.base of loader 'bootstrap')
        at be.ugent.idlab.knows.mappingweaver.cli.Main.parseAndRun(Main.java:106)
        ... 1 more

The culprit seems to be an implicit type cast when parsing the option in mappingweaver/cli/Main.java#L106.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/main/java/be/ugent/idlab/knows/mappingweaver/cli/Main.java, especially the option parsing at line 106, and reproduce the failure using the --bulk flag. Trace the parsed value and verify that enabling --bulk no longer produces the reported ClassCastException and allows the command to run.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
76/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.