activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuconic <>
Subject [GitHub] activemq-artemis pull request #673: ARTEMIS-565 more JSON fixes
Date Wed, 27 Jul 2016 15:32:43 GMT
Github user clebertsuconic commented on a diff in the pull request:
    --- Diff: tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/
    @@ -72,7 +72,7 @@ public boolean expireMessage(final long messageID) throws Exception
              public int expireMessages(final String filter) throws Exception {
    -            return (Integer) proxy.invokeOperation("expireMessages", filter);
    +            return ((Number) proxy.invokeOperation("expireMessages", filter)).intValue();
    --- End diff --
    I would change the proxy as:
       public Object invokeOperation(final String operationName, final Object... args) throws
Exception {
          return invokeOperation(null, operationName, args);
       public Object invokeOperation(final Class desiredType, final String operationName,
final Object... args) throws Exception {
          ClientMessage m = session.createMessage(false);
          ManagementHelper.putOperationInvocation(m, resourceName, operationName, args);
          ClientMessage reply = requestor.request(m);
          if (reply != null) {
             if (ManagementHelper.hasOperationSucceeded(reply)) {
                return ManagementHelper.getResult(reply, desiredType);
             else {
                throw new Exception((String) ManagementHelper.getResult(reply));
          else {
             return null;
    and pass in the desiredType on these.

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message