-- * Warning: This method assumes that the data structure is acyclical.
-- *
-- * @return a printable, displayable, transmittable
-- * representation of the array.
-- */
-- @Override
-- public String toString()
-- {
-- try
-- {
-- return '[' + join(",") + ']';
-- }
-- catch (Exception e)
-- {
-- return "";
-- }
-- }
--
-- /**
-- * Make a pretty-printed JSON text of this JSONArray. Warning: This method assumes that the data
-- * structure is acyclical.
-- * @param indentFactor The number of spaces to add to each level of indentation.
-- * @return a printable, displayable, transmittable representation of the object, beginning with
-- * [
(left bracket) and ending with ]
-- * (right bracket).
-- * @throws JSONException
-- */
-- public String toString(final int indentFactor) throws JSONException
-- {
-- return toString(indentFactor, 0);
-- }
--
-- /**
-- * Make a pretty-printed JSON text of this JSONArray. Warning: This method assumes that the data
-- * structure is acyclical.
-- * @param indentFactor The number of spaces to add to each level of indentation.
-- * @param indent The indention of the top level.
-- * @return a printable, displayable, transmittable representation of the array.
-- * @throws JSONException
-- */
-- String toString(final int indentFactor, final int indent) throws JSONException
-- {
-- int len = length();
-- if (len == 0)
-- {
-- return "[]";
-- }
-- int i;
-- StringBuffer sb = new StringBuffer("[");
-- if (len == 1)
-- {
-- sb.append(JSONObject.valueToString(myArrayList.get(0), indentFactor, indent));
-- }
-- else
-- {
-- int newindent = indent + indentFactor;
-- sb.append('\n');
-- for (i = 0; i < len; i += 1)
-- {
-- if (i > 0)
-- {
-- sb.append(",\n");
-- }
-- for (int j = 0; j < newindent; j += 1)
-- {
-- sb.append(' ');
-- }
-- sb.append(JSONObject.valueToString(myArrayList.get(i), indentFactor, newindent));
-- }
-- sb.append('\n');
-- for (i = 0; i < indent; i += 1)
-- {
-- sb.append(' ');
-- }
-- }
-- sb.append(']');
-- return sb.toString();
-- }
--
-- /**
-- * Write the contents of the JSONArray as JSON text to a writer.
-- * For compactness, no whitespace is added.
-- *
-- * Warning: This method assumes that the data structure is acyclical.
-- *
-- * @return The writer.
-- * @throws JSONException
-- */
-- public Writer write(final Writer writer) throws JSONException
-- {
-- try
-- {
-- boolean b = false;
-- int len = length();
--
-- writer.write('[');
--
-- for (int i = 0; i < len; i += 1)
-- {
-- if (b)
-- {
-- writer.write(',');
-- }
-- Object v = myArrayList.get(i);
-- if (v instanceof JSONObject)
-- {
-- ((JSONObject)v).write(writer);
-- }
-- else if (v instanceof JSONArray)
-- {
-- ((JSONArray)v).write(writer);
-- }
-- else
-- {
-- writer.write(JSONObject.valueToString(v));
-- }
-- b = true;
-- }
-- writer.write(']');
-- return writer;
-- }
-- catch (IOException e)
-- {
-- throw new JSONException(e);
-- }
-- }
--}
-diff -Nru hornetq-HornetQ_2_4_7_Final/hornetq-core-client/src/main/java/org/hornetq/utils/json/JSONException.java hornetq-HornetQ_2_4_7_Final.javax.json/hornetq-core-client/src/main/java/org/hornetq/utils/json/JSONException.java
---- hornetq-HornetQ_2_4_7_Final/hornetq-core-client/src/main/java/org/hornetq/utils/json/JSONException.java 2015-04-13 20:00:17.000000000 +0200
-+++ hornetq-HornetQ_2_4_7_Final.javax.json/hornetq-core-client/src/main/java/org/hornetq/utils/json/JSONException.java 1970-01-01 01:00:00.000000000 +0100
-@@ -1,73 +0,0 @@
--/*
-- * Copyright 2005-2014 Red Hat, Inc.
-- * Red Hat licenses this file to you under the Apache License, version
-- * 2.0 (the "License"); you may not use this file except in compliance
-- * with the License. You may obtain a copy of the License at
-- * http://www.apache.org/licenses/LICENSE-2.0
-- * Unless required by applicable law or agreed to in writing, software
-- * distributed under the License is distributed on an "AS IS" BASIS,
-- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-- * implied. See the License for the specific language governing
-- * permissions and limitations under the License.
-- */
--/*
--Copyright (c) 2002 JSON.org
--
--Permission is hereby granted, free of charge, to any person obtaining a copy
--of this software and associated documentation files (the "Software"), to deal
--in the Software without restriction, including without limitation the rights
--to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
--copies of the Software, and to permit persons to whom the Software is
--furnished to do so, subject to the following conditions:
--
--The above copyright notice and this permission notice shall be included in all
--copies or substantial portions of the Software.
--
--The Software shall be used for Good, not Evil.
--
--THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
--IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
--FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
--AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
--LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
--OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
--SOFTWARE.
--*/
--
--package org.hornetq.utils.json;
--
--/**
-- * The JSONException is thrown by the JSON.org classes then things are amiss.
-- * @author JSON.org
-- * @version 2008-09-18
-- */
--public class JSONException extends Exception
--{
-- /**
-- *
-- */
-- private static final long serialVersionUID = -3940674325153571604L;
--
-- private Throwable cause;
--
-- /**
-- * Constructs a JSONException with an explanatory message.
-- * @param message Detail about the reason for the exception.
-- */
-- public JSONException(final String message)
-- {
-- super(message);
-- }
--
-- public JSONException(final Throwable t)
-- {
-- super(t.getMessage());
-- cause = t;
-- }
--
-- @Override
-- public synchronized Throwable getCause()
-- {
-- return cause;
-- }
--}
-diff -Nru hornetq-HornetQ_2_4_7_Final/hornetq-core-client/src/main/java/org/hornetq/utils/json/JSONObject.java hornetq-HornetQ_2_4_7_Final.javax.json/hornetq-core-client/src/main/java/org/hornetq/utils/json/JSONObject.java
---- hornetq-HornetQ_2_4_7_Final/hornetq-core-client/src/main/java/org/hornetq/utils/json/JSONObject.java 2015-04-13 20:00:17.000000000 +0200
-+++ hornetq-HornetQ_2_4_7_Final.javax.json/hornetq-core-client/src/main/java/org/hornetq/utils/json/JSONObject.java 1970-01-01 01:00:00.000000000 +0100
-@@ -1,1751 +0,0 @@
--/*
-- * Copyright 2005-2014 Red Hat, Inc.
-- * Red Hat licenses this file to you under the Apache License, version
-- * 2.0 (the "License"); you may not use this file except in compliance
-- * with the License. You may obtain a copy of the License at
-- * http://www.apache.org/licenses/LICENSE-2.0
-- * Unless required by applicable law or agreed to in writing, software
-- * distributed under the License is distributed on an "AS IS" BASIS,
-- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-- * implied. See the License for the specific language governing
-- * permissions and limitations under the License.
-- */
--/*
--Copyright (c) 2002 JSON.org
--
--Permission is hereby granted, free of charge, to any person obtaining a copy
--of this software and associated documentation files (the "Software"), to deal
--in the Software without restriction, including without limitation the rights
--to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
--copies of the Software, and to permit persons to whom the Software is
--furnished to do so, subject to the following conditions:
--
--The above copyright notice and this permission notice shall be included in all
--copies or substantial portions of the Software.
--
--The Software shall be used for Good, not Evil.
--
--THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
--IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
--FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
--AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
--LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
--OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
--SOFTWARE.
--*/
--
--package org.hornetq.utils.json;
--
--import java.io.IOException;
--import java.io.Writer;
--import java.lang.reflect.Field;
--import java.lang.reflect.InvocationTargetException;
--import java.lang.reflect.Method;
--import java.lang.reflect.Modifier;
--import java.util.Collection;
--import java.util.HashMap;
--import java.util.Iterator;
--import java.util.Map;
--import java.util.TreeSet;
--
--/**
-- * A JSONObject is an unordered collection of name/value pairs.
-- *
-- * Its external form is a string wrapped in curly braces with colons between the names and values,
-- * and commas between the values and names. The internal form is an object having get
-- * and opt
methods for accessing the values by name, and put
methods for
-- * adding or replacing values by name.
-- *
i = map.entrySet().iterator();
-- while (i.hasNext())
-- {
-- Map.Entry e = i.next();
-- if (JSONObject.isStandardProperty(e.getValue().getClass()))
-- {
-- this.map.put(e.getKey(), e.getValue());
-- }
-- else
-- {
-- this.map.put(e.getKey(), new JSONObject(e.getValue(), includeSuperClass));
-- }
-- }
-- }
-- }
--
-- /**
-- * Construct a JSONObject from an Object using bean getters.
-- * It reflects on all of the public methods of the object.
-- * For each of the methods with no parameters and a name starting
-- * with "get"
or "is"
followed by an uppercase letter,
-- * the method is invoked, and a key and the value returned from the getter method
-- * are put into the new JSONObject.
-- *
-- * The key is formed by removing the "get"
or "is"
prefix.
-- * If the second remaining character is not upper case, then the first
-- * character is converted to lower case.
-- *
-- * For example, if an object has a method named "getName"
, and
-- * if the result of calling object.getName()
is "Larry Fine"
,
-- * then the JSONObject will contain "name": "Larry Fine"
.
-- *
-- * @param bean An object that has getter methods that should be used
-- * to make a JSONObject.
-- */
-- public JSONObject(final Object bean)
-- {
-- this();
-- populateInternalMap(bean, false);
-- }
--
-- /**
-- * Construct a JSONObject from an Object using bean getters.
-- * It reflects on all of the public methods of the object.
-- * For each of the methods with no parameters and a name starting
-- * with "get"
or "is"
followed by an uppercase letter,
-- * the method is invoked, and a key and the value returned from the getter method
-- * are put into the new JSONObject.
-- *
-- * The key is formed by removing the "get"
or "is"
prefix.
-- * If the second remaining character is not upper case, then the first
-- * character is converted to lower case.
-- *
-- * @param bean An object that has getter methods that should be used
-- * to make a JSONObject.
-- * @param includeSuperClass If true, include the super class properties.
-- */
-- public JSONObject(final Object bean, final boolean includeSuperClass)
-- {
-- this();
-- populateInternalMap(bean, includeSuperClass);
-- }
--
-- private void populateInternalMap(final Object bean, boolean includeSuperClass)
-- {
-- Class klass = bean.getClass();
--
-- /* If klass.getSuperClass is System class then force includeSuperClass to false. */
--
-- if (klass.getClassLoader() == null)
-- {
-- includeSuperClass = false;
-- }
--
-- Method[] methods = includeSuperClass ? klass.getMethods() : klass.getDeclaredMethods();
-- for (Method method : methods)
-- {
-- try
-- {
-- if (Modifier.isPublic(method.getModifiers()))
-- {
-- String name = method.getName();
-- String key = "";
-- if (name.startsWith("get"))
-- {
-- key = name.substring(3);
-- }
-- else if (name.startsWith("is"))
-- {
-- key = name.substring(2);
-- }
-- if (key.length() > 0 && Character.isUpperCase(key.charAt(0)) && method.getParameterTypes().length == 0)
-- {
-- if (key.length() == 1)
-- {
-- key = key.toLowerCase();
-- }
-- else if (!Character.isUpperCase(key.charAt(1)))
-- {
-- key = key.substring(0, 1).toLowerCase() + key.substring(1);
-- }
--
-- Object result = method.invoke(bean, (Object[])null);
-- if (result == null)
-- {
-- map.put(key, JSONObject.NULL);
-- }
-- else if (result.getClass().isArray())
-- {
-- map.put(key, new JSONArray(result, includeSuperClass));
-- }
-- else if (result instanceof Collection)
-- { // List or Set
-- map.put(key, new JSONArray((Collection)result, includeSuperClass));
-- }
-- else if (result instanceof Map)
-- {
-- map.put(key, new JSONObject((Map)result, includeSuperClass));
-- }
-- else if (JSONObject.isStandardProperty(result.getClass()))
-- { // Primitives, String and Wrapper
-- map.put(key, result);
-- }
-- else
-- {
-- if (result.getClass().getPackage().getName().startsWith("java") || result.getClass()
-- .getClassLoader() == null)
-- {
-- map.put(key, result.toString());
-- }
-- else
-- { // User defined Objects
-- map.put(key, new JSONObject(result, includeSuperClass));
-- }
-- }
-- }
-- }
-- }
-- catch (IllegalAccessException e)
-- {
-- throw new RuntimeException(e);
-- }
-- catch (JSONException e)
-- {
-- throw new RuntimeException(e);
-- }
-- catch (InvocationTargetException e)
-- {
-- throw new RuntimeException(e);
-- }
-- }
-- }
--
-- static boolean isStandardProperty(final Class extends Object> clazz)
-- {
-- return clazz.isPrimitive() || clazz.isAssignableFrom(Byte.class) ||
-- clazz.isAssignableFrom(Short.class) ||
-- clazz.isAssignableFrom(Integer.class) ||
-- clazz.isAssignableFrom(Long.class) ||
-- clazz.isAssignableFrom(Float.class) ||
-- clazz.isAssignableFrom(Double.class) ||
-- clazz.isAssignableFrom(Character.class) ||
-- clazz.isAssignableFrom(String.class) ||
-- clazz.isAssignableFrom(Boolean.class);
-- }
--
-- /**
-- * Construct a JSONObject from an Object, using reflection to find the
-- * public members. The resulting JSONObject's keys will be the strings
-- * from the names array, and the values will be the field values associated
-- * with those keys in the object. If a key is not found or not visible,
-- * then it will not be copied into the new JSONObject.
-- * @param object An object that has fields that should be used to make a
-- * JSONObject.
-- * @param names An array of strings, the names of the fields to be obtained
-- * from the object.
-- */
-- public JSONObject(final Object object, final String[] names)
-- {
-- this();
-- Class c = object.getClass();
-- for (String name : names)
-- {
-- try
-- {
-- putOpt(name, c.getField(name).get(object));
-- }
-- catch (Exception e)
-- {
-- /* forget about it */
-- }
-- }
-- }
--
-- /**
-- * Construct a JSONObject from a source JSON text string.
-- * This is the most commonly used JSONObject constructor.
-- * @param source A string beginning
-- * with {
(left brace) and ending
-- * with }
(right brace).
-- * @exception JSONException If there is a syntax error in the source
-- * string or a duplicated key.
-- */
-- public JSONObject(final String source) throws JSONException
-- {
-- this(new JSONTokener(source));
-- }
--
-- /**
-- * Accumulate values under a key. It is similar to the put method except
-- * that if there is already an object stored under the key then a
-- * JSONArray is stored under the key to hold all of the accumulated values.
-- * If there is already a JSONArray, then the new value is appended to it.
-- * In contrast, the put method replaces the previous value.
-- * @param key A key string.
-- * @param value An object to be accumulated under the key.
-- * @return this.
-- * @throws JSONException If the value is an invalid number
-- * or if the key is null.
-- */
-- public JSONObject accumulate(final String key, final Object value) throws JSONException
-- {
-- JSONObject.testValidity(value);
-- Object o = opt(key);
-- if (o == null)
-- {
-- put(key, value instanceof JSONArray ? new JSONArray().put(value) : value);
-- }
-- else if (o instanceof JSONArray)
-- {
-- ((JSONArray)o).put(value);
-- }
-- else
-- {
-- put(key, new JSONArray().put(o).put(value));
-- }
-- return this;
-- }
--
-- /**
-- * Append values to the array under a key. If the key does not exist in the
-- * JSONObject, then the key is put in the JSONObject with its value being a
-- * JSONArray containing the value parameter. If the key was already
-- * associated with a JSONArray, then the value parameter is appended to it.
-- * @param key A key string.
-- * @param value An object to be accumulated under the key.
-- * @return this.
-- * @throws JSONException If the key is null or if the current value
-- * associated with the key is not a JSONArray.
-- */
-- public JSONObject append(final String key, final Object value) throws JSONException
-- {
-- JSONObject.testValidity(value);
-- Object o = opt(key);
-- if (o == null)
-- {
-- put(key, new JSONArray().put(value));
-- }
-- else if (o instanceof JSONArray)
-- {
-- put(key, ((JSONArray)o).put(value));
-- }
-- else
-- {
-- throw new JSONException("JSONObject[" + key + "] is not a JSONArray.");
-- }
-- return this;
-- }
--
-- /**
-- * Produce a string from a double. The string "null" will be returned if
-- * the number is not finite.
-- * @param d A double.
-- * @return A String.
-- */
-- public static String doubleToString(final double d)
-- {
-- if (Double.isInfinite(d) || Double.isNaN(d))
-- {
-- return "null";
-- }
--
-- // Shave off trailing zeros and decimal point, if possible.
--
-- String s = Double.toString(d);
-- if (s.indexOf('.') > 0 && s.indexOf('e') < 0 && s.indexOf('E') < 0)
-- {
-- while (s.endsWith("0"))
-- {
-- s = s.substring(0, s.length() - 1);
-- }
-- if (s.endsWith("."))
-- {
-- s = s.substring(0, s.length() - 1);
-- }
-- }
-- return s;
-- }
--
-- /**
-- * Get the value object associated with a key.
-- *
-- * @param key A key string.
-- * @return The object associated with the key.
-- * @throws JSONException if the key is not found.
-- */
-- public Object get(final String key) throws JSONException
-- {
-- Object o = opt(key);
-- if (o == null)
-- {
-- throw new JSONException("JSONObject[" + JSONObject.quote(key) + "] not found.");
-- }
-- return o;
-- }
--
-- /**
-- * Get the boolean value associated with a key.
-- *
-- * @param key A key string.
-- * @return The truth.
-- * @throws JSONException
-- * if the value is not a Boolean or the String "true" or "false".
-- */
-- public boolean getBoolean(final String key) throws JSONException
-- {
-- Object o = get(key);
-- if (o.equals(Boolean.FALSE) || o instanceof String && ((String)o).equalsIgnoreCase("false"))
-- {
-- return false;
-- }
-- else if (o.equals(Boolean.TRUE) || o instanceof String && ((String)o).equalsIgnoreCase("true"))
-- {
-- return true;
-- }
-- throw new JSONException("JSONObject[" + JSONObject.quote(key) + "] is not a Boolean.");
-- }
--
-- /**
-- * Get the double value associated with a key.
-- * @param key A key string.
-- * @return The numeric value.
-- * @throws JSONException if the key is not found or
-- * if the value is not a Number object and cannot be converted to a number.
-- */
-- public double getDouble(final String key) throws JSONException
-- {
-- Object o = get(key);
-- try
-- {
-- return o instanceof Number ? ((Number)o).doubleValue() : Double.valueOf((String)o).doubleValue();
-- }
-- catch (Exception e)
-- {
-- throw new JSONException("JSONObject[" + JSONObject.quote(key) + "] is not a number.");
-- }
-- }
--
-- /**
-- * Get the int value associated with a key. If the number value is too
-- * large for an int, it will be clipped.
-- *
-- * @param key A key string.
-- * @return The integer value.
-- * @throws JSONException if the key is not found or if the value cannot
-- * be converted to an integer.
-- */
-- public int getInt(final String key) throws JSONException
-- {
-- Object o = get(key);
-- return o instanceof Number ? ((Number)o).intValue() : (int)getDouble(key);
-- }
--
-- /**
-- * Get the JSONArray value associated with a key.
-- *
-- * @param key A key string.
-- * @return A JSONArray which is the value.
-- * @throws JSONException if the key is not found or
-- * if the value is not a JSONArray.
-- */
-- public JSONArray getJSONArray(final String key) throws JSONException
-- {
-- Object o = get(key);
-- if (o instanceof JSONArray)
-- {
-- return (JSONArray)o;
-- }
-- throw new JSONException("JSONObject[" + JSONObject.quote(key) + "] is not a JSONArray.");
-- }
--
-- /**
-- * Get the JSONObject value associated with a key.
-- *
-- * @param key A key string.
-- * @return A JSONObject which is the value.
-- * @throws JSONException if the key is not found or
-- * if the value is not a JSONObject.
-- */
-- public JSONObject getJSONObject(final String key) throws JSONException
-- {
-- Object o = get(key);
-- if (o instanceof JSONObject)
-- {
-- return (JSONObject)o;
-- }
-- throw new JSONException("JSONObject[" + JSONObject.quote(key) + "] is not a JSONObject.");
-- }
--
-- /**
-- * Get the long value associated with a key. If the number value is too
-- * long for a long, it will be clipped.
-- *
-- * @param key A key string.
-- * @return The long value.
-- * @throws JSONException if the key is not found or if the value cannot
-- * be converted to a long.
-- */
-- public long getLong(final String key) throws JSONException
-- {
-- Object o = get(key);
-- return o instanceof Number ? ((Number)o).longValue() : (long)getDouble(key);
-- }
--
-- /**
-- * Get an array of field names from a JSONObject.
-- *
-- * @return An array of field names, or null if there are no names.
-- */
-- public static String[] getNames(final JSONObject jo)
-- {
-- int length = jo.length();
-- if (length == 0)
-- {
-- return null;
-- }
-- Iterator i = jo.keys();
-- String[] names = new String[length];
-- int j = 0;
-- while (i.hasNext())
-- {
-- names[j] = (String)i.next();
-- j += 1;
-- }
-- return names;
-- }
--
-- /**
-- * Get an array of field names from an Object.
-- *
-- * @return An array of field names, or null if there are no names.
-- */
-- public static String[] getNames(final Object object)
-- {
-- if (object == null)
-- {
-- return null;
-- }
-- Class klass = object.getClass();
-- Field[] fields = klass.getFields();
-- int length = fields.length;
-- if (length == 0)
-- {
-- return null;
-- }
-- String[] names = new String[length];
-- for (int i = 0; i < length; i += 1)
-- {
-- names[i] = fields[i].getName();
-- }
-- return names;
-- }
--
-- /**
-- * Get the string associated with a key.
-- *
-- * @param key A key string.
-- * @return A string which is the value.
-- * @throws JSONException if the key is not found.
-- */
-- public String getString(final String key) throws JSONException
-- {
-- return get(key).toString();
-- }
--
-- /**
-- * Determine if the JSONObject contains a specific key.
-- * @param key A key string.
-- * @return true if the key exists in the JSONObject.
-- */
-- public boolean has(final String key)
-- {
-- return map.containsKey(key);
-- }
--
-- /**
-- * Determine if the value associated with the key is null or if there is
-- * no value.
-- * @param key A key string.
-- * @return true if there is no value associated with the key or if
-- * the value is the JSONObject.NULL object.
-- */
-- public boolean isNull(final String key)
-- {
-- return JSONObject.NULL.equals(opt(key));
-- }
--
-- /**
-- * Get an enumeration of the keys of the JSONObject.
-- *
-- * @return An iterator of the keys.
-- */
-- public Iterator keys()
-- {
-- return map.keySet().iterator();
-- }
--
-- /**
-- * Get the number of keys stored in the JSONObject.
-- *
-- * @return The number of keys in the JSONObject.
-- */
-- public int length()
-- {
-- return map.size();
-- }
--
-- /**
-- * Produce a JSONArray containing the names of the elements of this
-- * JSONObject.
-- * @return A JSONArray containing the key strings, or null if the JSONObject
-- * is empty.
-- */
-- public JSONArray names()
-- {
-- JSONArray ja = new JSONArray();
-- Iterator keys = keys();
-- while (keys.hasNext())
-- {
-- ja.put(keys.next());
-- }
-- return ja.length() == 0 ? null : ja;
-- }
--
-- /**
-- * Produce a string from a Number.
-- * @param n A Number
-- * @return A String.
-- * @throws JSONException If n is a non-finite number.
-- */
-- public static String numberToString(final Number n) throws JSONException
-- {
-- if (n == null)
-- {
-- throw new JSONException("Null pointer");
-- }
-- JSONObject.testValidity(n);
--
-- // Shave off trailing zeros and decimal point, if possible.
--
-- String s = n.toString();
-- if (s.indexOf('.') > 0 && s.indexOf('e') < 0 && s.indexOf('E') < 0)
-- {
-- while (s.endsWith("0"))
-- {
-- s = s.substring(0, s.length() - 1);
-- }
-- if (s.endsWith("."))
-- {
-- s = s.substring(0, s.length() - 1);
-- }
-- }
-- return s;
-- }
--
-- /**
-- * Get an optional value associated with a key.
-- * @param key A key string.
-- * @return An object which is the value, or null if there is no value.
-- */
-- public Object opt(final String key)
-- {
-- return key == null ? null : map.get(key);
-- }
--
-- /**
-- * Get an optional boolean associated with a key.
-- * It returns false if there is no such key, or if the value is not
-- * Boolean.TRUE or the String "true".
-- *
-- * @param key A key string.
-- * @return The truth.
-- */
-- public boolean optBoolean(final String key)
-- {
-- return optBoolean(key, false);
-- }
--
-- /**
-- * Get an optional boolean associated with a key.
-- * It returns the defaultValue if there is no such key, or if it is not
-- * a Boolean or the String "true" or "false" (case insensitive).
-- *
-- * @param key A key string.
-- * @param defaultValue The default.
-- * @return The truth.
-- */
-- public boolean optBoolean(final String key, final boolean defaultValue)
-- {
-- try
-- {
-- return getBoolean(key);
-- }
-- catch (Exception e)
-- {
-- return defaultValue;
-- }
-- }
--
-- /**
-- * Put a key/value pair in the JSONObject, where the value will be a
-- * JSONArray which is produced from a Collection.
-- * @param key A key string.
-- * @param value A Collection value.
-- * @return this.
-- * @throws JSONException
-- */
-- public JSONObject put(final String key, final Collection value) throws JSONException
-- {
-- put(key, new JSONArray(value));
-- return this;
-- }
--
-- /**
-- * Get an optional double associated with a key,
-- * or NaN if there is no such key or if its value is not a number.
-- * If the value is a string, an attempt will be made to evaluate it as
-- * a number.
-- *
-- * @param key A string which is the key.
-- * @return An object which is the value.
-- */
-- public double optDouble(final String key)
-- {
-- return optDouble(key, Double.NaN);
-- }
--
-- /**
-- * Get an optional double associated with a key, or the
-- * defaultValue if there is no such key or if its value is not a number.
-- * If the value is a string, an attempt will be made to evaluate it as
-- * a number.
-- *
-- * @param key A key string.
-- * @param defaultValue The default.
-- * @return An object which is the value.
-- */
-- public double optDouble(final String key, final double defaultValue)
-- {
-- try
-- {
-- Object o = opt(key);
-- return o instanceof Number ? ((Number)o).doubleValue() : new Double((String)o).doubleValue();
-- }
-- catch (Exception e)
-- {
-- return defaultValue;
-- }
-- }
--
-- /**
-- * Get an optional int value associated with a key,
-- * or zero if there is no such key or if the value is not a number.
-- * If the value is a string, an attempt will be made to evaluate it as
-- * a number.
-- *
-- * @param key A key string.
-- * @return An object which is the value.
-- */
-- public int optInt(final String key)
-- {
-- return optInt(key, 0);
-- }
--
-- /**
-- * Get an optional int value associated with a key,
-- * or the default if there is no such key or if the value is not a number.
-- * If the value is a string, an attempt will be made to evaluate it as
-- * a number.
-- *
-- * @param key A key string.
-- * @param defaultValue The default.
-- * @return An object which is the value.
-- */
-- public int optInt(final String key, final int defaultValue)
-- {
-- try
-- {
-- return getInt(key);
-- }
-- catch (Exception e)
-- {
-- return defaultValue;
-- }
-- }
--
-- /**
-- * Get an optional JSONArray associated with a key.
-- * It returns null if there is no such key, or if its value is not a
-- * JSONArray.
-- *
-- * @param key A key string.
-- * @return A JSONArray which is the value.
-- */
-- public JSONArray optJSONArray(final String key)
-- {
-- Object o = opt(key);
-- return o instanceof JSONArray ? (JSONArray)o : null;
-- }
--
-- /**
-- * Get an optional JSONObject associated with a key.
-- * It returns null if there is no such key, or if its value is not a
-- * JSONObject.
-- *
-- * @param key A key string.
-- * @return A JSONObject which is the value.
-- */
-- public JSONObject optJSONObject(final String key)
-- {
-- Object o = opt(key);
-- return o instanceof JSONObject ? (JSONObject)o : null;
-- }
--
-- /**
-- * Get an optional long value associated with a key,
-- * or zero if there is no such key or if the value is not a number.
-- * If the value is a string, an attempt will be made to evaluate it as
-- * a number.
-- *
-- * @param key A key string.
-- * @return An object which is the value.
-- */
-- public long optLong(final String key)
-- {
-- return optLong(key, 0);
-- }
--
-- /**
-- * Get an optional long value associated with a key,
-- * or the default if there is no such key or if the value is not a number.
-- * If the value is a string, an attempt will be made to evaluate it as
-- * a number.
-- *
-- * @param key A key string.
-- * @param defaultValue The default.
-- * @return An object which is the value.
-- */
-- public long optLong(final String key, final long defaultValue)
-- {
-- try
-- {
-- return getLong(key);
-- }
-- catch (Exception e)
-- {
-- return defaultValue;
-- }
-- }
--
-- /**
-- * Get an optional string associated with a key.
-- * It returns an empty string if there is no such key. If the value is not
-- * a string and is not null, then it is converted to a string.
-- *
-- * @param key A key string.
-- * @return A string which is the value.
-- */
-- public String optString(final String key)
-- {
-- return optString(key, "");
-- }
--
-- /**
-- * Get an optional string associated with a key.
-- * It returns the defaultValue if there is no such key.
-- *
-- * @param key A key string.
-- * @param defaultValue The default.
-- * @return A string which is the value.
-- */
-- public String optString(final String key, final String defaultValue)
-- {
-- Object o = opt(key);
-- return o != null ? o.toString() : defaultValue;
-- }
--
-- /**
-- * Put a key/boolean pair in the JSONObject.
-- *
-- * @param key A key string.
-- * @param value A boolean which is the value.
-- * @return this.
-- * @throws JSONException If the key is null.
-- */
-- public JSONObject put(final String key, final boolean value) throws JSONException
-- {
-- put(key, value ? Boolean.TRUE : Boolean.FALSE);
-- return this;
-- }
--
-- /**
-- * Put a key/double pair in the JSONObject.
-- *
-- * @param key A key string.
-- * @param value A double which is the value.
-- * @return this.
-- * @throws JSONException If the key is null or if the number is invalid.
-- */
-- public JSONObject put(final String key, final double value) throws JSONException
-- {
-- put(key, new Double(value));
-- return this;
-- }
--
-- /**
-- * Put a key/int pair in the JSONObject.
-- *
-- * @param key A key string.
-- * @param value An int which is the value.
-- * @return this.
-- * @throws JSONException If the key is null.
-- */
-- public JSONObject put(final String key, final int value) throws JSONException
-- {
-- put(key, Integer.valueOf(value));
-- return this;
-- }
--
-- /**
-- * Put a key/long pair in the JSONObject.
-- *
-- * @param key A key string.
-- * @param value A long which is the value.
-- * @return this.
-- * @throws JSONException If the key is null.
-- */
-- public JSONObject put(final String key, final long value) throws JSONException
-- {
-- put(key, Long.valueOf(value));
-- return this;
-- }
--
-- /**
-- * Put a key/value pair in the JSONObject, where the value will be a
-- * JSONObject which is produced from a Map.
-- * @param key A key string.
-- * @param value A Map value.
-- * @return this.
-- * @throws JSONException
-- */
-- public JSONObject put(final String key, final Map value) throws JSONException
-- {
-- put(key, new JSONObject(value));
-- return this;
-- }
--
-- /**
-- * Put a key/value pair in the JSONObject. If the value is null,
-- * then the key will be removed from the JSONObject if it is present.
-- * @param key A key string.
-- * @param value An object which is the value. It should be of one of these
-- * types: Boolean, Double, Integer, JSONArray, JSONObject, Long, String,
-- * or the JSONObject.NULL object.
-- * @return this.
-- * @throws JSONException If the value is non-finite number
-- * or if the key is null.
-- */
-- public JSONObject put(final String key, final Object value) throws JSONException
-- {
-- if (key == null)
-- {
-- throw new JSONException("Null key.");
-- }
-- if (value != null)
-- {
-- JSONObject.testValidity(value);
-- map.put(key, value);
-- }
-- else
-- {
-- remove(key);
-- }
-- return this;
-- }
--
-- /**
-- * Put a key/value pair in the JSONObject, but only if the key and the
-- * value are both non-null, and only if there is not already a member
-- * with that name.
-- * @param key
-- * @param value
-- * @return his.
-- * @throws JSONException if the key is a duplicate
-- */
-- public JSONObject putOnce(final String key, final Object value) throws JSONException
-- {
-- if (key != null && value != null)
-- {
-- if (opt(key) != null)
-- {
-- throw new JSONException("Duplicate key \"" + key + "\"");
-- }
-- put(key, value);
-- }
-- return this;
-- }
--
-- /**
-- * Put a key/value pair in the JSONObject, but only if the
-- * key and the value are both non-null.
-- * @param key A key string.
-- * @param value An object which is the value. It should be of one of these
-- * types: Boolean, Double, Integer, JSONArray, JSONObject, Long, String,
-- * or the JSONObject.NULL object.
-- * @return this.
-- * @throws JSONException If the value is a non-finite number.
-- */
-- public JSONObject putOpt(final String key, final Object value) throws JSONException
-- {
-- if (key != null && value != null)
-- {
-- put(key, value);
-- }
-- return this;
-- }
--
-- /**
-- * Produce a string in double quotes with backslash sequences in all the
-- * right places. A backslash will be inserted within </, allowing JSON
-- * text to be delivered in HTML. In JSON text, a string cannot contain a
-- * control character or an unescaped quote or backslash.
-- * @param string A String
-- * @return A String correctly formatted for insertion in a JSON text.
-- */
-- public static String quote(final String string)
-- {
-- if (string == null || string.length() == 0)
-- {
-- return "\"\"";
-- }
--
-- char b;
-- char c = 0;
-- int i;
-- int len = string.length();
-- StringBuffer sb = new StringBuffer(len + 4);
-- String t;
--
-- sb.append('"');
-- for (i = 0; i < len; i += 1)
-- {
-- b = c;
-- c = string.charAt(i);
-- switch (c)
-- {
-- case '\\':
-- case '"':
-- sb.append('\\');
-- sb.append(c);
-- break;
-- case '/':
-- if (b == '<')
-- {
-- sb.append('\\');
-- }
-- sb.append(c);
-- break;
-- case '\b':
-- sb.append("\\b");
-- break;
-- case '\t':
-- sb.append("\\t");
-- break;
-- case '\n':
-- sb.append("\\n");
-- break;
-- case '\f':
-- sb.append("\\f");
-- break;
-- case '\r':
-- sb.append("\\r");
-- break;
-- default:
-- if (c < ' ' || c >= '\u0080' && c < '\u00a0' || c >= '\u2000' && c < '\u2100')
-- {
-- t = "000" + Integer.toHexString(c);
-- sb.append("\\u" + t.substring(t.length() - 4));
-- }
-- else
-- {
-- sb.append(c);
-- }
-- }
-- }
-- sb.append('"');
-- return sb.toString();
-- }
--
-- /**
-- * Remove a name and its value, if present.
-- * @param key The name to be removed.
-- * @return The value that was associated with the name,
-- * or null if there was no value.
-- */
-- public Object remove(final String key)
-- {
-- return map.remove(key);
-- }
--
-- /**
-- * Get an enumeration of the keys of the JSONObject.
-- * The keys will be sorted alphabetically.
-- *
-- * @return An iterator of the keys.
-- */
-- public Iterator sortedKeys()
-- {
-- return new TreeSet(map.keySet()).iterator();
-- }
--
-- /**
-- * Try to convert a string into a number, boolean, or null. If the string
-- * can't be converted, return the string.
-- * @param s A String.
-- * @return A simple JSON value.
-- */
-- public static Object stringToValue(final String s)
-- {
-- if (s.equals(""))
-- {
-- return s;
-- }
-- if (s.equalsIgnoreCase("true"))
-- {
-- return Boolean.TRUE;
-- }
-- if (s.equalsIgnoreCase("false"))
-- {
-- return Boolean.FALSE;
-- }
-- if (s.equalsIgnoreCase("null"))
-- {
-- return JSONObject.NULL;
-- }
--
-- /*
-- * If it might be a number, try converting it. We support the 0- and 0x-
-- * conventions. If a number cannot be produced, then the value will just
-- * be a string. Note that the 0-, 0x-, plus, and implied string
-- * conventions are non-standard. A JSON parser is free to accept
-- * non-JSON forms as long as it accepts all correct JSON forms.
-- */
--
-- char b = s.charAt(0);
-- if (b >= '0' && b <= '9' || b == '.' || b == '-' || b == '+')
-- {
-- if (b == '0')
-- {
-- if (s.length() > 2 && (s.charAt(1) == 'x' || s.charAt(1) == 'X'))
-- {
-- try
-- {
-- return Integer.valueOf(Integer.parseInt(s.substring(2), 16));
-- }
-- catch (Exception e)
-- {
-- /* Ignore the error */
-- }
-- }
-- else
-- {
-- try
-- {
-- return Integer.valueOf(Integer.parseInt(s, 8));
-- }
-- catch (Exception e)
-- {
-- /* Ignore the error */
-- }
-- }
-- }
-- try
-- {
-- if (s.indexOf('.') > -1 || s.indexOf('e') > -1 || s.indexOf('E') > -1)
-- {
-- return Double.valueOf(s);
-- }
-- else
-- {
-- Long myLong = Long.valueOf(s);
-- if (myLong.longValue() == myLong.intValue())
-- {
-- return Integer.valueOf(myLong.intValue());
-- }
-- else
-- {
-- return myLong;
-- }
-- }
-- }
-- catch (Exception f)
-- {
-- /* Ignore the error */
-- }
-- }
-- return s;
-- }
--
-- /**
-- * Throw an exception if the object is an NaN or infinite number.
-- * @param o The object to test.
-- * @throws JSONException If o is a non-finite number.
-- */
-- static void testValidity(final Object o) throws JSONException
-- {
-- if (o != null)
-- {
-- if (o instanceof Double)
-- {
-- if (((Double)o).isInfinite() || ((Double)o).isNaN())
-- {
-- throw new JSONException("JSON does not allow non-finite numbers.");
-- }
-- }
-- else if (o instanceof Float)
-- {
-- if (((Float)o).isInfinite() || ((Float)o).isNaN())
-- {
-- throw new JSONException("JSON does not allow non-finite numbers.");
-- }
-- }
-- }
-- }
--
-- /**
-- * Produce a JSONArray containing the values of the members of this
-- * JSONObject.
-- * @param names A JSONArray containing a list of key strings. This
-- * determines the sequence of the values in the result.
-- * @return A JSONArray of values.
-- * @throws JSONException If any of the values are non-finite numbers.
-- */
-- public JSONArray toJSONArray(final JSONArray names) throws JSONException
-- {
-- if (names == null || names.length() == 0)
-- {
-- return null;
-- }
-- JSONArray ja = new JSONArray();
-- for (int i = 0; i < names.length(); i += 1)
-- {
-- ja.put(opt(names.getString(i)));
-- }
-- return ja;
-- }
--
-- /**
-- * Make a JSON text of this JSONObject. For compactness, no whitespace
-- * is added. If this would not result in a syntactically correct JSON text,
-- * then null will be returned instead.
-- *
-- * Warning: This method assumes that the data structure is acyclical.
-- *
-- * @return a printable, displayable, portable, transmittable
-- * representation of the object, beginning
-- * with {
(left brace) and ending
-- * with }
(right brace).
-- */
-- @Override
-- public String toString()
-- {
-- try
-- {
-- Iterator keys = keys();
-- StringBuilder sb = new StringBuilder("{");
--
-- while (keys.hasNext())
-- {
-- if (sb.length() > 1)
-- {
-- sb.append(',');
-- }
-- Object o = keys.next();
-- sb.append(JSONObject.quote(o.toString()));
-- sb.append(':');
-- sb.append(JSONObject.valueToString(map.get(o)));
-- }
-- sb.append('}');
-- return sb.toString();
-- }
-- catch (JSONException e)
-- {
-- return null;
-- }
-- }
--
-- /**
-- * Make a prettyprinted JSON text of this JSONObject.
-- *
-- * Warning: This method assumes that the data structure is acyclical.
-- * @param indentFactor The number of spaces to add to each level of
-- * indentation.
-- * @return a printable, displayable, portable, transmittable
-- * representation of the object, beginning
-- * with {
(left brace) and ending
-- * with }
(right brace).
-- * @throws JSONException If the object contains an invalid number.
-- */
-- public String toString(final int indentFactor) throws JSONException
-- {
-- return toString(indentFactor, 0);
-- }
--
-- /**
-- * Make a prettyprinted JSON text of this JSONObject.
-- *
-- * Warning: This method assumes that the data structure is acyclical.
-- * @param indentFactor The number of spaces to add to each level of
-- * indentation.
-- * @param indent The indentation of the top level.
-- * @return a printable, displayable, transmittable
-- * representation of the object, beginning
-- * with {
(left brace) and ending
-- * with }
(right brace).
-- * @throws JSONException If the object contains an invalid number.
-- */
-- String toString(final int indentFactor, final int indent) throws JSONException
-- {
-- int j;
-- int n = length();
-- if (n == 0)
-- {
-- return "{}";
-- }
-- Iterator keys = sortedKeys();
-- StringBuffer sb = new StringBuffer("{");
-- int newindent = indent + indentFactor;
-- Object o;
-- if (n == 1)
-- {
-- o = keys.next();
-- sb.append(JSONObject.quote(o.toString()));
-- sb.append(": ");
-- sb.append(JSONObject.valueToString(map.get(o), indentFactor, indent));
-- }
-- else
-- {
-- while (keys.hasNext())
-- {
-- o = keys.next();
-- if (sb.length() > 1)
-- {
-- sb.append(",\n");
-- }
-- else
-- {
-- sb.append('\n');
-- }
-- for (j = 0; j < newindent; j += 1)
-- {
-- sb.append(' ');
-- }
-- sb.append(JSONObject.quote(o.toString()));
-- sb.append(": ");
-- sb.append(JSONObject.valueToString(map.get(o), indentFactor, newindent));
-- }
-- if (sb.length() > 1)
-- {
-- sb.append('\n');
-- for (j = 0; j < indent; j += 1)
-- {
-- sb.append(' ');
-- }
-- }
-- }
-- sb.append('}');
-- return sb.toString();
-- }
--
-- /**
-- * Make a JSON text of an Object value. If the object has an
-- * value.toJSONString() method, then that method will be used to produce
-- * the JSON text. The method is required to produce a strictly
-- * conforming text. If the object does not contain a toJSONString
-- * method (which is the most common case), then a text will be
-- * produced by other means. If the value is an array or Collection,
-- * then a JSONArray will be made from it and its toJSONString method
-- * will be called. If the value is a MAP, then a JSONObject will be made
-- * from it and its toJSONString method will be called. Otherwise, the
-- * value's toString method will be called, and the result will be quoted.
-- *
-- *
-- * Warning: This method assumes that the data structure is acyclical.
-- * @param value The value to be serialized.
-- * @return a printable, displayable, transmittable
-- * representation of the object, beginning
-- * with {
(left brace) and ending
-- * with }
(right brace).
-- * @throws JSONException If the value is or contains an invalid number.
-- */
-- static String valueToString(final Object value) throws JSONException
-- {
-- if (value == null || JSONObject.NULL == value)
-- {
-- return "null";
-- }
-- if (value instanceof JSONString)
-- {
-- String o;
-- try
-- {
-- o = ((JSONString)value).toJSONString();
-- }
-- catch (RuntimeException e)
-- {
-- throw new JSONException(e);
-- }
-- if (o == null)
-- throw new JSONException("Bad value from toJSONString: " + o);
-- return o;
-- }
-- if (value instanceof Number)
-- {
-- return JSONObject.numberToString((Number)value);
-- }
-- if (value instanceof Boolean || value instanceof JSONObject || value instanceof JSONArray)
-- {
-- return value.toString();
-- }
-- if (value instanceof Map)
-- {
-- return new JSONObject((Map)value).toString();
-- }
-- if (value instanceof Collection)
-- {
-- return new JSONArray((Collection)value).toString();
-- }
-- if (value.getClass().isArray())
-- {
-- return new JSONArray(value).toString();
-- }
-- return JSONObject.quote(value.toString());
-- }
--
-- /**
-- * Make a prettyprinted JSON text of an object value.
-- *
-- * Warning: This method assumes that the data structure is acyclical.
-- * @param value The value to be serialized.
-- * @param indentFactor The number of spaces to add to each level of
-- * indentation.
-- * @param indent The indentation of the top level.
-- * @return a printable, displayable, transmittable
-- * representation of the object, beginning
-- * with {
(left brace) and ending
-- * with }
(right brace).
-- * @throws JSONException If the object contains an invalid number.
-- */
-- static String valueToString(final Object value, final int indentFactor, final int indent) throws JSONException
-- {
-- if (value == null || JSONObject.NULL == value)
-- {
-- return "null";
-- }
-- try
-- {
-- if (value instanceof JSONString)
-- {
-- String o = ((JSONString)value).toJSONString();
-- if (o != null)
-- return o;
-- }
-- }
-- catch (RuntimeException e)
-- {
-- /* forget about it */
-- }
-- if (value instanceof Number)
-- {
-- return JSONObject.numberToString((Number)value);
-- }
-- if (value instanceof Boolean)
-- {
-- return value.toString();
-- }
-- if (value instanceof JSONObject)
-- {
-- return ((JSONObject)value).toString(indentFactor, indent);
-- }
-- if (value instanceof JSONArray)
-- {
-- return ((JSONArray)value).toString(indentFactor, indent);
-- }
-- if (value instanceof Map)
-- {
-- return new JSONObject((Map)value).toString(indentFactor, indent);
-- }
-- if (value instanceof Collection)
-- {
-- return new JSONArray((Collection)value).toString(indentFactor, indent);
-- }
-- if (value.getClass().isArray())
-- {
-- return new JSONArray(value).toString(indentFactor, indent);
-- }
-- return JSONObject.quote(value.toString());
-- }
--
-- /**
-- * Write the contents of the JSONObject as JSON text to a writer.
-- * For compactness, no whitespace is added.
-- *
-- * Warning: This method assumes that the data structure is acyclical.
-- *
-- * @return The writer.
-- * @throws JSONException
-- */
-- public Writer write(final Writer writer) throws JSONException
-- {
-- try
-- {
-- boolean b = false;
-- Iterator keys = keys();
-- writer.write('{');
--
-- while (keys.hasNext())
-- {
-- if (b)
-- {
-- writer.write(',');
-- }
-- Object k = keys.next();
-- writer.write(JSONObject.quote(k.toString()));
-- writer.write(':');
-- Object v = map.get(k);
-- if (v instanceof JSONObject)
-- {
-- ((JSONObject)v).write(writer);
-- }
-- else if (v instanceof JSONArray)
-- {
-- ((JSONArray)v).write(writer);
-- }
-- else
-- {
-- writer.write(JSONObject.valueToString(v));
-- }
-- b = true;
-- }
-- writer.write('}');
-- return writer;
-- }
-- catch (IOException e)
-- {
-- throw new JSONException(e);
-- }
-- }
--}
-diff -Nru hornetq-HornetQ_2_4_7_Final/hornetq-core-client/src/main/java/org/hornetq/utils/json/JSONString.java hornetq-HornetQ_2_4_7_Final.javax.json/hornetq-core-client/src/main/java/org/hornetq/utils/json/JSONString.java
---- hornetq-HornetQ_2_4_7_Final/hornetq-core-client/src/main/java/org/hornetq/utils/json/JSONString.java 2015-04-13 20:00:17.000000000 +0200
-+++ hornetq-HornetQ_2_4_7_Final.javax.json/hornetq-core-client/src/main/java/org/hornetq/utils/json/JSONString.java 1970-01-01 01:00:00.000000000 +0100
-@@ -1,56 +0,0 @@
--/*
-- * Copyright 2005-2014 Red Hat, Inc.
-- * Red Hat licenses this file to you under the Apache License, version
-- * 2.0 (the "License"); you may not use this file except in compliance
-- * with the License. You may obtain a copy of the License at
-- * http://www.apache.org/licenses/LICENSE-2.0
-- * Unless required by applicable law or agreed to in writing, software
-- * distributed under the License is distributed on an "AS IS" BASIS,
-- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-- * implied. See the License for the specific language governing
-- * permissions and limitations under the License.
-- */
--/*
--Copyright (c) 2002 JSON.org
--
--Permission is hereby granted, free of charge, to any person obtaining a copy
--of this software and associated documentation files (the "Software"), to deal
--in the Software without restriction, including without limitation the rights
--to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
--copies of the Software, and to permit persons to whom the Software is
--furnished to do so, subject to the following conditions:
--
--The above copyright notice and this permission notice shall be included in all
--copies or substantial portions of the Software.
--
--The Software shall be used for Good, not Evil.
--
--THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
--IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
--FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
--AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
--LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
--OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
--SOFTWARE.
--*/
--
--package org.hornetq.utils.json;
--
--/**
-- * The JSONString
interface allows a toJSONString()
-- * method so that a class can change the behavior of
-- * JSONObject.toString()
, JSONArray.toString()
,
-- * and JSONWriter.value(
Object)
. The
-- * toJSONString
method will be used instead of the default behavior
-- * of using the Object's toString()
method and quoting the result.
-- */
--public interface JSONString
--{
-- /**
-- * The toJSONString
method allows a class to produce its own JSON
-- * serialization.
-- *
-- * @return A strictly syntactically correct JSON text.
-- */
-- String toJSONString();
--}
-diff -Nru hornetq-HornetQ_2_4_7_Final/hornetq-core-client/src/main/java/org/hornetq/utils/json/JSONTokener.java hornetq-HornetQ_2_4_7_Final.javax.json/hornetq-core-client/src/main/java/org/hornetq/utils/json/JSONTokener.java
---- hornetq-HornetQ_2_4_7_Final/hornetq-core-client/src/main/java/org/hornetq/utils/json/JSONTokener.java 2015-04-13 20:00:17.000000000 +0200
-+++ hornetq-HornetQ_2_4_7_Final.javax.json/hornetq-core-client/src/main/java/org/hornetq/utils/json/JSONTokener.java 1970-01-01 01:00:00.000000000 +0100
-@@ -1,476 +0,0 @@
--/*
-- * Copyright 2005-2014 Red Hat, Inc.
-- * Red Hat licenses this file to you under the Apache License, version
-- * 2.0 (the "License"); you may not use this file except in compliance
-- * with the License. You may obtain a copy of the License at
-- * http://www.apache.org/licenses/LICENSE-2.0
-- * Unless required by applicable law or agreed to in writing, software
-- * distributed under the License is distributed on an "AS IS" BASIS,
-- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-- * implied. See the License for the specific language governing
-- * permissions and limitations under the License.
-- */
--/*
--Copyright (c) 2002 JSON.org
--
--Permission is hereby granted, free of charge, to any person obtaining a copy
--of this software and associated documentation files (the "Software"), to deal
--in the Software without restriction, including without limitation the rights
--to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
--copies of the Software, and to permit persons to whom the Software is
--furnished to do so, subject to the following conditions:
--
--The above copyright notice and this permission notice shall be included in all
--copies or substantial portions of the Software.
--
--The Software shall be used for Good, not Evil.
--
--THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
--IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
--FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
--AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
--LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
--OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
--SOFTWARE.
--*/
--
--package org.hornetq.utils.json;
--
--import java.io.BufferedReader;
--import java.io.IOException;
--import java.io.Reader;
--import java.io.StringReader;
--
--/**
-- * A JSONTokener takes a source string and extracts characters and tokens from
-- * it. It is used by the JSONObject and JSONArray constructors to parse
-- * JSON source strings.
-- * @author JSON.org
-- * @version 2008-09-18
-- */
--public class JSONTokener
--{
--
-- private int index;
--
-- private final Reader reader;
--
-- private char lastChar;
--
-- private boolean useLastChar;
--
-- /**
-- * Construct a JSONTokener from a string.
-- *
-- * @param reader A reader.
-- */
-- public JSONTokener(final Reader reader)
-- {
-- this.reader = reader.markSupported() ? reader : new BufferedReader(reader);
-- useLastChar = false;
-- index = 0;
-- }
--
-- /**
-- * Construct a JSONTokener from a string.
-- *
-- * @param s A source string.
-- */
-- public JSONTokener(final String s)
-- {
-- this(new StringReader(s));
-- }
--
-- /**
-- * Back up one character. This provides a sort of lookahead capability,
-- * so that you can test for a digit or letter before attempting to parse
-- * the next number or identifier.
-- */
-- public void back() throws JSONException
-- {
-- if (useLastChar || index <= 0)
-- {
-- throw new JSONException("Stepping back two steps is not supported");
-- }
-- index -= 1;
-- useLastChar = true;
-- }
--
-- /**
-- * Get the hex value of a character (base16).
-- * @param c A character between '0' and '9' or between 'A' and 'F' or
-- * between 'a' and 'f'.
-- * @return An int between 0 and 15, or -1 if c was not a hex digit.
-- */
-- public static int dehexchar(final char c)
-- {
-- if (c >= '0' && c <= '9')
-- {
-- return c - '0';
-- }
-- if (c >= 'A' && c <= 'F')
-- {
-- return c - ('A' - 10);
-- }
-- if (c >= 'a' && c <= 'f')
-- {
-- return c - ('a' - 10);
-- }
-- return -1;
-- }
--
-- /**
-- * Determine if the source string still contains characters that next()
-- * can consume.
-- * @return true if not yet at the end of the source.
-- */
-- public boolean more() throws JSONException
-- {
-- char nextChar = next();
-- if (nextChar == 0)
-- {
-- return false;
-- }
-- back();
-- return true;
-- }
--
-- /**
-- * Get the next character in the source string.
-- *
-- * @return The next character, or 0 if past the end of the source string.
-- */
-- public char next() throws JSONException
-- {
-- if (useLastChar)
-- {
-- useLastChar = false;
-- if (lastChar != 0)
-- {
-- index += 1;
-- }
-- return lastChar;
-- }
-- int c;
-- try
-- {
-- c = reader.read();
-- }
-- catch (IOException exc)
-- {
-- throw new JSONException(exc);
-- }
--
-- if (c <= 0)
-- { // End of stream
-- lastChar = 0;
-- return 0;
-- }
-- index += 1;
-- lastChar = (char)c;
-- return lastChar;
-- }
--
-- /**
-- * Consume the next character, and check that it matches a specified
-- * character.
-- * @param c The character to match.
-- * @return The character.
-- * @throws JSONException if the character does not match.
-- */
-- public char next(final char c) throws JSONException
-- {
-- char n = next();
-- if (n != c)
-- {
-- throw syntaxError("Expected '" + c + "' and instead saw '" + n + "'");
-- }
-- return n;
-- }
--
-- /**
-- * Get the next n characters.
-- *
-- * @param n The number of characters to take.
-- * @return A string of n characters.
-- * @throws JSONException
-- * Substring bounds error if there are not
-- * n characters remaining in the source string.
-- */
-- public String next(final int n) throws JSONException
-- {
-- if (n == 0)
-- {
-- return "";
-- }
--
-- char[] buffer = new char[n];
-- int pos = 0;
--
-- if (useLastChar)
-- {
-- useLastChar = false;
-- buffer[0] = lastChar;
-- pos = 1;
-- }
--
-- try
-- {
-- int len;
-- while (pos < n && (len = reader.read(buffer, pos, n - pos)) != -1)
-- {
-- pos += len;
-- }
-- }
-- catch (IOException exc)
-- {
-- throw new JSONException(exc);
-- }
-- index += pos;
--
-- if (pos < n)
-- {
-- throw syntaxError("Substring bounds error");
-- }
--
-- lastChar = buffer[n - 1];
-- return new String(buffer);
-- }
--
-- /**
-- * Get the next char in the string, skipping whitespace.
-- * @throws JSONException
-- * @return A character, or 0 if there are no more characters.
-- */
-- public char nextClean() throws JSONException
-- {
-- for (;;)
-- {
-- char c = next();
-- if (c == 0 || c > ' ')
-- {
-- return c;
-- }
-- }
-- }
--
-- /**
-- * Return the characters up to the next close quote character.
-- * Backslash processing is done. The formal JSON format does not
-- * allow strings in single quotes, but an implementation is allowed to
-- * accept them.
-- * @param quote The quoting character, either
-- * "
(double quote) or
-- * '
(single quote).
-- * @return A String.
-- * @throws JSONException Unterminated string.
-- */
-- public String nextString(final char quote) throws JSONException
-- {
-- char c;
-- StringBuffer sb = new StringBuffer();
-- for (;;)
-- {
-- c = next();
-- switch (c)
-- {
-- case 0:
-- case '\n':
-- case '\r':
-- throw syntaxError("Unterminated string");
-- case '\\':
-- c = next();
-- switch (c)
-- {
-- case 'b':
-- sb.append('\b');
-- break;
-- case 't':
-- sb.append('\t');
-- break;
-- case 'n':
-- sb.append('\n');
-- break;
-- case 'f':
-- sb.append('\f');
-- break;
-- case 'r':
-- sb.append('\r');
-- break;
-- case 'u':
-- sb.append((char)Integer.parseInt(next(4), 16));
-- break;
-- case 'x':
-- sb.append((char)Integer.parseInt(next(2), 16));
-- break;
-- default:
-- sb.append(c);
-- }
-- break;
-- default:
-- if (c == quote)
-- {
-- return sb.toString();
-- }
-- sb.append(c);
-- }
-- }
-- }
--
-- /**
-- * Get the text up but not including the specified character or the
-- * end of line, whichever comes first.
-- * @param d A delimiter character.
-- * @return A string.
-- */
-- public String nextTo(final char d) throws JSONException
-- {
-- StringBuffer sb = new StringBuffer();
-- for (;;)
-- {
-- char c = next();
-- if (c == d || c == 0 || c == '\n' || c == '\r')
-- {
-- if (c != 0)
-- {
-- back();
-- }
-- return sb.toString().trim();
-- }
-- sb.append(c);
-- }
-- }
--
-- /**
-- * Get the text up but not including one of the specified delimiter
-- * characters or the end of line, whichever comes first.
-- * @param delimiters A set of delimiter characters.
-- * @return A string, trimmed.
-- */
-- public String nextTo(final String delimiters) throws JSONException
-- {
-- char c;
-- StringBuffer sb = new StringBuffer();
-- for (;;)
-- {
-- c = next();
-- if (delimiters.indexOf(c) >= 0 || c == 0 || c == '\n' || c == '\r')
-- {
-- if (c != 0)
-- {
-- back();
-- }
-- return sb.toString().trim();
-- }
-- sb.append(c);
-- }
-- }
--
-- /**
-- * Get the next value. The value can be a Boolean, Double, Integer,
-- * JSONArray, JSONObject, Long, or String, or the JSONObject.NULL object.
-- * @throws JSONException If syntax error.
-- *
-- * @return An object.
-- */
-- public Object nextValue() throws JSONException
-- {
-- char c = nextClean();
-- String s;
--
-- switch (c)
-- {
-- case '"':
-- case '\'':
-- return nextString(c);
-- case '{':
-- back();
-- return new JSONObject(this);
-- case '[':
-- case '(':
-- back();
-- return new JSONArray(this);
-- }
--
-- /*
-- * Handle unquoted text. This could be the values true, false, or
-- * null, or it can be a number. An implementation (such as this one)
-- * is allowed to also accept non-standard forms.
-- *
-- * Accumulate characters until we reach the end of the text or a
-- * formatting character.
-- */
--
-- StringBuffer sb = new StringBuffer();
-- while (c >= ' ' && ",:]}/\\\"[{;=#".indexOf(c) < 0)
-- {
-- sb.append(c);
-- c = next();
-- }
-- back();
--
-- s = sb.toString().trim();
-- if (s.equals(""))
-- {
-- throw syntaxError("Missing value");
-- }
-- return JSONObject.stringToValue(s);
-- }
--
-- /**
-- * Skip characters until the next character is the requested character.
-- * If the requested character is not found, no characters are skipped.
-- * @param to A character to skip to.
-- * @return The requested character, or zero if the requested character
-- * is not found.
-- */
-- public char skipTo(final char to) throws JSONException
-- {
-- char c;
-- try
-- {
-- int startIndex = index;
-- reader.mark(Integer.MAX_VALUE);
-- do
-- {
-- c = next();
-- if (c == 0)
-- {
-- reader.reset();
-- index = startIndex;
-- return c;
-- }
-- }
-- while (c != to);
-- }
-- catch (IOException exc)
-- {
-- throw new JSONException(exc);
-- }
--
-- back();
-- return c;
-- }
--
-- /**
-- * Make a JSONException to signal a syntax error.
-- *
-- * @param message The error message.
-- * @return A JSONException object, suitable for throwing
-- */
-- public JSONException syntaxError(final String message)
-- {
-- return new JSONException(message + toString());
-- }
--
-- /**
-- * Make a printable string of this JSONTokener.
-- *
-- * @return " at character [this.index]"
-- */
-- @Override
-- public String toString()
-- {
-- return " at character " + index;
-- }
--}
-\ Manca newline alla fine del file
-diff -Nru hornetq-HornetQ_2_4_7_Final/hornetq-jms-client/src/main/java/org/hornetq/api/jms/management/JMSConnectionInfo.java hornetq-HornetQ_2_4_7_Final.javax.json/hornetq-jms-client/src/main/java/org/hornetq/api/jms/management/JMSConnectionInfo.java
---- hornetq-HornetQ_2_4_7_Final/hornetq-jms-client/src/main/java/org/hornetq/api/jms/management/JMSConnectionInfo.java 2015-04-13 20:00:17.000000000 +0200
-+++ hornetq-HornetQ_2_4_7_Final.javax.json/hornetq-jms-client/src/main/java/org/hornetq/api/jms/management/JMSConnectionInfo.java 2016-07-18 13:32:39.244998230 +0200
-@@ -12,8 +12,10 @@
- */
- package org.hornetq.api.jms.management;
-
--import org.hornetq.utils.json.JSONArray;
--import org.hornetq.utils.json.JSONObject;
-+import org.hornetq.api.core.JsonUtil;
-+
-+import javax.json.JsonArray;
-+import javax.json.JsonObject;
-
- /**
- * A JMSConnectionInfo
-@@ -40,19 +42,17 @@
-
- public static JMSConnectionInfo[] from(final String jsonString) throws Exception
- {
-- JSONArray array = new JSONArray(jsonString);
-- JMSConnectionInfo[] infos = new JMSConnectionInfo[array.length()];
-- for (int i = 0; i < array.length(); i++)
-- {
-- JSONObject obj = array.getJSONObject(i);
-+ JsonArray array = JsonUtil.readJsonArray(jsonString);
-+ JMSConnectionInfo[] infos = new JMSConnectionInfo[array.size()];
-+ for (int i = 0; i < array.size(); i++) {
-+ JsonObject obj = array.getJsonObject(i);
- String cid = obj.isNull("clientID") ? null : obj.getString("clientID");
- String uname = obj.isNull("principal") ? null : obj.getString("principal");
-
- JMSConnectionInfo info = new JMSConnectionInfo(obj.getString("connectionID"),
-- obj.getString("clientAddress"),
-- obj.getLong("creationTime"),
-- cid,
-- uname);
-+ obj.getString("clientAddress"),
-+ obj.getJsonNumber("creationTime").longValue(),
-+ cid, uname);
- infos[i] = info;
- }
- return infos;
-diff -Nru hornetq-HornetQ_2_4_7_Final/hornetq-jms-client/src/main/java/org/hornetq/api/jms/management/JMSConsumerInfo.java hornetq-HornetQ_2_4_7_Final.javax.json/hornetq-jms-client/src/main/java/org/hornetq/api/jms/management/JMSConsumerInfo.java
---- hornetq-HornetQ_2_4_7_Final/hornetq-jms-client/src/main/java/org/hornetq/api/jms/management/JMSConsumerInfo.java 2015-04-13 20:00:17.000000000 +0200
-+++ hornetq-HornetQ_2_4_7_Final.javax.json/hornetq-jms-client/src/main/java/org/hornetq/api/jms/management/JMSConsumerInfo.java 2016-07-18 10:39:36.287538583 +0200
-@@ -12,8 +12,10 @@
- */
- package org.hornetq.api.jms.management;
-
--import org.hornetq.utils.json.JSONArray;
--import org.hornetq.utils.json.JSONObject;
-+import org.hornetq.api.core.JsonUtil;
-+
-+import javax.json.JsonArray;
-+import javax.json.JsonObject;
-
- /**
- * Helper class to create Java Objects from the
-@@ -47,19 +49,18 @@
- */
- public static JMSConsumerInfo[] from(final String jsonString) throws Exception
- {
-- JSONArray array = new JSONArray(jsonString);
-- JMSConsumerInfo[] infos = new JMSConsumerInfo[array.length()];
-- for (int i = 0; i < array.length(); i++)
-- {
-- JSONObject sub = array.getJSONObject(i);
-+ JsonArray array = JsonUtil.readJsonArray(jsonString);
-+ JMSConsumerInfo[] infos = new JMSConsumerInfo[array.size()];
-+ for (int i = 0; i < array.size(); i++) {
-+ JsonObject sub = array.getJsonObject(i);
- JMSConsumerInfo info = new JMSConsumerInfo(sub.getString("consumerID"),
-- sub.getString("connectionID"),
-- sub.getString("destinationName"),
-- sub.getString("destinationType"),
-- sub.getBoolean("browseOnly"),
-- sub.getLong("creationTime"),
-- sub.getBoolean("durable"),
-- sub.optString("filter", null));
-+ sub.getString("connectionID"),
-+ sub.getString("destinationName"),
-+ sub.getString("destinationType"),
-+ sub.getBoolean("browseOnly"),
-+ sub.getJsonNumber("creationTime").longValue(),
-+ sub.getBoolean("durable"),
-+ sub.getString("filter", null));
- infos[i] = info;
- }
-
-diff -Nru hornetq-HornetQ_2_4_7_Final/hornetq-jms-client/src/main/java/org/hornetq/api/jms/management/JMSSessionInfo.java hornetq-HornetQ_2_4_7_Final.javax.json/hornetq-jms-client/src/main/java/org/hornetq/api/jms/management/JMSSessionInfo.java
---- hornetq-HornetQ_2_4_7_Final/hornetq-jms-client/src/main/java/org/hornetq/api/jms/management/JMSSessionInfo.java 2015-04-13 20:00:17.000000000 +0200
-+++ hornetq-HornetQ_2_4_7_Final.javax.json/hornetq-jms-client/src/main/java/org/hornetq/api/jms/management/JMSSessionInfo.java 2016-07-18 10:45:03.905973846 +0200
-@@ -12,9 +12,10 @@
- */
- package org.hornetq.api.jms.management;
-
--import org.hornetq.utils.json.JSONArray;
--import org.hornetq.utils.json.JSONException;
--import org.hornetq.utils.json.JSONObject;
-+import org.hornetq.api.core.JsonUtil;
-+
-+import javax.json.JsonArray;
-+import javax.json.JsonObject;
-
- /**
- * A JMSSessionInfo
-@@ -35,16 +36,14 @@
- this.creationTime = creationTime;
- }
-
-- public static JMSSessionInfo[] from(final String jsonString) throws JSONException
-- {
-- JSONArray array = new JSONArray(jsonString);
-- JMSSessionInfo[] infos = new JMSSessionInfo[array.length()];
-- for (int i = 0; i < array.length(); i++)
-- {
-- JSONObject obj = array.getJSONObject(i);
-+ public static JMSSessionInfo[] from(final String jsonString) {
-+ JsonArray array = JsonUtil.readJsonArray(jsonString);
-+ JMSSessionInfo[] infos = new JMSSessionInfo[array.size()];
-+ for (int i = 0; i < array.size(); i++) {
-+ JsonObject obj = array.getJsonObject(i);
-
- JMSSessionInfo info = new JMSSessionInfo(obj.getString("sessionID"),
-- obj.getLong("creationTime"));
-+ obj.getJsonNumber("creationTime").longValue());
- infos[i] = info;
- }
- return infos;
-diff -Nru hornetq-HornetQ_2_4_7_Final/hornetq-jms-client/src/main/java/org/hornetq/api/jms/management/SubscriptionInfo.java hornetq-HornetQ_2_4_7_Final.javax.json/hornetq-jms-client/src/main/java/org/hornetq/api/jms/management/SubscriptionInfo.java
---- hornetq-HornetQ_2_4_7_Final/hornetq-jms-client/src/main/java/org/hornetq/api/jms/management/SubscriptionInfo.java 2015-04-13 20:00:17.000000000 +0200
-+++ hornetq-HornetQ_2_4_7_Final.javax.json/hornetq-jms-client/src/main/java/org/hornetq/api/jms/management/SubscriptionInfo.java 2016-07-18 10:46:34.479678685 +0200
-@@ -12,8 +12,10 @@
- */
- package org.hornetq.api.jms.management;
-
--import org.hornetq.utils.json.JSONArray;
--import org.hornetq.utils.json.JSONObject;
-+import org.hornetq.api.core.JsonUtil;
-+
-+import javax.json.JsonArray;
-+import javax.json.JsonObject;
-
- /**
- * Helper class to create Java Objects from the
-@@ -45,18 +47,17 @@
- */
- public static SubscriptionInfo[] from(final String jsonString) throws Exception
- {
-- JSONArray array = new JSONArray(jsonString);
-- SubscriptionInfo[] infos = new SubscriptionInfo[array.length()];
-- for (int i = 0; i < array.length(); i++)
-- {
-- JSONObject sub = array.getJSONObject(i);
-+ JsonArray array = JsonUtil.readJsonArray(jsonString);
-+ SubscriptionInfo[] infos = new SubscriptionInfo[array.size()];
-+ for (int i = 0; i < array.size(); i++) {
-+ JsonObject sub = array.getJsonObject(i);
- SubscriptionInfo info = new SubscriptionInfo(sub.getString("queueName"),
-- sub.optString("clientID", null),
-- sub.optString("name", null),
-- sub.getBoolean("durable"),
-- sub.optString("selector", null),
-- sub.getInt("messageCount"),
-- sub.getInt("deliveringCount"));
-+ sub.getString("clientID", null),
-+ sub.getString("name", null),
-+ sub.getBoolean("durable"),
-+ sub.getString("selector", null),
-+ sub.getInt("messageCount"),
-+ sub.getInt("deliveringCount"));
- infos[i] = info;
- }
-
-diff -Nru hornetq-HornetQ_2_4_7_Final/hornetq-jms-server/pom.xml hornetq-HornetQ_2_4_7_Final.javax.json/hornetq-jms-server/pom.xml
---- hornetq-HornetQ_2_4_7_Final/hornetq-jms-server/pom.xml 2015-04-13 20:00:17.000000000 +0200
-+++ hornetq-HornetQ_2_4_7_Final.javax.json/hornetq-jms-server/pom.xml 2016-07-18 10:47:20.340503886 +0200
-@@ -45,6 +45,11 @@
- jboss-transaction-api_1.1_spec
-
-
-+ org.apache.geronimo.specs
-+ geronimo-json_1.0_spec
-+ 1.0-alpha-1
-+
-+
- org.jboss.jbossts.jts
- jbossjts-jacorb
- true
-diff -Nru hornetq-HornetQ_2_4_7_Final/hornetq-jms-server/src/main/java/org/hornetq/jms/management/impl/JMSQueueControlImpl.java hornetq-HornetQ_2_4_7_Final.javax.json/hornetq-jms-server/src/main/java/org/hornetq/jms/management/impl/JMSQueueControlImpl.java
---- hornetq-HornetQ_2_4_7_Final/hornetq-jms-server/src/main/java/org/hornetq/jms/management/impl/JMSQueueControlImpl.java 2015-04-13 20:00:17.000000000 +0200
-+++ hornetq-HornetQ_2_4_7_Final.javax.json/hornetq-jms-server/src/main/java/org/hornetq/jms/management/impl/JMSQueueControlImpl.java 2016-07-18 10:49:59.610951006 +0200
-@@ -12,6 +12,8 @@
- */
- package org.hornetq.jms.management.impl;
-
-+import javax.json.Json;
-+import javax.json.JsonArrayBuilder;
- import javax.management.MBeanInfo;
- import javax.management.StandardMBean;
- import java.util.HashMap;
-@@ -19,6 +21,7 @@
-
- import org.hornetq.api.core.FilterConstants;
- import org.hornetq.api.core.HornetQException;
-+import org.hornetq.api.core.JsonUtil;
- import org.hornetq.api.core.management.MessageCounterInfo;
- import org.hornetq.api.core.management.Operation;
- import org.hornetq.api.core.management.QueueControl;
-@@ -30,8 +33,6 @@
- import org.hornetq.jms.client.HornetQMessage;
- import org.hornetq.jms.client.SelectorTranslator;
- import org.hornetq.jms.server.JMSServerManager;
--import org.hornetq.utils.json.JSONArray;
--import org.hornetq.utils.json.JSONObject;
-
- /**
- * @author Jeff Mesnil
-@@ -64,10 +65,10 @@
-
- static String toJSON(final Map[] messages)
- {
-- JSONArray array = new JSONArray();
-+ JsonArrayBuilder array = Json.createArrayBuilder();
- for (Map message : messages)
- {
-- array.put(new JSONObject(message));
-+ array.add(JsonUtil.toJsonObject(message));
- }
- return array.toString();
- }
-diff -Nru hornetq-HornetQ_2_4_7_Final/hornetq-jms-server/src/main/java/org/hornetq/jms/management/impl/JMSServerControlImpl.java hornetq-HornetQ_2_4_7_Final.javax.json/hornetq-jms-server/src/main/java/org/hornetq/jms/management/impl/JMSServerControlImpl.java
---- hornetq-HornetQ_2_4_7_Final/hornetq-jms-server/src/main/java/org/hornetq/jms/management/impl/JMSServerControlImpl.java 2015-04-13 20:00:17.000000000 +0200
-+++ hornetq-HornetQ_2_4_7_Final.javax.json/hornetq-jms-server/src/main/java/org/hornetq/jms/management/impl/JMSServerControlImpl.java 2016-07-18 14:06:29.659716535 +0200
-@@ -13,6 +13,11 @@
- package org.hornetq.jms.management.impl;
-
- import javax.jms.JMSRuntimeException;
-+import javax.json.Json;
-+import javax.json.JsonArray;
-+import javax.json.JsonArrayBuilder;
-+import javax.json.JsonObject;
-+import javax.json.JsonObjectBuilder;
- import javax.management.ListenerNotFoundException;
- import javax.management.MBeanNotificationInfo;
- import javax.management.MBeanOperationInfo;
-@@ -23,6 +28,7 @@
- import javax.management.NotificationListener;
-
- import java.util.ArrayList;
-+import java.util.Collection;
- import java.util.HashMap;
- import java.util.List;
- import java.util.Map;
-@@ -50,8 +56,6 @@
- import org.hornetq.jms.server.management.JMSNotificationType;
- import org.hornetq.spi.core.protocol.RemotingConnection;
- import org.hornetq.utils.TypedProperties;
--import org.hornetq.utils.json.JSONArray;
--import org.hornetq.utils.json.JSONObject;
-
- /**
- * @author Jeff Mesnil
-@@ -730,7 +734,7 @@
-
- try
- {
-- JSONArray array = new JSONArray();
-+ JsonArrayBuilder array = Json.createArrayBuilder();
-
- Set connections = server.getHornetQServer().getRemotingService().getConnections();
-
-@@ -751,13 +755,14 @@
- ServerSession session = jmsSessions.get(connection.getID());
- if (session != null)
- {
-- JSONObject obj = new JSONObject();
-- obj.put("connectionID", connection.getID().toString());
-- obj.put("clientAddress", connection.getRemoteAddress());
-- obj.put("creationTime", connection.getCreationTime());
-- obj.put("clientID", session.getMetaData("jms-client-id"));
-- obj.put("principal", session.getUsername());
-- array.put(obj);
-+ JsonObject obj = Json.createObjectBuilder()
-+ .add("connectionID", connection.getID().toString())
-+ .add("clientAddress", connection.getRemoteAddress())
-+ .add("creationTime", connection.getCreationTime())
-+ .add("clientID", session.getMetaData("jms-client-id"))
-+ .add("principal", session.getUsername())
-+ .build();
-+ array.add(obj);
- }
- }
- return array.toString();
-@@ -776,7 +781,7 @@
-
- try
- {
-- JSONArray array = new JSONArray();
-+ JsonArrayBuilder array = Json.createArrayBuilder();
-
- Set connections = server.getHornetQServer().getRemotingService().getConnections();
- for (RemotingConnection connection : connections)
-@@ -784,21 +789,11 @@
- if (connectionID.equals(connection.getID().toString()))
- {
- List sessions = server.getHornetQServer().getSessions(connectionID);
-- for (ServerSession session : sessions)
-- {
-- Set consumers = session.getServerConsumers();
-- for (ServerConsumer consumer : consumers)
-- {
-- JSONObject obj = toJSONObject(consumer);
-- if (obj != null)
-- {
-- array.put(obj);
-- }
-- }
-- }
-+ JsonArray jsonSessions = toJsonArray(sessions);
-+ array.add(jsonSessions);
- }
- }
-- return array.toString();
-+ return array.build().toString();
- }
- finally
- {
-@@ -814,22 +809,8 @@
-
- try
- {
-- JSONArray array = new JSONArray();
--
-- Set sessions = server.getHornetQServer().getSessions();
-- for (ServerSession session : sessions)
-- {
-- Set consumers = session.getServerConsumers();
-- for (ServerConsumer consumer : consumers)
-- {
-- JSONObject obj = toJSONObject(consumer);
-- if (obj != null)
-- {
-- array.put(obj);
-- }
-- }
-- }
-- return array.toString();
-+ JsonArray jsonArray = toJsonArray(server.getHornetQServer().getSessions());
-+ return jsonArray.toString();
- }
- finally
- {
-@@ -966,16 +947,16 @@
-
- clearIO();
-
-- JSONArray array = new JSONArray();
-+ JsonArrayBuilder array = Json.createArrayBuilder();
- try
- {
- List sessions = server.getHornetQServer().getSessions(connectionID);
- for (ServerSession sess : sessions)
- {
-- JSONObject obj = new JSONObject();
-- obj.put("sessionID", sess.getName());
-- obj.put("creationTime", sess.getCreationTime());
-- array.put(obj);
-+ JsonObjectBuilder obj = Json.createObjectBuilder()
-+ .add("sessionID", sess.getName())
-+ .add("creationTime", sess.getCreationTime());
-+ array.add(obj);
- }
- }
- finally
-@@ -990,50 +971,49 @@
- return server.getHornetQServer().destroyConnectionWithSessionMetadata("jms-client-id", clientID);
- }
-
-- private JSONObject toJSONObject(ServerConsumer consumer) throws Exception
-- {
-- JSONObject obj = new JSONObject();
-- obj.put("consumerID", consumer.getID());
-- obj.put("connectionID", consumer.getConnectionID());
-- obj.put("sessionID", consumer.getSessionID());
-- obj.put("queueName", consumer.getQueue().getName().toString());
-- obj.put("browseOnly", consumer.isBrowseOnly());
-- obj.put("creationTime", consumer.getCreationTime());
-- // JMS consumer with message filter use the queue's filter
-- Filter queueFilter = consumer.getQueue().getFilter();
-- if (queueFilter != null)
-- {
-- obj.put("filter", queueFilter.getFilterString().toString());
-- }
-+ private JsonObject toJSONObject(ServerConsumer consumer) {
- String[] destinationInfo = determineJMSDestination(consumer.getQueue().getAddress().toString());
- if (destinationInfo == null)
- {
- return null;
- }
-- obj.put("destinationName", destinationInfo[0]);
-- obj.put("destinationType", destinationInfo[1]);
-+ JsonObjectBuilder obj = Json.createObjectBuilder()
-+ .add("consumerID", consumer.getID())
-+ .add("connectionID", consumer.getConnectionID().toString())
-+ .add("sessionID", consumer.getSessionID())
-+ .add("queueName", consumer.getQueue().getName().toString())
-+ .add("browseOnly", consumer.isBrowseOnly())
-+ .add("creationTime", consumer.getCreationTime())
-+ .add("destinationName", destinationInfo[0])
-+ .add("destinationType", destinationInfo[1]);
-+ Filter queueFilter = consumer.getQueue().getFilter();
-+ if (queueFilter != null) {
-+ obj.add("filter", queueFilter.getFilterString().toString());
-+ }
-+
-+
- if (destinationInfo[1].equals("topic"))
- {
- try
- {
- HornetQDestination.decomposeQueueNameForDurableSubscription(consumer.getQueue().getName().toString());
-- obj.put("durable", true);
-+ obj.add("durable", true);
- }
- catch (IllegalArgumentException e)
- {
-- obj.put("durable", false);
-+ obj.add("durable", false);
- }
- catch (JMSRuntimeException e)
- {
-- obj.put("durable", false);
-+ obj.add("durable", false);
- }
- }
- else
- {
-- obj.put("durable", false);
-+ obj.add("durable", false);
- }
-
-- return obj;
-+ return obj.build();
- }
-
- @Override
-@@ -1047,4 +1027,19 @@
- notifSeq.incrementAndGet(), prop.getSimpleStringProperty(JMSNotificationType.MESSAGE).toString()));
- }
-
-+ private JsonArray toJsonArray(Collection sessions) {
-+ JsonArrayBuilder array = Json.createArrayBuilder();
-+
-+ for (ServerSession session : sessions) {
-+ Set consumers = session.getServerConsumers();
-+ for (ServerConsumer consumer : consumers) {
-+ JsonObject obj = toJSONObject(consumer);
-+ if (obj != null) {
-+ array.add(obj);
-+ }
-+ }
-+ }
-+ return array.build();
-+ }
-+
- }
-diff -Nru hornetq-HornetQ_2_4_7_Final/hornetq-jms-server/src/main/java/org/hornetq/jms/management/impl/JMSTopicControlImpl.java hornetq-HornetQ_2_4_7_Final.javax.json/hornetq-jms-server/src/main/java/org/hornetq/jms/management/impl/JMSTopicControlImpl.java
---- hornetq-HornetQ_2_4_7_Final/hornetq-jms-server/src/main/java/org/hornetq/jms/management/impl/JMSTopicControlImpl.java 2015-04-13 20:00:17.000000000 +0200
-+++ hornetq-HornetQ_2_4_7_Final.javax.json/hornetq-jms-server/src/main/java/org/hornetq/jms/management/impl/JMSTopicControlImpl.java 2016-07-18 11:01:54.308539109 +0200
-@@ -17,6 +17,9 @@
- import java.util.List;
- import java.util.Map;
-
-+import javax.json.Json;
-+import javax.json.JsonArrayBuilder;
-+import javax.json.JsonObject;
- import javax.management.MBeanInfo;
- import javax.management.StandardMBean;
-
-@@ -33,8 +36,6 @@
- import org.hornetq.jms.client.HornetQMessage;
- import org.hornetq.jms.client.SelectorTranslator;
- import org.hornetq.jms.server.JMSServerManager;
--import org.hornetq.utils.json.JSONArray;
--import org.hornetq.utils.json.JSONObject;
-
- /**
- * @author Jeff Mesnil
-@@ -308,7 +309,7 @@
- try
- {
- List queues = getQueues(durability);
-- JSONArray array = new JSONArray();
-+ JsonArrayBuilder array = Json.createArrayBuilder();
-
- for (QueueControl queue : queues)
- {
-@@ -333,17 +334,18 @@
-
- String filter = queue.getFilter() != null ? queue.getFilter() : null;
-
-- JSONObject info = new JSONObject();
-+ JsonObject info = Json.createObjectBuilder()
-+ .add("queueName", queue.getName())
-+ .add("clientID", clientID)
-+ .add("selector", filter)
-+ .add("name", subName)
-+ .add("durable", queue.isDurable())
-+ .add("messageCount", queue.getMessageCount())
-+ .add("deliveringCount", queue.getDeliveringCount())
-+ .add("consumers", queue.listConsumersAsJSON())
-+ .build();
-
-- info.put("queueName", queue.getName());
-- info.put("clientID", clientID);
-- info.put("selector", filter);
-- info.put("name", subName);
-- info.put("durable", queue.isDurable());
-- info.put("messageCount", queue.getMessageCount());
-- info.put("deliveringCount", queue.getDeliveringCount());
-- info.put("consumers", new JSONArray(queue.listConsumersAsJSON()) );
-- array.put(info);
-+ array.add(info);
- }
-
- return array.toString();
-diff -Nru hornetq-HornetQ_2_4_7_Final/hornetq-jms-server/src/main/java/org/hornetq/jms/server/impl/JMSServerManagerImpl.java hornetq-HornetQ_2_4_7_Final.javax.json/hornetq-jms-server/src/main/java/org/hornetq/jms/server/impl/JMSServerManagerImpl.java
---- hornetq-HornetQ_2_4_7_Final/hornetq-jms-server/src/main/java/org/hornetq/jms/server/impl/JMSServerManagerImpl.java 2015-04-13 20:00:17.000000000 +0200
-+++ hornetq-HornetQ_2_4_7_Final.javax.json/hornetq-jms-server/src/main/java/org/hornetq/jms/server/impl/JMSServerManagerImpl.java 2016-07-18 13:47:15.347451020 +0200
-@@ -12,6 +12,10 @@
- */
- package org.hornetq.jms.server.impl;
-
-+import javax.json.Json;
-+import javax.json.JsonArray;
-+import javax.json.JsonArrayBuilder;
-+import javax.json.JsonObject;
- import javax.naming.Context;
- import javax.naming.InitialContext;
- import javax.naming.NamingException;
-@@ -85,8 +89,6 @@
- import org.hornetq.spi.core.naming.BindingRegistry;
- import org.hornetq.utils.TimeAndCounterIDGenerator;
- import org.hornetq.utils.TypedProperties;
--import org.hornetq.utils.json.JSONArray;
--import org.hornetq.utils.json.JSONObject;
-
- /**
- * A Deployer used to create and add to JNDI queues, topics and connection
-@@ -1588,7 +1590,7 @@
- }
- });
-
-- JSONArray txDetailListJson = new JSONArray();
-+ JsonArrayBuilder txDetailListJson = Json.createArrayBuilder();
- for (Map.Entry entry : xidsSortedByCreationTime)
- {
- Xid xid = entry.getKey();
-@@ -1598,7 +1600,7 @@
- continue;
- }
- TransactionDetail detail = new JMSTransactionDetail(xid, tx, entry.getValue());
-- txDetailListJson.put(detail.toJSON());
-+ txDetailListJson.add(detail.toJSON());
- }
- return txDetailListJson.toString();
- }
-@@ -1634,7 +1636,7 @@
- continue;
- }
- TransactionDetail detail = new JMSTransactionDetail(xid, tx, entry.getValue());
-- JSONObject txJson = detail.toJSON();
-+ JsonObject txJson = detail.toJSON();
-
- html.append("");
- html.append("creation_time | ");
-@@ -1652,17 +1654,13 @@
- html.append("
---|
");
- html.append("");
-
-- JSONArray msgs = txJson.getJSONArray(TransactionDetail.KEY_TX_RELATED_MESSAGES);
-- for (int i = 0; i < msgs.length(); i++)
-- {
-- JSONObject msgJson = msgs.getJSONObject(i);
-- JSONObject props = msgJson.getJSONObject(TransactionDetail.KEY_MSG_PROPERTIES);
-+ JsonArray msgs = txJson.getJsonArray(TransactionDetail.KEY_TX_RELATED_MESSAGES);
-+ for (int i = 0; i < msgs.size(); i++) {
-+ JsonObject msgJson = msgs.getJsonObject(i);
-+ JsonObject props = msgJson.getJsonObject(TransactionDetail.KEY_MSG_PROPERTIES);
- StringBuilder propstr = new StringBuilder();
-- @SuppressWarnings("unchecked")
-- Iterator propkeys = props.keys();
-- while (propkeys.hasNext())
-- {
-- String key = propkeys.next();
-+
-+ for (String key : props.keySet()) {
- propstr.append(key);
- propstr.append("=");
- propstr.append(props.get(key));
-diff -Nru hornetq-HornetQ_2_4_7_Final/hornetq-server/src/main/java/org/hornetq/api/core/management/MessageCounterInfo.java hornetq-HornetQ_2_4_7_Final.javax.json/hornetq-server/src/main/java/org/hornetq/api/core/management/MessageCounterInfo.java
---- hornetq-HornetQ_2_4_7_Final/hornetq-server/src/main/java/org/hornetq/api/core/management/MessageCounterInfo.java 2015-04-13 20:00:17.000000000 +0200
-+++ hornetq-HornetQ_2_4_7_Final.javax.json/hornetq-server/src/main/java/org/hornetq/api/core/management/MessageCounterInfo.java 2016-07-18 11:11:07.976655043 +0200
-@@ -15,8 +15,11 @@
- import java.text.DateFormat;
- import java.util.Date;
-
-+import javax.json.Json;
-+import javax.json.JsonObject;
-+
-+import org.hornetq.api.core.JsonUtil;
- import org.hornetq.core.messagecounter.MessageCounter;
--import org.hornetq.utils.json.JSONObject;
-
- /**
- * Helper class to create Java Objects from the
-@@ -54,27 +57,35 @@
- {
- DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.MEDIUM);
-
-- JSONObject json = new JSONObject(counter);
- String lastAddTimestamp = dateFormat.format(new Date(counter.getLastAddedMessageTime()));
-- json.put("lastAddTimestamp", lastAddTimestamp);
- String updateTimestamp = dateFormat.format(new Date(counter.getLastUpdate()));
-- json.put("updateTimestamp", updateTimestamp);
-
-- return json.toString();
-+ return Json.createObjectBuilder()
-+ .add("destinationName", counter.getDestinationName())
-+ .add("destinationSubscription", counter.getDestinationSubscription())
-+ .add("destinationDurable", counter.isDestinationDurable())
-+ .add("count", counter.getCount())
-+ .add("countDelta", counter.getCountDelta())
-+ .add("messageCount", counter.getMessageCount())
-+ .add("messageCountDelta", counter.getMessageCountDelta())
-+ .add("lastAddTimestamp", lastAddTimestamp)
-+ .add("updateTimestamp", updateTimestamp)
-+ .build()
-+ .toString();
- }
-
- /**
-- * Returns an array of RoleInfo corresponding to the JSON serialization returned
-+ * Returns a MessageCounterInfo corresponding to the JSON serialization returned
- * by {@link QueueControl#listMessageCounter()}.
- */
- public static MessageCounterInfo fromJSON(final String jsonString) throws Exception
- {
-- JSONObject data = new JSONObject(jsonString);
-+ JsonObject data = JsonUtil.readJsonObject(jsonString);
- String name = data.getString("destinationName");
- String subscription = data.getString("destinationSubscription");
- boolean durable = data.getBoolean("destinationDurable");
-- long count = data.getLong("count");
-- long countDelta = data.getLong("countDelta");
-+ long count = data.getJsonNumber("count").longValue();
-+ long countDelta = data.getJsonNumber("countDelta").longValue();
- int depth = data.getInt("messageCount");
- int depthDelta = data.getInt("messageCountDelta");
- String lastAddTimestamp = data.getString("lastAddTimestamp");
-diff -Nru hornetq-HornetQ_2_4_7_Final/hornetq-server/src/main/java/org/hornetq/core/management/impl/AddressControlImpl.java hornetq-HornetQ_2_4_7_Final.javax.json/hornetq-server/src/main/java/org/hornetq/core/management/impl/AddressControlImpl.java
---- hornetq-HornetQ_2_4_7_Final/hornetq-server/src/main/java/org/hornetq/core/management/impl/AddressControlImpl.java 2015-04-13 20:00:17.000000000 +0200
-+++ hornetq-HornetQ_2_4_7_Final.javax.json/hornetq-server/src/main/java/org/hornetq/core/management/impl/AddressControlImpl.java 2016-07-18 11:22:05.600770768 +0200
-@@ -12,6 +12,8 @@
- */
- package org.hornetq.core.management.impl;
-
-+import javax.json.Json;
-+import javax.json.JsonArrayBuilder;
- import javax.management.MBeanOperationInfo;
- import java.util.ArrayList;
- import java.util.List;
-@@ -29,8 +31,6 @@
- import org.hornetq.core.security.CheckType;
- import org.hornetq.core.security.Role;
- import org.hornetq.core.settings.HierarchicalRepository;
--import org.hornetq.utils.json.JSONArray;
--import org.hornetq.utils.json.JSONObject;
-
- /**
- * @author Jeff Mesnil
-@@ -161,12 +161,12 @@
- clearIO();
- try
- {
-- JSONArray json = new JSONArray();
-+ JsonArrayBuilder json = Json.createArrayBuilder();
- Set roles = securityRepository.getMatch(address.toString());
-
- for (Role role : roles)
- {
-- json.put(new JSONObject(role));
-+ json.add(role.toJson());
- }
- return json.toString();
- }
-diff -Nru hornetq-HornetQ_2_4_7_Final/hornetq-server/src/main/java/org/hornetq/core/management/impl/BroadcastGroupControlImpl.java hornetq-HornetQ_2_4_7_Final.javax.json/hornetq-server/src/main/java/org/hornetq/core/management/impl/BroadcastGroupControlImpl.java
---- hornetq-HornetQ_2_4_7_Final/hornetq-server/src/main/java/org/hornetq/core/management/impl/BroadcastGroupControlImpl.java 2015-04-13 20:00:17.000000000 +0200
-+++ hornetq-HornetQ_2_4_7_Final.javax.json/hornetq-server/src/main/java/org/hornetq/core/management/impl/BroadcastGroupControlImpl.java 2016-07-18 11:24:27.649059616 +0200
-@@ -15,11 +15,11 @@
- import javax.management.MBeanOperationInfo;
-
- import org.hornetq.api.core.BroadcastGroupConfiguration;
-+import org.hornetq.api.core.JsonUtil;
- import org.hornetq.api.core.UDPBroadcastGroupConfiguration;
- import org.hornetq.api.core.management.BroadcastGroupControl;
- import org.hornetq.core.persistence.StorageManager;
- import org.hornetq.core.server.cluster.BroadcastGroup;
--import org.hornetq.utils.json.JSONArray;
-
- /**
- * A BroadcastGroupControl
-@@ -106,13 +106,7 @@
- clearIO();
- try
- {
-- JSONArray array = new JSONArray();
--
-- for (String connector : configuration.getConnectorInfos())
-- {
-- array.put(connector);
-- }
-- return array.toString();
-+ return JsonUtil.toJsonArray(configuration.getConnectorInfos()).toString();
- }
- finally
- {
-diff -Nru hornetq-HornetQ_2_4_7_Final/hornetq-server/src/main/java/org/hornetq/core/management/impl/ClusterConnectionControlImpl.java hornetq-HornetQ_2_4_7_Final.javax.json/hornetq-server/src/main/java/org/hornetq/core/management/impl/ClusterConnectionControlImpl.java
---- hornetq-HornetQ_2_4_7_Final/hornetq-server/src/main/java/org/hornetq/core/management/impl/ClusterConnectionControlImpl.java 2015-04-13 20:00:17.000000000 +0200
-+++ hornetq-HornetQ_2_4_7_Final.javax.json/hornetq-server/src/main/java/org/hornetq/core/management/impl/ClusterConnectionControlImpl.java 2016-07-18 11:25:52.117068879 +0200
-@@ -16,11 +16,11 @@
- import java.util.List;
- import java.util.Map;
-
-+import org.hornetq.api.core.JsonUtil;
- import org.hornetq.api.core.management.ClusterConnectionControl;
- import org.hornetq.core.config.ClusterConnectionConfiguration;
- import org.hornetq.core.persistence.StorageManager;
- import org.hornetq.core.server.cluster.ClusterConnection;
--import org.hornetq.utils.json.JSONArray;
-
- /**
- * A ClusterConnectionControl
-@@ -161,20 +161,7 @@
- clearIO();
- try
- {
-- List connectors = configuration.getStaticConnectors();
--
-- if (connectors == null)
-- {
-- return null;
-- }
--
-- JSONArray array = new JSONArray();
--
-- for (String connector : connectors)
-- {
-- array.put(connector);
-- }
-- return array.toString();
-+ return JsonUtil.toJsonArray(configuration.getStaticConnectors()).toString();
- }
- finally
- {
-diff -Nru hornetq-HornetQ_2_4_7_Final/hornetq-server/src/main/java/org/hornetq/core/management/impl/HornetQServerControlImpl.java hornetq-HornetQ_2_4_7_Final.javax.json/hornetq-server/src/main/java/org/hornetq/core/management/impl/HornetQServerControlImpl.java
---- hornetq-HornetQ_2_4_7_Final/hornetq-server/src/main/java/org/hornetq/core/management/impl/HornetQServerControlImpl.java 2015-04-13 20:00:17.000000000 +0200
-+++ hornetq-HornetQ_2_4_7_Final.javax.json/hornetq-server/src/main/java/org/hornetq/core/management/impl/HornetQServerControlImpl.java 2016-07-18 13:28:35.139574387 +0200
-@@ -26,6 +26,11 @@
- import java.util.Set;
- import java.util.concurrent.atomic.AtomicLong;
-
-+import javax.json.Json;
-+import javax.json.JsonArray;
-+import javax.json.JsonArrayBuilder;
-+import javax.json.JsonObject;
-+import javax.json.JsonObjectBuilder;
- import javax.management.ListenerNotFoundException;
- import javax.management.MBeanNotificationInfo;
- import javax.management.MBeanOperationInfo;
-@@ -80,8 +85,6 @@
- import org.hornetq.spi.core.protocol.RemotingConnection;
- import org.hornetq.utils.SecurityFormatter;
- import org.hornetq.utils.TypedProperties;
--import org.hornetq.utils.json.JSONArray;
--import org.hornetq.utils.json.JSONObject;
-
- /**
- * @author Jeff Mesnil
-@@ -978,7 +981,7 @@
- }
- });
-
-- JSONArray txDetailListJson = new JSONArray();
-+ JsonArrayBuilder txDetailListJson = Json.createArrayBuilder();
- for (Map.Entry entry : xidsSortedByCreationTime)
- {
- Xid xid = entry.getKey();
-@@ -986,9 +989,9 @@
- resourceManager.getTransaction(xid),
- entry.getValue());
-
-- txDetailListJson.put(detail.toJSON());
-+ txDetailListJson.add(detail.toJSON());
- }
-- return txDetailListJson.toString();
-+ return txDetailListJson.build().toString();
- }
- finally
- {
-@@ -1029,7 +1032,7 @@
- resourceManager.getTransaction(xid),
- entry.getValue());
-
-- JSONObject txJson = detail.toJSON();
-+ JsonObject txJson = detail.toJSON();
-
- html.append("");
- html.append("creation_time | ");
-@@ -1047,17 +1050,13 @@
- html.append("
---|
");
- html.append("");
-
-- JSONArray msgs = txJson.getJSONArray(TransactionDetail.KEY_TX_RELATED_MESSAGES);
-- for (int i = 0; i < msgs.length(); i++)
-- {
-- JSONObject msgJson = msgs.getJSONObject(i);
-- JSONObject props = msgJson.getJSONObject(TransactionDetail.KEY_MSG_PROPERTIES);
-+ JsonArray msgs = txJson.getJsonArray(TransactionDetail.KEY_TX_RELATED_MESSAGES);
-+ for (int i = 0; i < msgs.size(); i++) {
-+ JsonObject msgJson = msgs.getJsonObject(i);
-+ JsonObject props = msgJson.getJsonObject(TransactionDetail.KEY_MSG_PROPERTIES);
- StringBuilder propstr = new StringBuilder();
-- @SuppressWarnings("unchecked")
-- Iterator propkeys = props.keys();
-- while (propkeys.hasNext())
-- {
-- String key = propkeys.next();
-+ Set keys = props.keySet();
-+ for (String key : keys) {
- propstr.append(key);
- propstr.append("=");
- propstr.append(props.get(key));
-@@ -1403,7 +1402,7 @@
- */
- public String listProducersInfoAsJSON() throws Exception
- {
-- JSONArray producers = new JSONArray();
-+ JsonArrayBuilder producers = Json.createArrayBuilder();
-
-
- for (ServerSession session : server.getSessions())
-@@ -1411,7 +1410,7 @@
- session.describeProducersInfo(producers);
- }
-
-- return producers.toString();
-+ return producers.build().toString();
- }
-
-
-@@ -1454,14 +1453,14 @@
- clearIO();
- try
- {
-- JSONArray array = new JSONArray();
-+ JsonArrayBuilder array = Json.createArrayBuilder();
-
- for (TransportConfiguration config : configuration.getConnectorConfigurations().values())
- {
-- array.put(new JSONObject(config));
-+ array.add(config.toJson());
- }
-
-- return array.toString();
-+ return array.build().toString();
- }
- finally
- {
-@@ -1566,12 +1565,12 @@
- clearIO();
- try
- {
-- JSONArray json = new JSONArray();
-+ JsonArrayBuilder json = Json.createArrayBuilder();
- Set roles = server.getSecurityRepository().getMatch(addressMatch);
-
- for (Role role : roles)
- {
-- json.put(new JSONObject(role));
-+ json.add(role.toJson());
- }
- return json.toString();
- }
-@@ -1586,39 +1585,38 @@
- checkStarted();
-
- AddressSettings addressSettings = server.getAddressSettingsRepository().getMatch(address);
-- Map settings = new HashMap();
-+ String policy = addressSettings.getAddressFullMessagePolicy() == AddressFullMessagePolicy.PAGE ? "PAGE" : addressSettings.getAddressFullMessagePolicy() == AddressFullMessagePolicy.BLOCK ? "BLOCK" : addressSettings.getAddressFullMessagePolicy() == AddressFullMessagePolicy.DROP ? "DROP" : "FAIL";
-+ String consumerPolicy = addressSettings.getSlowConsumerPolicy() == SlowConsumerPolicy.NOTIFY ? "NOTIFY" : "KILL";
-+ JsonObjectBuilder settings = Json.createObjectBuilder();
- if (addressSettings.getDeadLetterAddress() != null)
- {
-- settings.put("DLA", addressSettings.getDeadLetterAddress());
-+ settings.add("DLA", addressSettings.getDeadLetterAddress().toString());
- }
- if (addressSettings.getExpiryAddress() != null)
- {
-- settings.put("expiryAddress", addressSettings.getExpiryAddress());
-+ settings.add("expiryAddress", addressSettings.getExpiryAddress().toString());
- }
-- settings.put("expiryDelay", addressSettings.getExpiryDelay());
-- settings.put("maxDeliveryAttempts", addressSettings.getMaxDeliveryAttempts());
-- settings.put("pageCacheMaxSize", addressSettings.getPageCacheMaxSize());
-- settings.put("maxSizeBytes", addressSettings.getMaxSizeBytes());
-- settings.put("pageSizeBytes", addressSettings.getPageSizeBytes());
-- settings.put("redeliveryDelay", addressSettings.getRedeliveryDelay());
-- settings.put("redeliveryMultiplier", addressSettings.getRedeliveryMultiplier());
-- settings.put("maxRedeliveryDelay", addressSettings.getMaxRedeliveryDelay());
-- settings.put("redistributionDelay", addressSettings.getRedistributionDelay());
-- settings.put("lastValueQueue", addressSettings.isLastValueQueue());
-- settings.put("sendToDLAOnNoRoute", addressSettings.isSendToDLAOnNoRoute());
-- String policy = addressSettings.getAddressFullMessagePolicy() == AddressFullMessagePolicy.PAGE ? "PAGE"
-- : addressSettings.getAddressFullMessagePolicy() == AddressFullMessagePolicy.BLOCK ? "BLOCK"
-- : addressSettings.getAddressFullMessagePolicy() == AddressFullMessagePolicy.DROP ? "DROP"
-- : "FAIL";
-- settings.put("addressFullMessagePolicy", policy);
-- settings.put("slowConsumerThreshold", addressSettings.getSlowConsumerThreshold());
-- settings.put("slowConsumerCheckPeriod", addressSettings.getSlowConsumerCheckPeriod());
-- policy = addressSettings.getSlowConsumerPolicy() == SlowConsumerPolicy.NOTIFY ? "NOTIFY"
-- : "KILL";
-- settings.put("slowConsumerPolicy", policy);
--
-- JSONObject jsonObject = new JSONObject(settings);
-- return jsonObject.toString();
-+ return settings
-+ .add("expiryDelay", addressSettings.getExpiryDelay())
-+ .add("maxDeliveryAttempts", addressSettings.getMaxDeliveryAttempts())
-+ .add("pageCacheMaxSize", addressSettings.getPageCacheMaxSize())
-+ .add("maxSizeBytes", addressSettings.getMaxSizeBytes())
-+ .add("pageSizeBytes", addressSettings.getPageSizeBytes())
-+ .add("redeliveryDelay", addressSettings.getRedeliveryDelay())
-+ .add("redeliveryMultiplier", addressSettings.getRedeliveryMultiplier())
-+ .add("maxRedeliveryDelay", addressSettings.getMaxRedeliveryDelay())
-+ .add("redistributionDelay", addressSettings.getRedistributionDelay())
-+ .add("lastValueQueue", addressSettings.isLastValueQueue())
-+ .add("sendToDLAOnNoRoute", addressSettings.isSendToDLAOnNoRoute())
-+ .add("addressFullMessagePolicy", policy)
-+ .add("slowConsumerThreshold", addressSettings.getSlowConsumerThreshold())
-+ .add("slowConsumerCheckPeriod", addressSettings.getSlowConsumerCheckPeriod())
-+ .add("slowConsumerPolicy", consumerPolicy)
-+ .build().toString();
-+ //.add("autoCreateJmsQueues", addressSettings.isAutoCreateJmsQueues())
-+ //.add("autoDeleteJmsQueues", addressSettings.isAutoDeleteJmsQueues())
-+ //.add("autoCreateJmsTopics", addressSettings.isAutoCreateJmsTopics())
-+ //.add("autoDeleteJmsTopics", addressSettings.isAutoDeleteJmsTopics())
- }
-
-
-diff -Nru hornetq-HornetQ_2_4_7_Final/hornetq-server/src/main/java/org/hornetq/core/management/impl/QueueControlImpl.java hornetq-HornetQ_2_4_7_Final.javax.json/hornetq-server/src/main/java/org/hornetq/core/management/impl/QueueControlImpl.java
---- hornetq-HornetQ_2_4_7_Final/hornetq-server/src/main/java/org/hornetq/core/management/impl/QueueControlImpl.java 2015-04-13 20:00:17.000000000 +0200
-+++ hornetq-HornetQ_2_4_7_Final.javax.json/hornetq-server/src/main/java/org/hornetq/core/management/impl/QueueControlImpl.java 2016-07-18 11:30:51.464878518 +0200
-@@ -12,6 +12,10 @@
- */
- package org.hornetq.core.management.impl;
-
-+import javax.json.Json;
-+import javax.json.JsonArray;
-+import javax.json.JsonArrayBuilder;
-+import javax.json.JsonObjectBuilder;
- import javax.management.MBeanOperationInfo;
- import java.util.ArrayList;
- import java.util.Collection;
-@@ -20,6 +24,7 @@
- import java.util.Map;
-
- import org.hornetq.api.core.HornetQException;
-+import org.hornetq.api.core.JsonUtil;
- import org.hornetq.api.core.Message;
- import org.hornetq.api.core.SimpleString;
- import org.hornetq.api.core.management.MessageCounterInfo;
-@@ -39,9 +44,6 @@
- import org.hornetq.core.settings.HierarchicalRepository;
- import org.hornetq.core.settings.impl.AddressSettings;
- import org.hornetq.utils.LinkedListIterator;
--import org.hornetq.utils.json.JSONArray;
--import org.hornetq.utils.json.JSONException;
--import org.hornetq.utils.json.JSONObject;
-
- /**
- * @author Jeff Mesnil
-@@ -67,39 +69,30 @@
-
- private static String toJSON(final Map[] messages)
- {
-- JSONArray array = toJSONMsgArray(messages);
-+ JsonArray array = toJSONMsgArray(messages);
- return array.toString();
- }
-
-- private static JSONArray toJSONMsgArray(final Map[] messages)
-- {
-- JSONArray array = new JSONArray();
-+ private static JsonArray toJSONMsgArray(final Map[] messages) {
-+ JsonArrayBuilder array = Json.createArrayBuilder();
- for (Map message : messages)
- {
-- array.put(new JSONObject(message));
-+ array.add(JsonUtil.toJsonObject(message));
- }
-- return array;
-+ return array.build();
- }
-
- private static String toJSON(final Map[]> messages)
- {
-- try
-- {
-- JSONArray arrayReturn = new JSONArray();
-- for (Map.Entry[]> entry : messages.entrySet())
-- {
-- JSONObject objectItem = new JSONObject();
-- objectItem.put("consumerName", entry.getKey());
-- objectItem.put("elements", toJSONMsgArray(entry.getValue()));
-- arrayReturn.put(objectItem);
-- }
--
-- return arrayReturn.toString();
-- }
-- catch (JSONException e)
-- {
-- return "Invalid conversion " + e.toString();
-+ JsonArrayBuilder arrayReturn = Json.createArrayBuilder();
-+ for (Map.Entry[]> entry : messages.entrySet()) {
-+ JsonObjectBuilder objectItem = Json.createObjectBuilder();
-+ objectItem.add("consumerName", entry.getKey());
-+ objectItem.add("elements", toJSONMsgArray(entry.getValue()));
-+ arrayReturn.add(objectItem);
- }
-+
-+ return arrayReturn.build().toString();
- }
-
-
-@@ -936,7 +929,7 @@
- {
- Collection consumers = queue.getConsumers();
-
-- JSONArray jsonArray = new JSONArray();
-+ JsonArrayBuilder jsonArray = Json.createArrayBuilder();
-
- for (Consumer consumer : consumers)
- {
-@@ -945,14 +938,14 @@
- {
- ServerConsumer serverConsumer = (ServerConsumer) consumer;
-
-- JSONObject obj = new JSONObject();
-- obj.put("consumerID", serverConsumer.getID());
-- obj.put("connectionID", serverConsumer.getConnectionID().toString());
-- obj.put("sessionID", serverConsumer.getSessionID());
-- obj.put("browseOnly", serverConsumer.isBrowseOnly());
-- obj.put("creationTime", serverConsumer.getCreationTime());
-+ JsonObjectBuilder obj = Json.createObjectBuilder()
-+ .add("consumerID", serverConsumer.getID())
-+ .add("connectionID", serverConsumer.getConnectionID().toString())
-+ .add("sessionID", serverConsumer.getSessionID())
-+ .add("browseOnly", serverConsumer.isBrowseOnly())
-+ .add("creationTime", serverConsumer.getCreationTime());
-
-- jsonArray.put(obj);
-+ jsonArray.add(obj);
- }
-
- }
-diff -Nru hornetq-HornetQ_2_4_7_Final/hornetq-server/src/main/java/org/hornetq/core/server/impl/ServerSessionImpl.java hornetq-HornetQ_2_4_7_Final.javax.json/hornetq-server/src/main/java/org/hornetq/core/server/impl/ServerSessionImpl.java
---- hornetq-HornetQ_2_4_7_Final/hornetq-server/src/main/java/org/hornetq/core/server/impl/ServerSessionImpl.java 2015-04-13 20:00:17.000000000 +0200
-+++ hornetq-HornetQ_2_4_7_Final.javax.json/hornetq-server/src/main/java/org/hornetq/core/server/impl/ServerSessionImpl.java 2016-07-18 11:36:24.928064302 +0200
-@@ -24,6 +24,9 @@
-
- package org.hornetq.core.server.impl;
-
-+import javax.json.Json;
-+import javax.json.JsonArrayBuilder;
-+import javax.json.JsonObjectBuilder;
- import javax.transaction.xa.XAException;
- import javax.transaction.xa.Xid;
- import java.util.ArrayList;
-@@ -86,8 +89,6 @@
- import org.hornetq.spi.core.protocol.SessionCallback;
- import org.hornetq.utils.TypedProperties;
- import org.hornetq.utils.UUID;
--import org.hornetq.utils.json.JSONArray;
--import org.hornetq.utils.json.JSONObject;
-
- /**
- * Server side Session implementation
-@@ -1525,19 +1526,18 @@
- }
-
- @Override
-- public void describeProducersInfo(JSONArray array) throws Exception
-- {
-+ public void describeProducersInfo(JsonArrayBuilder array) throws Exception {
- Map> targetCopy = cloneTargetAddresses();
-
- for (Map.Entry> entry : targetCopy.entrySet())
- {
-- JSONObject producerInfo = new JSONObject();
-- producerInfo.put("connectionID", this.getConnectionID().toString());
-- producerInfo.put("sessionID", this.getName());
-- producerInfo.put("destination", entry.getKey().toString());
-- producerInfo.put("lastUUIDSent", entry.getValue().getA());
-- producerInfo.put("msgSent", entry.getValue().getB().longValue());
-- array.put(producerInfo);
-+ JsonObjectBuilder producerInfo = Json.createObjectBuilder()
-+ .add("connectionID", this.getConnectionID().toString())
-+ .add("sessionID", this.getName())
-+ .add("destination", entry.getKey().toString())
-+ .add("lastUUIDSent", entry.getValue().getA().toString())
-+ .add("msgSent", entry.getValue().getB().longValue());
-+ array.add(producerInfo);
- }
- }
-
-diff -Nru hornetq-HornetQ_2_4_7_Final/hornetq-server/src/main/java/org/hornetq/core/server/ServerSession.java hornetq-HornetQ_2_4_7_Final.javax.json/hornetq-server/src/main/java/org/hornetq/core/server/ServerSession.java
---- hornetq-HornetQ_2_4_7_Final/hornetq-server/src/main/java/org/hornetq/core/server/ServerSession.java 2015-04-13 20:00:17.000000000 +0200
-+++ hornetq-HornetQ_2_4_7_Final.javax.json/hornetq-server/src/main/java/org/hornetq/core/server/ServerSession.java 2016-07-18 11:32:19.373710419 +0200
-@@ -12,6 +12,7 @@
- */
- package org.hornetq.core.server;
-
-+import javax.json.JsonArrayBuilder;
- import javax.transaction.xa.Xid;
- import java.util.List;
- import java.util.Set;
-@@ -21,7 +22,6 @@
- import org.hornetq.core.persistence.OperationContext;
- import org.hornetq.core.transaction.Transaction;
- import org.hornetq.spi.core.protocol.RemotingConnection;
--import org.hornetq.utils.json.JSONArray;
-
- /**
- * A ServerSession
-@@ -138,7 +138,7 @@
- * @param objs
- * @throws Exception
- */
-- void describeProducersInfo(JSONArray objs) throws Exception;
-+ void describeProducersInfo(JsonArrayBuilder objs) throws Exception;
-
- String getLastSentMessageID(String address);
-
-diff -Nru hornetq-HornetQ_2_4_7_Final/hornetq-server/src/main/java/org/hornetq/core/transaction/TransactionDetail.java hornetq-HornetQ_2_4_7_Final.javax.json/hornetq-server/src/main/java/org/hornetq/core/transaction/TransactionDetail.java
---- hornetq-HornetQ_2_4_7_Final/hornetq-server/src/main/java/org/hornetq/core/transaction/TransactionDetail.java 2015-04-13 20:00:17.000000000 +0200
-+++ hornetq-HornetQ_2_4_7_Final.javax.json/hornetq-server/src/main/java/org/hornetq/core/transaction/TransactionDetail.java 2016-07-18 11:40:51.608410621 +0200
-@@ -17,13 +17,16 @@
- import java.util.List;
- import java.util.Map;
-
-+import javax.json.Json;
-+import javax.json.JsonArrayBuilder;
-+import javax.json.JsonObject;
-+import javax.json.JsonObjectBuilder;
- import javax.transaction.xa.Xid;
-
-+import org.hornetq.api.core.JsonUtil;
- import org.hornetq.core.server.MessageReference;
- import org.hornetq.core.server.ServerMessage;
- import org.hornetq.core.transaction.impl.XidImpl;
--import org.hornetq.utils.json.JSONArray;
--import org.hornetq.utils.json.JSONObject;
-
- /**
- * A TransactionDetail
-@@ -63,23 +66,21 @@
- this.creationTime = creation;
- }
-
-- public JSONObject toJSON() throws Exception
-- {
-+ public JsonObject toJSON() throws Exception {
- DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.MEDIUM);
-- JSONObject detailJson = new JSONObject();
--
-- detailJson.put(KEY_CREATION_TIME, dateFormat.format(new Date(this.creationTime)));
-- detailJson.put(KEY_XID_AS_BASE64, XidImpl.toBase64String(this.xid));
-- detailJson.put(KEY_XID_FORMAT_ID, this.xid.getFormatId());
-- detailJson.put(KEY_XID_GLOBAL_TXID, new String(this.xid.getGlobalTransactionId()));
-- detailJson.put(KEY_XID_BRANCH_QUAL, new String(this.xid.getBranchQualifier()));
-+ JsonObjectBuilder detailJson = Json.createObjectBuilder()
-+ .add(KEY_CREATION_TIME, dateFormat.format(new Date(this.creationTime)))
-+ .add(KEY_XID_AS_BASE64, XidImpl.toBase64String(this.xid))
-+ .add(KEY_XID_FORMAT_ID, this.xid.getFormatId())
-+ .add(KEY_XID_GLOBAL_TXID, new String(this.xid.getGlobalTransactionId()))
-+ .add(KEY_XID_BRANCH_QUAL, new String(this.xid.getBranchQualifier()));
-
-- JSONArray msgsJson = new JSONArray();
-+ JsonArrayBuilder msgsJson = Json.createArrayBuilder();
- List txops = this.transaction.getAllOperations();
-- detailJson.put(KEY_TX_RELATED_MESSAGES, msgsJson);
-+
- if (txops == null)
- {
-- return detailJson;
-+ return detailJson.build();
- }
-
- for (TransactionOperation op : txops)
-@@ -103,18 +104,19 @@
-
- for (MessageReference ref : msgs)
- {
-- JSONObject msgJson = new JSONObject();
-- msgsJson.put(msgJson);
-+ JsonObjectBuilder msgJson = Json.createObjectBuilder();
-+ msgsJson.add(msgJson);
-
-- msgJson.put(KEY_MSG_OP_TYPE, opType);
-+ msgJson.add(KEY_MSG_OP_TYPE, opType);
-
- ServerMessage msg = ref.getMessage().copy();
-
-- msgJson.put(KEY_MSG_TYPE, decodeMessageType(msg));
-- msgJson.put(KEY_MSG_PROPERTIES, decodeMessageProperties(msg));
-+ msgJson.add(KEY_MSG_TYPE, decodeMessageType(msg));
-+ JsonUtil.addToObject(KEY_MSG_PROPERTIES, decodeMessageProperties(msg), msgJson);
- }
- }
-- return detailJson;
-+ detailJson.add(KEY_TX_RELATED_MESSAGES, msgsJson);
-+ return detailJson.build();
- }
-
- public abstract String decodeMessageType(ServerMessage msg);
-diff -Nru hornetq-HornetQ_2_4_7_Final/tests/integration-tests/pom.xml hornetq-HornetQ_2_4_7_Final.javax.json/tests/integration-tests/pom.xml
---- hornetq-HornetQ_2_4_7_Final/tests/integration-tests/pom.xml 2015-04-13 20:00:17.000000000 +0200
-+++ hornetq-HornetQ_2_4_7_Final.javax.json/tests/integration-tests/pom.xml 2016-07-18 12:16:45.486042047 +0200
-@@ -162,6 +162,12 @@
- org.jboss.jbossts.jts
- jbossjts-jacorb
-
-+
-+ org.apache.geronimo.specs
-+ geronimo-json_1.0_spec
-+ 1.0-alpha-1
-+ test
-+
-
-
-
-diff -Nru hornetq-HornetQ_2_4_7_Final/tests/integration-tests/src/test/java/org/hornetq/tests/integration/aerogear/AeroGearBasicServerTest.java hornetq-HornetQ_2_4_7_Final.javax.json/tests/integration-tests/src/test/java/org/hornetq/tests/integration/aerogear/AeroGearBasicServerTest.java
---- hornetq-HornetQ_2_4_7_Final/tests/integration-tests/src/test/java/org/hornetq/tests/integration/aerogear/AeroGearBasicServerTest.java 2015-04-13 20:00:17.000000000 +0200
-+++ hornetq-HornetQ_2_4_7_Final.javax.json/tests/integration-tests/src/test/java/org/hornetq/tests/integration/aerogear/AeroGearBasicServerTest.java 2016-07-18 11:46:36.280040524 +0200
-@@ -13,6 +13,8 @@
- package org.hornetq.tests.integration.aerogear;
-
-
-+import javax.json.JsonArray;
-+import javax.json.JsonObject;
- import javax.servlet.ServletException;
- import javax.servlet.http.HttpServletRequest;
- import javax.servlet.http.HttpServletResponse;
-@@ -21,6 +23,7 @@
- import java.util.concurrent.CountDownLatch;
- import java.util.concurrent.TimeUnit;
-
-+import org.hornetq.api.core.JsonUtil;
- import org.hornetq.api.core.Message;
- import org.hornetq.api.core.TransportConfiguration;
- import org.hornetq.api.core.client.ClientConsumer;
-@@ -39,9 +42,6 @@
- import org.hornetq.integration.aerogear.AeroGearConstants;
- import org.hornetq.tests.util.ServiceTestBase;
- import org.hornetq.tests.util.UnitTestCase;
--import org.hornetq.utils.json.JSONArray;
--import org.hornetq.utils.json.JSONException;
--import org.hornetq.utils.json.JSONObject;
- import org.junit.After;
- import org.junit.Before;
- import org.junit.Test;
-@@ -134,7 +134,7 @@
-
- assertTrue(latch.await(5, TimeUnit.SECONDS));
- assertNotNull(aeroGearHandler.jsonObject);
-- JSONObject body = (JSONObject) aeroGearHandler.jsonObject.get("message");
-+ JsonObject body = (JsonObject) aeroGearHandler.jsonObject.get("message");
- assertNotNull(body);
- String prop1 = body.getString("AEROGEAR_PROP1");
- assertNotNull(prop1);
-@@ -154,16 +154,16 @@
- Integer ttl = body.getInt("ttl");
- assertNotNull(ttl);
- assertEquals(ttl.intValue(), 3600);
-- JSONArray jsonArray = (JSONArray) aeroGearHandler.jsonObject.get("variants");
-+ JsonArray jsonArray = (JsonArray) aeroGearHandler.jsonObject.get("variants");
- assertNotNull(jsonArray);
- assertEquals(jsonArray.getString(0), "variant1");
- assertEquals(jsonArray.getString(1), "variant2");
-- jsonArray = (JSONArray) aeroGearHandler.jsonObject.get("alias");
-+ jsonArray = (JsonArray) aeroGearHandler.jsonObject.get("alias");
- assertNotNull(jsonArray);
- assertEquals(jsonArray.getString(0), "me");
- assertEquals(jsonArray.getString(1), "him");
- assertEquals(jsonArray.getString(2), "them");
-- jsonArray = (JSONArray) aeroGearHandler.jsonObject.get("deviceType");
-+ jsonArray = (JsonArray) aeroGearHandler.jsonObject.get("deviceType");
- assertNotNull(jsonArray);
- assertEquals(jsonArray.getString(0), "android");
- assertEquals(jsonArray.getString(1), "ipad");
-@@ -183,7 +183,7 @@
- producer.send(m);
- assertTrue(latch.await(5, TimeUnit.SECONDS));
- assertNotNull(aeroGearHandler.jsonObject);
-- body = (JSONObject) aeroGearHandler.jsonObject.get("message");
-+ body = (JsonObject) aeroGearHandler.jsonObject.get("message");
- assertNotNull(body);
- alert = body.getString("alert");
- assertNotNull(alert);
-@@ -197,15 +197,15 @@
- ttl = body.getInt("ttl");
- assertNotNull(ttl);
- assertEquals(ttl.intValue(), 10000);
-- jsonArray = (JSONArray) aeroGearHandler.jsonObject.get("variants");
-+ jsonArray = (JsonArray) aeroGearHandler.jsonObject.get("variants");
- assertNotNull(jsonArray);
- assertEquals(jsonArray.getString(0), "v1");
- assertEquals(jsonArray.getString(1), "v2");
-- jsonArray = (JSONArray) aeroGearHandler.jsonObject.get("alias");
-+ jsonArray = (JsonArray) aeroGearHandler.jsonObject.get("alias");
- assertNotNull(jsonArray);
- assertEquals(jsonArray.getString(0), "alias1");
- assertEquals(jsonArray.getString(1), "alias2");
-- jsonArray = (JSONArray) aeroGearHandler.jsonObject.get("deviceType");
-+ jsonArray = (JsonArray) aeroGearHandler.jsonObject.get("deviceType");
- assertNotNull(jsonArray);
- assertEquals(jsonArray.getString(0), "dev1");
- assertEquals(jsonArray.getString(1), "dev2");
-@@ -216,7 +216,7 @@
-
- class AeroGearHandler extends AbstractHandler
- {
-- JSONObject jsonObject;
-+ JsonObject jsonObject;
- private CountDownLatch latch;
-
- public AeroGearHandler(CountDownLatch latch)
-@@ -234,14 +234,7 @@
- byte[] bytes = new byte[httpServletRequest.getContentLength()];
- httpServletRequest.getInputStream().read(bytes);
- String json = new String(bytes);
-- try
-- {
-- jsonObject = new JSONObject(json);
-- }
-- catch (JSONException e)
-- {
-- jsonObject = null;
-- }
-+ jsonObject = JsonUtil.readJsonObject(json);
- latch.countDown();
- }
-
-diff -Nru hornetq-HornetQ_2_4_7_Final/tests/integration-tests/src/test/java/org/hornetq/tests/integration/jms/server/management/JMSQueueControlTest.java hornetq-HornetQ_2_4_7_Final.javax.json/tests/integration-tests/src/test/java/org/hornetq/tests/integration/jms/server/management/JMSQueueControlTest.java
---- hornetq-HornetQ_2_4_7_Final/tests/integration-tests/src/test/java/org/hornetq/tests/integration/jms/server/management/JMSQueueControlTest.java 2015-04-13 20:00:17.000000000 +0200
-+++ hornetq-HornetQ_2_4_7_Final.javax.json/tests/integration-tests/src/test/java/org/hornetq/tests/integration/jms/server/management/JMSQueueControlTest.java 2016-07-18 11:49:53.735654839 +0200
-@@ -18,6 +18,7 @@
- import javax.jms.MessageConsumer;
- import javax.jms.MessageProducer;
- import javax.jms.Session;
-+import javax.json.JsonArray;
- import javax.management.Notification;
- import javax.naming.Context;
-
-@@ -27,6 +28,7 @@
- import java.util.Map;
- import java.util.Set;
-
-+import org.hornetq.api.core.JsonUtil;
- import org.hornetq.api.core.SimpleString;
- import org.hornetq.api.core.TransportConfiguration;
- import org.hornetq.api.core.client.ClientConsumer;
-@@ -56,7 +58,6 @@
- import org.hornetq.tests.unit.util.InVMNamingContext;
- import org.hornetq.tests.util.RandomUtil;
- import org.hornetq.utils.UUIDGenerator;
--import org.hornetq.utils.json.JSONArray;
- import org.junit.After;
- import org.junit.Assert;
- import org.junit.Before;
-@@ -106,9 +107,9 @@
-
- Assert.assertEquals(1, queueControl.getConsumerCount());
-
-- JSONArray jsonArray = new JSONArray(queueControl.listConsumersAsJSON());
-+ JsonArray jsonArray = JsonUtil.readJsonArray(queueControl.listConsumersAsJSON());
-
-- assertEquals(1, jsonArray.length());
-+ assertEquals(1, jsonArray.size());
-
- JMSUtil.sendMessages(queue, 2);
-
-@@ -216,17 +217,17 @@
-
- String jsonString = queueControl.listMessagesAsJSON(null);
- Assert.assertNotNull(jsonString);
-- JSONArray array = new JSONArray(jsonString);
-- Assert.assertEquals(2, array.length());
-- Assert.assertEquals(ids[0], array.getJSONObject(0).get("JMSMessageID"));
-- Assert.assertEquals(ids[1], array.getJSONObject(1).get("JMSMessageID"));
-+ JsonArray array = JsonUtil.readJsonArray(jsonString);
-+ Assert.assertEquals(2, array.size());
-+ Assert.assertEquals(ids[0], array.getJsonObject(0).get("JMSMessageID"));
-+ Assert.assertEquals(ids[1], array.getJsonObject(1).get("JMSMessageID"));
-
- JMSUtil.consumeMessages(2, queue);
-
- jsonString = queueControl.listMessagesAsJSON(null);
- Assert.assertNotNull(jsonString);
-- array = new JSONArray(jsonString);
-- Assert.assertEquals(0, array.length());
-+ array = JsonUtil.readJsonArray(jsonString);
-+ Assert.assertEquals(0, array.size());
- }
-
- @Test
-diff -Nru hornetq-HornetQ_2_4_7_Final/tests/integration-tests/src/test/java/org/hornetq/tests/integration/jms/server/management/JMSServerControlTest.java hornetq-HornetQ_2_4_7_Final.javax.json/tests/integration-tests/src/test/java/org/hornetq/tests/integration/jms/server/management/JMSServerControlTest.java
---- hornetq-HornetQ_2_4_7_Final/tests/integration-tests/src/test/java/org/hornetq/tests/integration/jms/server/management/JMSServerControlTest.java 2015-04-13 20:00:17.000000000 +0200
-+++ hornetq-HornetQ_2_4_7_Final.javax.json/tests/integration-tests/src/test/java/org/hornetq/tests/integration/jms/server/management/JMSServerControlTest.java 2016-07-18 11:52:44.508532198 +0200
-@@ -25,6 +25,7 @@
- import javax.jms.XAConnection;
- import javax.jms.XAConnectionFactory;
- import javax.jms.XASession;
-+import javax.json.JsonArray;
- import javax.naming.NamingException;
- import javax.transaction.xa.XAResource;
- import javax.transaction.xa.Xid;
-@@ -36,6 +37,7 @@
-
- import org.hornetq.api.config.HornetQDefaultConfiguration;
- import org.hornetq.api.core.HornetQObjectClosedException;
-+import org.hornetq.api.core.JsonUtil;
- import org.hornetq.api.core.SimpleString;
- import org.hornetq.api.core.TransportConfiguration;
- import org.hornetq.api.core.client.HornetQClient;
-@@ -65,7 +67,6 @@
- import org.hornetq.tests.unit.util.InVMNamingContext;
- import org.hornetq.tests.util.RandomUtil;
- import org.hornetq.tests.util.UnitTestCase;
--import org.hornetq.utils.json.JSONArray;
- import org.junit.After;
- import org.junit.Assert;
- import org.junit.Before;
-@@ -695,15 +696,15 @@
- // create a consumer will create a Core queue bound to the topic address
- MessageConsumer cons = session.createConsumer(topic);
-
-- JSONArray jsonArray = new JSONArray(control.listAllConsumersAsJSON());
-+ JsonArray jsonArray = JsonUtil.readJsonArray(control.listAllConsumersAsJSON());
-
-- assertEquals(1 + getNumberOfConsumers(), jsonArray.length());
-+ Assert.assertEquals(1 + getNumberOfConsumers(), jsonArray.size());
-
- cons.close();
-
-- jsonArray = new JSONArray(control.listAllConsumersAsJSON());
-+ jsonArray = JsonUtil.readJsonArray(control.listAllConsumersAsJSON());
-
-- assertEquals(getNumberOfConsumers(), jsonArray.length());
-+ Assert.assertEquals(getNumberOfConsumers(), jsonArray.size());
-
- String topicAddress = HornetQDestination.createTopicAddressFromName(topicName).toString();
- AddressControl addressControl = (AddressControl) server.getManagementService()
-diff -Nru hornetq-HornetQ_2_4_7_Final/tests/integration-tests/src/test/java/org/hornetq/tests/integration/jms/server/management/TopicControlTest.java hornetq-HornetQ_2_4_7_Final.javax.json/tests/integration-tests/src/test/java/org/hornetq/tests/integration/jms/server/management/TopicControlTest.java
---- hornetq-HornetQ_2_4_7_Final/tests/integration-tests/src/test/java/org/hornetq/tests/integration/jms/server/management/TopicControlTest.java 2015-04-13 20:00:17.000000000 +0200
-+++ hornetq-HornetQ_2_4_7_Final.javax.json/tests/integration-tests/src/test/java/org/hornetq/tests/integration/jms/server/management/TopicControlTest.java 2016-07-18 11:55:18.488190010 +0200
-@@ -19,12 +19,14 @@
- import javax.jms.Session;
- import javax.jms.TextMessage;
- import javax.jms.TopicSubscriber;
-+import javax.json.JsonArray;
- import javax.management.Notification;
-
- import java.util.ArrayList;
- import java.util.List;
- import java.util.Map;
-
-+import org.hornetq.api.core.JsonUtil;
- import org.hornetq.api.core.TransportConfiguration;
- import org.hornetq.api.core.management.ObjectNameBuilder;
- import org.hornetq.api.jms.HornetQJMSClient;
-@@ -43,7 +45,6 @@
- import org.hornetq.tests.integration.management.ManagementTestBase;
- import org.hornetq.tests.unit.util.InVMNamingContext;
- import org.hornetq.tests.util.RandomUtil;
--import org.hornetq.utils.json.JSONArray;
- import org.junit.After;
- import org.junit.Assert;
- import org.junit.Before;
-@@ -163,9 +164,9 @@
-
- String json = topicControl.listAllSubscriptionsAsJSON();
- System.out.println("Json: " + json);
-- JSONArray jsonArray = new JSONArray(json);
-+ JsonArray jsonArray = JsonUtil.readJsonArray(json);
-
-- assertEquals(3, jsonArray.length());
-+ Assert.assertEquals(3, jsonArray.size());
-
- connection_1.close();
- connection_2.close();
-@@ -421,11 +422,11 @@
- String jsonString = topicControl.listMessagesForSubscriptionAsJSON(HornetQDestination.createQueueNameForDurableSubscription(true, clientID,
- subscriptionName));
- Assert.assertNotNull(jsonString);
-- JSONArray array = new JSONArray(jsonString);
-- Assert.assertEquals(3, array.length());
-+ JsonArray array = JsonUtil.readJsonArray(jsonString);
-+ Assert.assertEquals(3, array.size());
- for (int i = 0; i < 3; i++)
- {
-- Assert.assertEquals(ids[i], array.getJSONObject(i).get("JMSMessageID"));
-+ Assert.assertEquals(ids[i], array.getJsonObject(i).get("JMSMessageID").toString());
- }
-
- connection.close();
-diff -Nru hornetq-HornetQ_2_4_7_Final/tests/integration-tests/src/test/java/org/hornetq/tests/integration/management/BroadcastGroupControlTest.java hornetq-HornetQ_2_4_7_Final.javax.json/tests/integration-tests/src/test/java/org/hornetq/tests/integration/management/BroadcastGroupControlTest.java
---- hornetq-HornetQ_2_4_7_Final/tests/integration-tests/src/test/java/org/hornetq/tests/integration/management/BroadcastGroupControlTest.java 2015-04-13 20:00:17.000000000 +0200
-+++ hornetq-HornetQ_2_4_7_Final.javax.json/tests/integration-tests/src/test/java/org/hornetq/tests/integration/management/BroadcastGroupControlTest.java 2016-07-18 12:01:40.401996246 +0200
-@@ -16,10 +16,12 @@
-
- import java.util.ArrayList;
- import java.util.List;
-+import javax.json.JsonArray;
-
- import org.junit.Assert;
-
- import org.hornetq.api.core.BroadcastGroupConfiguration;
-+import org.hornetq.api.core.JsonUtil;
- import org.hornetq.api.core.TransportConfiguration;
- import org.hornetq.api.core.UDPBroadcastGroupConfiguration;
- import org.hornetq.api.core.management.BroadcastGroupControl;
-@@ -28,7 +30,6 @@
- import org.hornetq.core.server.HornetQServers;
- import org.hornetq.tests.util.RandomUtil;
- import org.hornetq.api.core.Pair;
--import org.hornetq.utils.json.JSONArray;
-
- /**
- * @author Jeff Mesnil
-@@ -90,8 +91,8 @@
- Assert.assertEquals(broadcastGroupConfig.getConnectorInfos().get(0), connectorPairData);
- String jsonString = broadcastGroupControl.getConnectorPairsAsJSON();
- Assert.assertNotNull(jsonString);
-- JSONArray array = new JSONArray(jsonString);
-- Assert.assertEquals(1, array.length());
-+ JsonArray array = JsonUtil.readJsonArray(jsonString);
-+ Assert.assertEquals(1, array.size());
- Assert.assertEquals(broadcastGroupConfig.getConnectorInfos().get(0), array.getString(0));
-
- Assert.assertTrue(broadcastGroupControl.isStarted());
-diff -Nru hornetq-HornetQ_2_4_7_Final/tests/integration-tests/src/test/java/org/hornetq/tests/integration/management/ClusterConnectionControlTest.java hornetq-HornetQ_2_4_7_Final.javax.json/tests/integration-tests/src/test/java/org/hornetq/tests/integration/management/ClusterConnectionControlTest.java
---- hornetq-HornetQ_2_4_7_Final/tests/integration-tests/src/test/java/org/hornetq/tests/integration/management/ClusterConnectionControlTest.java 2015-04-13 20:00:17.000000000 +0200
-+++ hornetq-HornetQ_2_4_7_Final.javax.json/tests/integration-tests/src/test/java/org/hornetq/tests/integration/management/ClusterConnectionControlTest.java 2016-07-18 12:03:08.241833646 +0200
-@@ -20,11 +20,13 @@
- import java.util.List;
- import java.util.Map;
-
-+import javax.json.JsonArray;
- import javax.management.MBeanServer;
- import javax.management.MBeanServerFactory;
-
- import org.junit.Assert;
- import org.hornetq.api.core.DiscoveryGroupConfiguration;
-+import org.hornetq.api.core.JsonUtil;
- import org.hornetq.api.core.SimpleString;
- import org.hornetq.api.core.TransportConfiguration;
- import org.hornetq.api.core.UDPBroadcastGroupConfiguration;
-@@ -42,7 +44,6 @@
- import org.hornetq.core.server.management.Notification;
- import org.hornetq.tests.integration.SimpleNotificationService;
- import org.hornetq.tests.util.RandomUtil;
--import org.hornetq.utils.json.JSONArray;
-
- /**
- * A BridgeControlTest
-@@ -98,8 +99,8 @@
-
- String jsonString = clusterConnectionControl.getStaticConnectorsAsJSON();
- Assert.assertNotNull(jsonString);
-- JSONArray array = new JSONArray(jsonString);
-- Assert.assertEquals(1, array.length());
-+ JsonArray array = JsonUtil.readJsonArray(jsonString);
-+ Assert.assertEquals(1, array.size());
- Assert.assertEquals(clusterConnectionConfig1.getStaticConnectors().get(0), array.getString(0));
-
- Assert.assertNull(clusterConnectionControl.getDiscoveryGroupName());
-diff -Nru hornetq-HornetQ_2_4_7_Final/tests/integration-tests/src/test/java/org/hornetq/tests/integration/management/HornetQServerControlTest.java hornetq-HornetQ_2_4_7_Final.javax.json/tests/integration-tests/src/test/java/org/hornetq/tests/integration/management/HornetQServerControlTest.java
---- hornetq-HornetQ_2_4_7_Final/tests/integration-tests/src/test/java/org/hornetq/tests/integration/management/HornetQServerControlTest.java 2015-04-13 20:00:17.000000000 +0200
-+++ hornetq-HornetQ_2_4_7_Final.javax.json/tests/integration-tests/src/test/java/org/hornetq/tests/integration/management/HornetQServerControlTest.java 2016-07-18 11:59:48.533313491 +0200
-@@ -12,11 +12,14 @@
- */
- package org.hornetq.tests.integration.management;
-
-+import javax.json.JsonArray;
-+import javax.json.JsonObject;
- import javax.transaction.xa.XAResource;
- import javax.transaction.xa.Xid;
- import java.util.HashMap;
- import java.util.Map;
-
-+import org.hornetq.api.core.JsonUtil;
- import org.hornetq.api.core.SimpleString;
- import org.hornetq.api.core.TransportConfiguration;
- import org.hornetq.api.core.client.ClientConsumer;
-@@ -45,8 +48,6 @@
- import org.hornetq.tests.util.RandomUtil;
- import org.hornetq.tests.util.UnitTestCase;
- import org.hornetq.utils.UUIDGenerator;
--import org.hornetq.utils.json.JSONArray;
--import org.hornetq.utils.json.JSONObject;
- import org.junit.After;
- import org.junit.Assert;
- import org.junit.Before;
-@@ -169,12 +170,12 @@
-
- String jsonString = serverControl.getConnectorsAsJSON();
- Assert.assertNotNull(jsonString);
-- JSONArray array = new JSONArray(jsonString);
-- Assert.assertEquals(1, array.length());
-- JSONObject data = array.getJSONObject(0);
-- Assert.assertEquals(connectorConfig.getName(), data.optString("name"));
-- Assert.assertEquals(connectorConfig.getFactoryClassName(), data.optString("factoryClassName"));
-- Assert.assertEquals(connectorConfig.getParams().size(), data.getJSONObject("params").length());
-+ JsonArray array = JsonUtil.readJsonArray(jsonString);
-+ Assert.assertEquals(1, array.size());
-+ JsonObject data = array.getJsonObject(0);
-+ Assert.assertEquals(connectorConfig.getName(), data.getString("name"));
-+ Assert.assertEquals(connectorConfig.getFactoryClassName(), data.getString("factoryClassName"));
-+ Assert.assertEquals(connectorConfig.getParams().size(), data.getJsonObject("params").size());
- }
-
- @Test
-@@ -855,10 +856,10 @@
-
- HornetQServerControl serverControl = createManagementControl();
-
-- JSONArray jsonArray = new JSONArray(serverControl.listProducersInfoAsJSON());
-+ JsonArray jsonArray = JsonUtil.readJsonArray(serverControl.listProducersInfoAsJSON());
-
-- assertEquals(1, jsonArray.length());
-- assertEquals(4, ((JSONObject) jsonArray.get(0)).getInt("msgSent"));
-+ assertEquals(1, jsonArray.size());
-+ assertEquals(4, ((JsonObject) jsonArray.get(0)).getInt("msgSent"));
-
- clientSession.close();
- locator.close();
-diff -Nru hornetq-HornetQ_2_4_7_Final/tests/integration-tests/src/test/java/org/hornetq/tests/integration/management/ManagementHelperTest.java hornetq-HornetQ_2_4_7_Final.javax.json/tests/integration-tests/src/test/java/org/hornetq/tests/integration/management/ManagementHelperTest.java
---- hornetq-HornetQ_2_4_7_Final/tests/integration-tests/src/test/java/org/hornetq/tests/integration/management/ManagementHelperTest.java 2015-04-13 20:00:17.000000000 +0200
-+++ hornetq-HornetQ_2_4_7_Final.javax.json/tests/integration-tests/src/test/java/org/hornetq/tests/integration/management/ManagementHelperTest.java 2016-07-18 12:04:36.816636217 +0200
-@@ -232,90 +232,6 @@
-
- }
-
-- @Test
-- public void testFromCommaSeparatedKeyValues() throws Exception
-- {
-- String str = "key1=1, key2=false, key3=2.0, key4=whatever";
--
-- Map map = ManagementHelper.fromCommaSeparatedKeyValues(str);
-- Assert.assertEquals(4, map.size());
-- Assert.assertTrue(map.containsKey("key1"));
-- Assert.assertEquals(1L, map.get("key1"));
--
-- Assert.assertTrue(map.containsKey("key2"));
-- Assert.assertEquals(false, map.get("key2"));
--
-- Assert.assertTrue(map.containsKey("key3"));
-- Assert.assertEquals(2.0, map.get("key3"));
--
-- Assert.assertTrue(map.containsKey("key4"));
-- Assert.assertEquals("whatever", map.get("key4"));
-- }
--
-- @Test
-- public void testFromCommaSeparatedArrayOfCommaSeparatedKeyValuesForSingleItem() throws Exception
-- {
-- // if there is a single item, no need to enclose it in { }
-- String str = "k11=1, k12=false, k13=2.0, k14=whatever ";
--
-- Object[] objects = ManagementHelper.fromCommaSeparatedArrayOfCommaSeparatedKeyValues(str);
-- Assert.assertEquals(1, objects.length);
--
-- Assert.assertTrue(objects[0] instanceof Map, ?>);
-- Map map = (Map) objects[0];
-- Assert.assertEquals(4, map.size());
-- Assert.assertTrue(map.containsKey("k11"));
-- Assert.assertEquals(1L, map.get("k11"));
--
-- Assert.assertTrue(map.containsKey("k12"));
-- Assert.assertEquals(false, map.get("k12"));
--
-- Assert.assertTrue(map.containsKey("k13"));
-- Assert.assertEquals(2.0, map.get("k13"));
--
-- Assert.assertTrue(map.containsKey("k14"));
-- Assert.assertEquals("whatever", map.get("k14"));
-- }
--
-- @Test
-- public void testFromCommaSeparatedArrayOfCommaSeparatedKeyValues() throws Exception
-- {
-- String str = "{ k11=1, k12=false, k13=2.0, k14=whatever },{ k21=2, k22=true, k23=23.0, k24=foo }";
--
-- Object[] objects = ManagementHelper.fromCommaSeparatedArrayOfCommaSeparatedKeyValues(str);
-- Assert.assertEquals(2, objects.length);
--
-- Assert.assertTrue(objects[0] instanceof Map, ?>);
-- Map map = (Map) objects[0];
-- Assert.assertEquals(4, map.size());
-- Assert.assertTrue(map.containsKey("k11"));
-- Assert.assertEquals(1L, map.get("k11"));
--
-- Assert.assertTrue(map.containsKey("k12"));
-- Assert.assertEquals(false, map.get("k12"));
--
-- Assert.assertTrue(map.containsKey("k13"));
-- Assert.assertEquals(2.0, map.get("k13"));
--
-- Assert.assertTrue(map.containsKey("k14"));
-- Assert.assertEquals("whatever", map.get("k14"));
--
-- Assert.assertTrue(objects[1] instanceof Map, ?>);
-- map = (Map) objects[1];
-- Assert.assertEquals(4, map.size());
-- Assert.assertTrue(map.containsKey("k21"));
-- Assert.assertEquals(2L, map.get("k21"));
--
-- Assert.assertTrue(map.containsKey("k22"));
-- Assert.assertEquals(true, map.get("k22"));
--
-- Assert.assertTrue(map.containsKey("k23"));
-- Assert.assertEquals(23.0, map.get("k23"));
--
-- Assert.assertTrue(map.containsKey("k24"));
-- Assert.assertEquals("foo", map.get("k24"));
-- }
--
- // Package protected ---------------------------------------------
-
- // Protected -----------------------------------------------------
-diff -Nru hornetq-HornetQ_2_4_7_Final/tests/integration-tests/src/test/java/org/hornetq/tests/integration/management/ManagementWithPagingServerTest.java hornetq-HornetQ_2_4_7_Final.javax.json/tests/integration-tests/src/test/java/org/hornetq/tests/integration/management/ManagementWithPagingServerTest.java
---- hornetq-HornetQ_2_4_7_Final/tests/integration-tests/src/test/java/org/hornetq/tests/integration/management/ManagementWithPagingServerTest.java 2015-04-13 20:00:17.000000000 +0200
-+++ hornetq-HornetQ_2_4_7_Final.javax.json/tests/integration-tests/src/test/java/org/hornetq/tests/integration/management/ManagementWithPagingServerTest.java 2016-07-18 12:07:15.442119191 +0200
-@@ -13,8 +13,10 @@
- package org.hornetq.tests.integration.management;
-
- import java.nio.ByteBuffer;
-+import javax.json.JsonArray;
-
- import org.hornetq.api.core.HornetQBuffer;
-+import org.hornetq.api.core.JsonUtil;
- import org.hornetq.api.core.SimpleString;
- import org.hornetq.api.core.TransportConfiguration;
- import org.hornetq.api.core.client.ClientConsumer;
-@@ -30,7 +32,6 @@
- import org.hornetq.core.settings.impl.AddressFullMessagePolicy;
- import org.hornetq.core.settings.impl.AddressSettings;
- import org.hornetq.tests.util.RandomUtil;
--import org.hornetq.utils.json.JSONArray;
- import org.junit.After;
- import org.junit.Assert;
- import org.junit.Before;
-@@ -78,9 +79,9 @@
-
- String result = queueControl.listMessagesAsJSON(null);
-
-- JSONArray array = new JSONArray(result);
-+ JsonArray array = JsonUtil.readJsonArray(result);
-
-- assertEquals(num, array.length());
-+ assertEquals(num, array.size());
-
- //kick off receiver
- receiver.start();
-@@ -90,9 +91,9 @@
-
- result = queueControl.listMessagesAsJSON(null);
-
-- array = new JSONArray(result);
-+ array = JsonUtil.readJsonArray(result);
-
-- assertEquals(0, array.length());
-+ assertEquals(0, array.size());
- }
-
- @Test
-@@ -136,9 +137,9 @@
-
- String jsonString = queueControl.listMessagesAsJSON(filter);
- Assert.assertNotNull(jsonString);
-- JSONArray array = new JSONArray(jsonString);
-- Assert.assertEquals(num / 2, array.length());
-- Assert.assertEquals(matchingValue, array.getJSONObject(0).get("key"));
-+ JsonArray array = JsonUtil.readJsonArray(jsonString);
-+ Assert.assertEquals(num / 2, array.size());
-+ Assert.assertEquals(matchingValue, array.getJsonObject(0).get("key").toString());
-
- long n = queueControl.countMessages(filter);
- assertEquals(num / 2, n);
-diff -Nru hornetq-HornetQ_2_4_7_Final/tests/integration-tests/src/test/java/org/hornetq/tests/integration/management/QueueControlTest.java hornetq-HornetQ_2_4_7_Final.javax.json/tests/integration-tests/src/test/java/org/hornetq/tests/integration/management/QueueControlTest.java
---- hornetq-HornetQ_2_4_7_Final/tests/integration-tests/src/test/java/org/hornetq/tests/integration/management/QueueControlTest.java 2015-04-13 20:00:17.000000000 +0200
-+++ hornetq-HornetQ_2_4_7_Final.javax.json/tests/integration-tests/src/test/java/org/hornetq/tests/integration/management/QueueControlTest.java 2016-07-18 12:15:07.882681164 +0200
-@@ -17,9 +17,12 @@
- import java.util.concurrent.CountDownLatch;
- import java.util.concurrent.TimeUnit;
-
-+import javax.json.JsonArray;
-+import javax.json.JsonObject;
- import javax.management.Notification;
-
- import org.hornetq.api.core.HornetQException;
-+import org.hornetq.api.core.JsonUtil;
- import org.hornetq.api.core.Message;
- import org.hornetq.api.core.SimpleString;
- import org.hornetq.api.core.TransportConfiguration;
-@@ -46,7 +49,6 @@
- import org.hornetq.core.settings.impl.AddressSettings;
- import org.hornetq.tests.integration.jms.server.management.JMSUtil;
- import org.hornetq.tests.util.RandomUtil;
--import org.hornetq.utils.json.JSONArray;
- import org.junit.After;
- import org.junit.Assert;
- import org.junit.Before;
-@@ -230,16 +232,16 @@
-
- System.out.println("Consumers: " + queueControl.listConsumersAsJSON());
-
-- JSONArray obj = new JSONArray(queueControl.listConsumersAsJSON());
-+ JsonArray obj = JsonUtil.readJsonArray(queueControl.listConsumersAsJSON());
-
-- assertEquals(1, obj.length());
-+ assertEquals(1, obj.size());
-
- consumer.close();
- Assert.assertEquals(0, queueControl.getConsumerCount());
-
-- obj = new JSONArray(queueControl.listConsumersAsJSON());
-+ obj = JsonUtil.readJsonArray(queueControl.listConsumersAsJSON());
-
-- assertEquals(0, obj.length());
-+ assertEquals(0, obj.size());
-
- session.deleteQueue(queue);
- }
-@@ -555,16 +557,16 @@
-
- String jsonString = queueControl.listScheduledMessagesAsJSON();
- Assert.assertNotNull(jsonString);
-- JSONArray array = new JSONArray(jsonString);
-- Assert.assertEquals(1, array.length());
-- Assert.assertEquals(intValue, array.getJSONObject(0).get("key"));
-+ JsonArray array = JsonUtil.readJsonArray(jsonString);
-+ Assert.assertEquals(1, array.size());
-+ Assert.assertEquals(intValue, array.getJsonObject(0).get("key"));
-
- Thread.sleep(delay + 500);
-
- jsonString = queueControl.listScheduledMessagesAsJSON();
- Assert.assertNotNull(jsonString);
-- array = new JSONArray(jsonString);
-- Assert.assertEquals(0, array.length());
-+ array = JsonUtil.readJsonArray(jsonString);
-+ Assert.assertEquals(0, array.size());
-
- ManagementTestBase.consumeMessages(2, session, queue);
-
-@@ -615,16 +617,16 @@
-
- String jsonString = queueControl.listMessagesAsJSON(null);
- Assert.assertNotNull(jsonString);
-- JSONArray array = new JSONArray(jsonString);
-- Assert.assertEquals(1, array.length());
-- Assert.assertEquals(intValue, array.getJSONObject(0).get("key"));
-+ JsonArray array = JsonUtil.readJsonArray(jsonString);
-+ Assert.assertEquals(1, array.size());
-+ Assert.assertEquals(intValue, array.getJsonObject(0).get("key"));
-
- ManagementTestBase.consumeMessages(1, session, queue);
-
- jsonString = queueControl.listMessagesAsJSON(null);
- Assert.assertNotNull(jsonString);
-- array = new JSONArray(jsonString);
-- Assert.assertEquals(0, array.length());
-+ array = JsonUtil.readJsonArray(jsonString);
-+ Assert.assertEquals(0, array.size());
-
- session.deleteQueue(queue);
- }
-@@ -735,16 +737,16 @@
-
- String jsonString = queueControl.listMessagesAsJSON(filter);
- Assert.assertNotNull(jsonString);
-- JSONArray array = new JSONArray(jsonString);
-- Assert.assertEquals(1, array.length());
-- Assert.assertEquals(matchingValue, array.getJSONObject(0).get("key"));
-+ JsonArray array = JsonUtil.readJsonArray(jsonString);
-+ Assert.assertEquals(1, array.size());
-+ Assert.assertEquals(matchingValue, array.getJsonObject(0).get("key"));
-
- ManagementTestBase.consumeMessages(2, session, queue);
-
- jsonString = queueControl.listMessagesAsJSON(filter);
- Assert.assertNotNull(jsonString);
-- array = new JSONArray(jsonString);
-- Assert.assertEquals(0, array.length());
-+ array = JsonUtil.readJsonArray(jsonString);
-+ Assert.assertEquals(0, array.size());
-
- session.deleteQueue(queue);
- }
diff --git a/hornetq.spec b/hornetq.spec
deleted file mode 100644
index b1f8ae4..0000000
--- a/hornetq.spec
+++ /dev/null
@@ -1,418 +0,0 @@
-# empty debuginfo
-%global debug_package %nil
-
-%global namedreltag .Final
-%global namedversion %{version}%{?namedreltag}
-%global customnamedversion 2_4_7_Final
-
-# Use this switch to rebuild without narayana
-# This is useful to break the hornetq circular dependency
-%if 0%{?fedora}
-%bcond_with narayana
-%endif
-
-Name: hornetq
-Version: 2.4.7
-Release: 8%{?dist}
-Summary: High performance messaging system
-License: ASL 2.0
-URL: http://hornetq.jboss.org/
-Source0: https://github.com/hornetq/hornetq/archive/HornetQ_%{customnamedversion}.tar.gz
-# https://issues.jboss.org/browse/HORNETQ-1534
-# Replace json.org with javax.json
-Patch0: hornetq-2.4.7-javax.json.patch
-
-BuildRequires: autoconf
-BuildRequires: automake
-BuildRequires: graphviz
-BuildRequires: libaio-devel
-BuildRequires: libtool
-BuildRequires: maven-local
-BuildRequires: mvn(com.github.maven-nar:nar-maven-plugin)
-BuildRequires: mvn(io.netty:netty-all)
-BuildRequires: mvn(java_cup:java_cup)
-BuildRequires: mvn(javax.inject:javax.inject)
-BuildRequires: mvn(javax.json:javax.json-api)
-BuildRequires: mvn(javax.servlet:servlet-api)
-BuildRequires: mvn(jdepend:jdepend)
-BuildRequires: mvn(junit:junit)
-BuildRequires: mvn(net.sf.saxon:saxon)
-BuildRequires: mvn(org.apache.maven.plugins:maven-assembly-plugin)
-BuildRequires: mvn(org.apache.maven.plugins:maven-install-plugin)
-BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin)
-BuildRequires: mvn(org.codehaus.mojo:javacc-maven-plugin)
-BuildRequires: mvn(org.codehaus.mojo:xml-maven-plugin)
-BuildRequires: mvn(org.jboss:jboss-transaction-spi)
-BuildRequires: mvn(org.jboss.apiviz:apiviz)
-BuildRequires: mvn(org.jboss.logging:jboss-logging)
-BuildRequires: mvn(org.jboss.logging:jboss-logging-processor)
-BuildRequires: mvn(org.jboss.logmanager:jboss-logmanager)
-BuildRequires: mvn(org.jboss.naming:jnpserver)
-%if %{without narayana}
-BuildRequires: mvn(org.jboss.narayana.jta:jta)
-BuildRequires: mvn(org.springframework:spring-beans)
-BuildRequires: mvn(org.springframework:spring-context)
-BuildRequires: mvn(org.springframework:spring-core)
-BuildRequires: mvn(org.springframework:spring-jms)
-%endif
-BuildRequires: mvn(org.jboss.resteasy:resteasy-atom-provider)
-BuildRequires: mvn(org.jboss.resteasy:resteasy-jackson-provider)
-BuildRequires: mvn(org.jboss.resteasy:resteasy-jaxb-provider)
-BuildRequires: mvn(org.jboss.resteasy:resteasy-jaxrs)
-BuildRequires: mvn(org.jboss.resteasy:tjws)
-BuildRequires: mvn(org.jboss.spec.javax.jms:jboss-jms-api_2.0_spec)
-BuildRequires: mvn(org.jboss.spec.javax.resource:jboss-connector-api_1.6_spec)
-BuildRequires: mvn(org.jboss.spec.javax.transaction:jboss-transaction-api_1.1_spec)
-BuildRequires: mvn(org.jgroups:jgroups)
-
-%description
-HornetQ is an open source project to build a multi-protocol, embeddable,
-very high performance, clustered, asynchronous messaging system.
-
-%package commons
-Summary: HornetQ Commons
-# Public Domain: ./hornetq-commons/src/main/java/org/hornetq/utils/Base64.java
-License: ASL 2.0 and Public Domain
-Provides: bundled(java-base64) = 2.2.2
-Obsoletes: %{name} < 2.4.2
-BuildArch: noarch
-
-%description commons
-HornetQ Commons Classes.
-
-%package core-client
-Summary: HornetQ Core Client
-License: ASL 2.0 and LGPLv2+
-# LGPLv2:
-#./hornetq-core-client/src/main/java/org/hornetq/core/filter/impl/Operator.java
-#./hornetq-core-client/src/main/java/org/hornetq/core/filter/impl/RegExp.java
-#./hornetq-core-client/src/main/java/org/hornetq/core/filter/impl/Identifier.java
-BuildArch: noarch
-
-%description core-client
-HornetQ Core Client.
-
-%package jms-client
-Summary: HornetQ JMS Client
-BuildArch: noarch
-
-%description jms-client
-HornetQ JMS Client Implementation.
-
-%package jms-server
-Summary: HornetQ JMS Server
-BuildArch: noarch
-
-%description jms-server
-HornetQ JMS Server Implementation.
-
-%package journal
-Summary: HornetQ Journal
-BuildArch: noarch
-
-%description journal
-HornetQ Journal.
-
-%package native
-Summary: HornetQ Journal
-
-%description native
-HornetQ Journal.
-
-%package pom
-Summary: HornetQ Parent POM
-BuildArch: noarch
-
-%description pom
-HornetQ Parent POM.
-
-%package protocols
-Summary: HornetQ Protocols Parent POM
-BuildArch: noarch
-
-%description protocols
-HornetQ Protocols Parent POM.
-
-%package ra
-Summary: HornetQ RAR
-BuildArch: noarch
-
-%description ra
-HornetQ RAR Implementation.
-
-%package rest
-Summary: HornetQ REST
-BuildArch: noarch
-
-%description rest
-HornetQ REST Interface Implementation.
-
-%package server
-Summary: HornetQ Server
-License: ASL 2.0 and LGPLv2+
-# LGPLv2: ./hornetq-server/src/main/java/org/hornetq/core/messagecounter/MessageCounter.java
-BuildArch: noarch
-
-%description server
-HornetQ Server Implementation.
-
-%package spring-integration
-Summary: HornetQ Spring Integration
-BuildArch: noarch
-
-%description spring-integration
-HornetQ Spring Integration.
-
-%package stomp-protocol
-Summary: HornetQ STOMP Protocol
-BuildArch: noarch
-
-%description stomp-protocol
-HornetQ STOMP Protocol Implementation.
-
-%package tools
-Summary: HornetQ Tools
-BuildArch: noarch
-
-%description tools
-HornetQ Tools.
-
-%package javadoc
-Summary: Javadoc for %{name}
-BuildArch: noarch
-
-%description javadoc
-This package contains the API documentation for %{name}.
-
-%prep
-%setup -q -n hornetq-HornetQ_%{customnamedversion}
-# Remove bundled .so files
-find -name "*.so" -print -delete
-find -name "*.jar" -print -delete
-
-%patch0 -p1
-rm -rf hornetq-core-client/src/main/java/org/hornetq/utils/json
-
-%pom_change_dep -r :geronimo-json_1.0_spec javax.json:javax.json-api:1.0 hornetq-core-client hornetq-jms-server tests/integration-tests
-
-%pom_disable_module examples
-%pom_disable_module hornetq-bootstrap
-%pom_disable_module hornetq-service-sar
-%pom_disable_module integration/hornetq-aerogear-integration
-%pom_disable_module integration/hornetq-jboss-as-integration
-%pom_disable_module integration/hornetq-twitter-integration
-%pom_disable_module tests
-
-# Incompatible version of qpid-proton-java
-%pom_disable_module hornetq-amqp-protocol hornetq-protocols
-
-%pom_remove_dep -r "org.jboss.microcontainer:jboss-kernel"
-
-%if %{with narayana}
-%pom_disable_module hornetq-jms-server
-%pom_disable_module hornetq-ra
-%pom_disable_module hornetq-rest
-%pom_disable_module hornetq-tools
-%pom_disable_module integration/hornetq-spring-integration
-%endif
-
-%pom_change_dep -r org.jboss.jbossts.jts:jbossjts-jacorb org.jboss.narayana.jta:jta
-%pom_change_dep -r org.jboss.jbossts.jts:jbossjts-jacorb org.jboss.narayana.jta:jta hornetq-jms-server
-
-%pom_remove_dep -r org.jboss.javaee:jboss-ejb-api
-%pom_remove_dep -r org.jboss.javaee:jboss-jaspi-api
-%pom_change_dep -r org.jboss.javaee:jboss-jca-api org.jboss.spec.javax.resource:jboss-connector-api_1.6_spec
-%pom_change_dep -r org.jboss.javaee:jboss-jca-api org.jboss.spec.javax.resource:jboss-connector-api_1.6_spec hornetq-ra
-
-%pom_remove_plugin -r :license-maven-plugin
-%pom_remove_plugin -r :maven-checkstyle-plugin
-%pom_remove_plugin -r :maven-help-plugin
-%pom_remove_plugin -r :maven-source-plugin
-%pom_remove_plugin -r :findbugs-maven-plugin
-
-cp -p distribution/hornetq/src/main/resources/licenses/LICENSE.txt .
-
-# Workaround for building native bits
-# Currently the build script uses the .so in the hornetq-nativebin/ directory
-# but we need to rebuild them. The issue is that the mvn build process does not
-# use the new .so files we've built. Here is a simple workaround.
-%pom_xpath_inject "pom:project/pom:profiles" "
-
- native
-
- hornetq-commons
- hornetq-native
-
-"
-
-rm -r **/src/test/* tests/*/src/test/*
-
-# [ERROR] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique duplicate declaration of version
-%pom_remove_dep org.jboss.logmanager:jboss-logmanager hornetq-server
-%pom_add_dep org.jboss.logmanager:jboss-logmanager:1.2.2.GA:test hornetq-server
-
-%build
-
-# Let's build the .so files
-%mvn_build -i -f -- -Pnative,native-build
-pushd hornetq-native
-# Copy them to hornetq-native/bin/ dir
-find -name "*.so" -exec cp {} bin/libHornetQAIO.so \;
-find -name "*.so" -exec cp {} bin/libHornetQAIO%{__isa_bits}.so \;
-popd
-
-# Tests are skipped because required modules are disabled
-%mvn_build -sf -- -Pmaven-release
-
-%install
-%mvn_install
-
-# Install native stuff
-install -d -m 755 %{buildroot}/%{_libdir}
-cp -L hornetq-native/bin/libHornetQAIO.so %{buildroot}/%{_libdir}/libHornetQAIO.so
-
-%files commons -f .mfiles-hornetq-commons
-%doc README.md
-%license LICENSE.txt NOTICE
-
-%files core-client -f .mfiles-hornetq-core-client
-%files jms-client -f .mfiles-hornetq-jms-client
-%files journal -f .mfiles-hornetq-journal
-
-%post -n hornetq-native -p /sbin/ldconfig
-%postun -n hornetq-native -p /sbin/ldconfig
-
-%files native -f .mfiles-hornetq-native
-%{_libdir}/libHornetQAIO.so
-%doc hornetq-native/README
-
-%files pom -f .mfiles-hornetq-pom
-%license LICENSE.txt NOTICE
-
-%files protocols -f .mfiles-hornetq-protocols
-%license LICENSE.txt NOTICE
-
-%files server -f .mfiles-hornetq-server
-%files stomp-protocol -f .mfiles-hornetq-stomp-protocol
-
-%if %{without narayana}
-%files jms-server -f .mfiles-hornetq-jms-server
-%files ra -f .mfiles-hornetq-ra
-%files rest -f .mfiles-hornetq-rest
-%files spring-integration -f .mfiles-hornetq-spring-integration
-%files tools -f .mfiles-hornetq-tools
-%endif
-
-%files javadoc -f .mfiles-javadoc
-%license LICENSE.txt NOTICE
-
-%changelog
-* Fri Jul 13 2018 Fedora Release Engineering - 2.4.7-8
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
-
-* Wed Feb 07 2018 Fedora Release Engineering - 2.4.7-7
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
-
-* Wed Aug 02 2017 Fedora Release Engineering - 2.4.7-6
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
-
-* Wed Jul 26 2017 Fedora Release Engineering - 2.4.7-5
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
-
-* Fri Feb 10 2017 Fedora Release Engineering - 2.4.7-4
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
-
-* Tue Nov 01 2016 gil cattaneo 2.4.7-3
-- remove test suites
-
-* Wed Sep 14 2016 gil cattaneo 2.4.7-2
-- Obsoletes hornetq package
-
-* Wed Jun 29 2016 gil cattaneo 2.4.7-1
-- Upstream release 2.4.7.Final
-- remove non free json.org
-
-* Mon Jun 13 2016 Mikolaj Izdebski - 2.4.1-8
-- Add missing BR on java_cup
-- Disable hornetq-amqp-protocol module
-
-* Wed Feb 03 2016 Fedora Release Engineering - 2.4.1-7
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
-
-* Wed Jun 17 2015 Fedora Release Engineering - 2.4.1-6
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
-
-* Sat May 02 2015 Kalev Lember - 2.4.1-5
-- Rebuilt for GCC 5 C++11 ABI change
-
-* Sat Aug 16 2014 Fedora Release Engineering - 2.4.1-4
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
-
-* Sat Jun 07 2014 Fedora Release Engineering - 2.4.1-3
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
-
-* Fri Mar 28 2014 Michael Simacek - 2.4.1-2
-- Use Requires: java-headless rebuild (#1067528)
-
-* Thu Feb 13 2014 Marek Goldmann - 2.4.1-1
-- Upstream release 2.4.1.Final
-
-* Fri Jan 24 2014 Marek Goldmann - 2.4.0-6
-- Rebuild with narayana deps
-
-* Fri Jan 24 2014 Marek Goldmann - 2.4.0-5
-- Rebuild without narayana deps
-- Enable ARM build
-
-* Tue Jan 21 2014 Marek Goldmann - 2.4.0-4
-- Rebuild to recreate debug package and use new qpid-proton-java package
-
-* Tue Jan 14 2014 Marek Goldmann - 2.4.0-3
-- Rebuild with new narayana
-- Exclude ARM for now
-
-* Tue Jan 14 2014 Marek Goldmann - 2.4.0-2
-- Rebuild without narayana to disable circular dependency
-- Changes to netty requirement
-
-* Thu Jan 09 2014 Marek Goldmann - 2.4.0-1
-- Upstream release 2.4.0.Final
-
-* Mon Dec 16 2013 Marek Goldmann - 2.4.0-0.3.Beta3
-- Upstream release 2.4.0.Beta3
-
-* Thu Oct 24 2013 Marek Goldmann - 2.4.0-0.2.Beta1
-- Upstream release 2.4.0.Beta2
-
-* Wed Sep 11 2013 Marek Goldmann - 2.4.0-0.1.Beta1
-- Upstream release 2.4.0.Beta1
-
-* Tue Jul 30 2013 Marek Goldmann - 2.3.1-2
-- Rebuild with narayana
-- Added hornetq-jms-server and hornetq-ra modules
-
-* Wed Jun 12 2013 Marek Goldmann - 2.3.1-1
-- Upstream release 2.3.1.Final
-- New guidelines
-
-* Thu Feb 14 2013 Fedora Release Engineering - 2.2.13-6
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
-
-* Thu Jul 19 2012 Fedora Release Engineering - 2.2.13-5
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
-
-* Thu May 24 2012 Marek Goldmann 2.2.13-4
-- Removed unnecessary Requires
-
-* Wed May 23 2012 Marek Goldmann 2.2.13-3
-- Removed unnecessary %%global
-- Added License file to -devel subpackage
-- Removed static files
-
-* Wed May 16 2012 Marek Goldmann 2.2.13-2
-- Added native part to the build
-
-* Tue May 15 2012 Marek Goldmann 2.2.13-1
-- Initial packaging
-
-
diff --git a/sources b/sources
deleted file mode 100644
index b0d2829..0000000
--- a/sources
+++ /dev/null
@@ -1 +0,0 @@
-9a32e37beb6a31afdeea8bc4e2518de8 HornetQ_2_4_7_Final.tar.gz
| |