[jboss-jira] [JBoss JIRA] (WFCORE-3887) Smarter range validation error messages

Brian Stansberry (Jira) issues at jboss.org
Fri Apr 12 12:22:01 EDT 2019


    [ https://issues.jboss.org/browse/WFCORE-3887?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13721909#comment-13721909 ] 

Brian Stansberry commented on WFCORE-3887:
------------------------------------------

[~michpetrov] +1. Thanks. WFLYCTL0107 is still used by ParseUtil.parseBoundedIntegerAttribute, but that method is unused, and I'm going to deprecate it (WFCORE-4418) and later remove it (WFCORE-4419).

> Smarter range validation error messages
> ---------------------------------------
>
>                 Key: WFCORE-3887
>                 URL: https://issues.jboss.org/browse/WFCORE-3887
>             Project: WildFly Core
>          Issue Type: Enhancement
>          Components: Management
>            Reporter: Brian Stansberry
>            Assignee: Michal Petrov
>            Priority: Minor
>
> A message like this is kind of silly: "Value must be between 0 and 9007199254740991".
> Smarter would be the ParameterValidator code that detects the message checking if the range max is Integer.MAX_INT (for an int) or Long.MAX_LONG (for a long) and if the bad value is below the max, just saying the equivalent of "Value must be greater than %d".



--
This message was sent by Atlassian Jira
(v7.12.1#712002)


More information about the jboss-jira mailing list