Inconsistent visibility of ThrowingParser prevents use of typed overloads in CommandParsers #81
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug Report
Environment
Summary
The ThrowingParser interface is not declared as public. This prevents classes in other packages (such as Command Parsers) from using the public methods of the RequestParameterAccessor class that utilize this type in their method signatures.
Expected Behavior
According to the project documentation you should be able to use typed overloads like accessor.require("KEY", Integer::parseInt) to avoid manual exception handling within the parsers.
Actual Behavior
The Java compiler fails with the following error:
The type ThrowingParser from the descriptor computed for the target context is not visible here.Steps to Reproduce
...accessor(e.g.,ch.unibas.dmi.dbis.cs108.casono.server.app.commands.raise).RequestParameterAccessor.require(String, ThrowingParser<T>)using a method reference likeInteger::parseIntStack Trace / Error Message
Possible Cause / Notes
The access modifier
publicis missing from theThrowingParserinterface declaration inRequestParameterAccessor.java. Since this interface serves as a formal parameter in a public API method, it must also be publicly accessible so that the method reference (target typing) can be resolved in the caller's context.Checklist
assigned to @lars.winzer
created branch
fix/81-incorrect-visibility-of-throwingparserto address this issueadded 3m of time spent at 2026-04-10 12:00:00 +0200
mentioned in merge request !94
mentioned in commit
3ee1e63577