[
https://issues.apache.org/jira/browse/ARTEMIS-565?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15395853#comment-15395853
]
ASF GitHub Bot commented on ARTEMIS-565:
----------------------------------------
Github user clebertsuconic commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/673#discussion_r72462809
--- Diff:
tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlUsingCoreTest.java
---
@@ -72,7 +72,7 @@ public boolean expireMessage(final long messageID) throws
Exception {
@Override
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:
```java
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.
> Artemis use no free json.org
> ----------------------------
>
> Key: ARTEMIS-565
> URL: https://issues.apache.org/jira/browse/ARTEMIS-565
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Environment: Linux all
> Reporter: gil cattaneo
>
> Hi,
> Fedora [1] is a popular distribution of the Linux operating system, and
> we wish to include the latest version of ActiveMQ Artemis [2] in our OS.
> Fedora only contains Free and Open Source licensed works.
> Your project is licensed under Apache License Version 2,
> but your code pulls in code from json.org under Douglas Crockford’s bad
> licence [3], and is non-free [4].
> Such usage restriction makes the license incompatible with The Open Source
> Definition and
> The Free Software Definition. Because ActiveMQ Artemis binary distribution
> includes this software,
> it effectively becomes proprietary software itself.
> You may also comment that the json.org license is valid for You [5] but for
> many Linux distributions it is not acceptable.
> Hoping in the future to be able to use ActiveMQ Artemis in Fedora, without
> having to run into this problem.
> Please try to replace it with one of the many free alternatives.
> Regards
> [1] https://fedoraproject.org/wiki/Fedora_Project_Wiki
> [2] https://bugzilla.redhat.com/show_bug.cgi?id=1343063
> [3]
> ./artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/json/JSONArray.java
> ./artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/json/JSONException.java
> ./artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/json/JSONObject.java
> ./artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/json/JSONString.java
> ./artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/json/JSONTokener.java
> [4]
> https://wiki.debian.org/qa.debian.org/jsonevil
> http://www.sonatype.com/people/2012/03/use-json-well-youd-better-not-be-evil/
> http://tanguy.ortolo.eu/blog/article46/json-license
> [5] http://www.apache.org/legal/resolved.html#json
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)