Description
Javadoc for AbortWithHttpStatusException class constructor states:
- @param statusCodeOptional
- If true and http status could not be set, an IllegalStateException will be thrown
But the code does:
if (!statusCodeOptional)
{ throw new IllegalStateException( "This exception can only be thrown from within request processing cycle"); }Obviously, the exception is thrown only if the flag statusCodeOptional is set to false, not true.