[jboss-jira] [JBoss JIRA] (WFCORE-653) HttpManagement interface json.pretty=1 fails
Kabir Khan (JIRA)
issues at jboss.org
Mon Apr 20 11:57:18 EDT 2015
[ https://issues.jboss.org/browse/WFCORE-653?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13060712#comment-13060712 ]
Kabir Khan commented on WFCORE-653:
-----------------------------------
Fix is
{code}
boolean pretty = false;
if (dmr.hasDefined(JSON_PRETTY)) {
String jsonPretty = dmr.get(JSON_PRETTY).asString();
pretty = "true".equalsIgnoreCase(jsonPretty) || "1".equals(jsonPretty);
}
operationParameterBuilder.pretty(pretty);
{code}
> HttpManagement interface json.pretty=1 fails
> --------------------------------------------
>
> Key: WFCORE-653
> URL: https://issues.jboss.org/browse/WFCORE-653
> Project: WildFly Core
> Issue Type: Bug
> Components: Domain Management
> Reporter: Kabir Khan
> Assignee: Kabir Khan
> Fix For: 1.0.0.Beta5
>
> Attachments: HttpMgmtPrettyTestCase.java
>
>
> *Don't work on this*
> (This is a deliberate regression of https://issues.jboss.org/browse/WFLY-3371 which will be introduced for a few hours on Tuesday 21st April 2015, so I have something to fix during a JBug demo)
> When attempting to call e.g. http://localhost:9990/management/subsystem/jmx?json.pretty=1
> an IllegalStateException happens. Debugging shows this to happen on the following line of DomainApiHandler
> {code}
> operationParameterBuilder.pretty(dmr.hasDefined("json.pretty") && dmr.get("json.pretty").asBoolean());
> {code}
> The dmr access needs to take into account that the parameter is not necessarily a boolen.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
More information about the jboss-jira
mailing list