Remove unnecessary boxing / unboxing

This commit is contained in:
sigee 2017-05-29 16:42:43 +02:00 committed by Sigee
parent 673f4b33e8
commit 3ba93ed957
111 changed files with 653 additions and 654 deletions

View File

@ -90,7 +90,7 @@ public abstract class InboundTransformer {
jms.setBooleanProperty(JMS_AMQP_HEADER, true); jms.setBooleanProperty(JMS_AMQP_HEADER, true);
if (header.getDurable() != null) { if (header.getDurable() != null) {
jms.setPersistent(header.getDurable().booleanValue()); jms.setPersistent(header.getDurable());
} else { } else {
jms.setPersistent(false); jms.setPersistent(false);
} }

View File

@ -636,7 +636,7 @@ public class AmqpConnection implements AmqpProtocolConverter {
public void onActiveMQCommand(Command command) throws Exception { public void onActiveMQCommand(Command command) throws Exception {
if (command.isResponse()) { if (command.isResponse()) {
Response response = (Response) command; Response response = (Response) command;
ResponseHandler rh = resposeHandlers.remove(Integer.valueOf(response.getCorrelationId())); ResponseHandler rh = resposeHandlers.remove(response.getCorrelationId());
if (rh != null) { if (rh != null) {
rh.onResponse(this, response); rh.onResponse(this, response);
} else { } else {
@ -799,7 +799,7 @@ public class AmqpConnection implements AmqpProtocolConverter {
command.setCommandId(lastCommandId.incrementAndGet()); command.setCommandId(lastCommandId.incrementAndGet());
if (handler != null) { if (handler != null) {
command.setResponseRequired(true); command.setResponseRequired(true);
resposeHandlers.put(Integer.valueOf(command.getCommandId()), handler); resposeHandlers.put(command.getCommandId(), handler);
} }
amqpTransport.sendToActiveMQ(command); amqpTransport.sendToActiveMQ(command);
} }

View File

@ -124,7 +124,7 @@ public class JMSInteroperabilityTest extends JMSClientTestSupport {
outbound.setDoubleProperty("Double", nDouble); outbound.setDoubleProperty("Double", nDouble);
outbound.setStringProperty("String", "test"); outbound.setStringProperty("String", "test");
outbound.setLongProperty("Long", nLong); outbound.setLongProperty("Long", nLong);
outbound.setObjectProperty("BooleanObject", Boolean.valueOf(bool)); outbound.setObjectProperty("BooleanObject", bool);
openwireProducer.send(outbound); openwireProducer.send(outbound);
@ -208,7 +208,7 @@ public class JMSInteroperabilityTest extends JMSClientTestSupport {
outbound.setDoubleProperty("Double", nDouble); outbound.setDoubleProperty("Double", nDouble);
outbound.setStringProperty("String", "test"); outbound.setStringProperty("String", "test");
outbound.setLongProperty("Long", nLong); outbound.setLongProperty("Long", nLong);
outbound.setObjectProperty("BooleanObject", Boolean.valueOf(bool)); outbound.setObjectProperty("BooleanObject", bool);
amqpProducer.send(outbound); amqpProducer.send(outbound);

View File

@ -82,8 +82,7 @@ public class JMSMessageGroupsTest extends JMSClientTestSupport {
byte[] buffer = new byte[MESSAGE_SIZE]; byte[] buffer = new byte[MESSAGE_SIZE];
for (count = 0; count < MESSAGE_SIZE; count++) { for (count = 0; count < MESSAGE_SIZE; count++) {
String s = String.valueOf(count % 10); String s = String.valueOf(count % 10);
Character c = s.charAt(0); int value = s.charAt(0);
int value = c.charValue();
buffer[count] = (byte) value; buffer[count] = (byte) value;
} }

View File

@ -119,7 +119,7 @@ public final class TypeConversionSupport {
Converter longConverter = new Converter() { Converter longConverter = new Converter() {
@Override @Override
public Object convert(Object value) { public Object convert(Object value) {
return Long.valueOf(((Number) value).longValue()); return ((Number) value).longValue();
} }
}; };
CONVERSION_MAP.put(new ConversionKey(Byte.class, Long.class), longConverter); CONVERSION_MAP.put(new ConversionKey(Byte.class, Long.class), longConverter);
@ -128,14 +128,14 @@ public final class TypeConversionSupport {
CONVERSION_MAP.put(new ConversionKey(Date.class, Long.class), new Converter() { CONVERSION_MAP.put(new ConversionKey(Date.class, Long.class), new Converter() {
@Override @Override
public Object convert(Object value) { public Object convert(Object value) {
return Long.valueOf(((Date) value).getTime()); return ((Date) value).getTime();
} }
}); });
Converter intConverter = new Converter() { Converter intConverter = new Converter() {
@Override @Override
public Object convert(Object value) { public Object convert(Object value) {
return Integer.valueOf(((Number) value).intValue()); return ((Number) value).intValue();
} }
}; };
CONVERSION_MAP.put(new ConversionKey(Byte.class, Integer.class), intConverter); CONVERSION_MAP.put(new ConversionKey(Byte.class, Integer.class), intConverter);
@ -144,14 +144,14 @@ public final class TypeConversionSupport {
CONVERSION_MAP.put(new ConversionKey(Byte.class, Short.class), new Converter() { CONVERSION_MAP.put(new ConversionKey(Byte.class, Short.class), new Converter() {
@Override @Override
public Object convert(Object value) { public Object convert(Object value) {
return Short.valueOf(((Number) value).shortValue()); return ((Number) value).shortValue();
} }
}); });
CONVERSION_MAP.put(new ConversionKey(Float.class, Double.class), new Converter() { CONVERSION_MAP.put(new ConversionKey(Float.class, Double.class), new Converter() {
@Override @Override
public Object convert(Object value) { public Object convert(Object value) {
return Double.valueOf(((Number) value).doubleValue()); return ((Number) value).doubleValue();
} }
}); });
} }

View File

@ -104,7 +104,7 @@ public class AMQPMessageIdHelperTest {
*/ */
@Test @Test
public void testToBaseMessageIdStringWithStringBeginningWithEncodingPrefixForLong() { public void testToBaseMessageIdStringWithStringBeginningWithEncodingPrefixForLong() {
String longStringMessageId = AMQPMessageIdHelper.AMQP_ULONG_PREFIX + Long.valueOf(123456789L); String longStringMessageId = AMQPMessageIdHelper.AMQP_ULONG_PREFIX + 123456789L;
String expected = AMQPMessageIdHelper.AMQP_STRING_PREFIX + longStringMessageId; String expected = AMQPMessageIdHelper.AMQP_STRING_PREFIX + longStringMessageId;
String baseMessageIdString = messageIdHelper.toBaseMessageIdString(longStringMessageId); String baseMessageIdString = messageIdHelper.toBaseMessageIdString(longStringMessageId);

View File

@ -112,6 +112,6 @@ public final class BrokerFactory {
if( value==null ) { if( value==null ) {
return true; return true;
} }
return value.booleanValue(); return value;
} }
} }

View File

@ -160,7 +160,7 @@ public class TransactionBroker extends BrokerFilter {
@Override @Override
public int hashCode() { public int hashCode() {
return System.identityHashCode(destination) + return System.identityHashCode(destination) +
System.identityHashCode(Boolean.valueOf(messageSend)); System.identityHashCode(messageSend);
} }
@Override @Override

View File

@ -165,9 +165,9 @@ public final class OpenTypeSupport {
rc.put("JMSReplyTo",toString(m.getJMSReplyTo())); rc.put("JMSReplyTo",toString(m.getJMSReplyTo()));
rc.put("JMSType", m.getJMSType()); rc.put("JMSType", m.getJMSType());
rc.put("JMSDeliveryMode", m.getJMSDeliveryMode() == DeliveryMode.PERSISTENT ? "PERSISTENT" : "NON-PERSISTENT"); rc.put("JMSDeliveryMode", m.getJMSDeliveryMode() == DeliveryMode.PERSISTENT ? "PERSISTENT" : "NON-PERSISTENT");
rc.put("JMSExpiration", Long.valueOf(m.getJMSExpiration())); rc.put("JMSExpiration", m.getJMSExpiration());
rc.put("JMSPriority", Integer.valueOf(m.getJMSPriority())); rc.put("JMSPriority", m.getJMSPriority());
rc.put("JMSRedelivered", Boolean.valueOf(m.getJMSRedelivered())); rc.put("JMSRedelivered", m.getJMSRedelivered());
rc.put("JMSTimestamp", new Date(m.getJMSTimestamp())); rc.put("JMSTimestamp", new Date(m.getJMSTimestamp()));
rc.put(CompositeDataConstants.JMSXGROUP_ID, m.getGroupID()); rc.put(CompositeDataConstants.JMSXGROUP_ID, m.getGroupID());
rc.put(CompositeDataConstants.JMSXGROUP_SEQ, m.getGroupSequence()); rc.put(CompositeDataConstants.JMSXGROUP_SEQ, m.getGroupSequence());
@ -288,9 +288,9 @@ public final class OpenTypeSupport {
long length = 0; long length = 0;
try { try {
length = m.getBodyLength(); length = m.getBodyLength();
rc.put(CompositeDataConstants.BODY_LENGTH, Long.valueOf(length)); rc.put(CompositeDataConstants.BODY_LENGTH, length);
} catch (JMSException e) { } catch (JMSException e) {
rc.put(CompositeDataConstants.BODY_LENGTH, Long.valueOf(0)); rc.put(CompositeDataConstants.BODY_LENGTH, 0L);
} }
try { try {
byte preview[] = new byte[(int)Math.min(length, 255)]; byte preview[] = new byte[(int)Math.min(length, 255)];
@ -302,7 +302,7 @@ public final class OpenTypeSupport {
// In 1.6 it seems it is supported.. but until then... // In 1.6 it seems it is supported.. but until then...
Byte data[] = new Byte[preview.length]; Byte data[] = new Byte[preview.length];
for (int i = 0; i < data.length; i++) { for (int i = 0; i < data.length; i++) {
data[i] = Byte.valueOf(preview[i]); data[i] = preview[i];
} }
rc.put(CompositeDataConstants.BODY_PREVIEW, data); rc.put(CompositeDataConstants.BODY_PREVIEW, data);
@ -482,8 +482,8 @@ public final class OpenTypeSupport {
SlowConsumerEntry entry = (SlowConsumerEntry) o; SlowConsumerEntry entry = (SlowConsumerEntry) o;
Map<String, Object> rc = super.getFields(o); Map<String, Object> rc = super.getFields(o);
rc.put("subscription", entry.getSubscription()); rc.put("subscription", entry.getSubscription());
rc.put("slowCount", Integer.valueOf(entry.getSlowCount())); rc.put("slowCount", entry.getSlowCount());
rc.put("markCount", Integer.valueOf(entry.getMarkCount())); rc.put("markCount", entry.getMarkCount());
return rc; return rc;
} }
} }

View File

@ -227,9 +227,9 @@ public class DurableTopicSubscription extends PrefetchSubscription implements Us
(lastDeliveredSequenceId > 0 && node.getMessageId().getBrokerSequenceId() <= lastDeliveredSequenceId)) { (lastDeliveredSequenceId > 0 && node.getMessageId().getBrokerSequenceId() <= lastDeliveredSequenceId)) {
Integer count = redeliveredMessages.get(node.getMessageId()); Integer count = redeliveredMessages.get(node.getMessageId());
if (count != null) { if (count != null) {
redeliveredMessages.put(node.getMessageId(), Integer.valueOf(count.intValue() + 1)); redeliveredMessages.put(node.getMessageId(), count + 1);
} else { } else {
redeliveredMessages.put(node.getMessageId(), Integer.valueOf(1)); redeliveredMessages.put(node.getMessageId(), 1);
} }
} }
if (keepDurableSubsActive && pending.isTransient()) { if (keepDurableSubsActive && pending.isTransient()) {
@ -272,7 +272,7 @@ public class DurableTopicSubscription extends PrefetchSubscription implements Us
node.incrementReferenceCount(); node.incrementReferenceCount();
Integer count = redeliveredMessages.get(node.getMessageId()); Integer count = redeliveredMessages.get(node.getMessageId());
if (count != null) { if (count != null) {
md.setRedeliveryCounter(count.intValue()); md.setRedeliveryCounter(count);
} }
} }
return md; return md;

View File

@ -304,7 +304,7 @@ public class Queue extends BaseDestination implements Task, UsageListener, Index
if ((recoveredAccumulator % 10000) == 0) { if ((recoveredAccumulator % 10000) == 0) {
LOG.info("cursor for {} has recovered {} messages. {}% complete", LOG.info("cursor for {} has recovered {} messages. {}% complete",
getActiveMQDestination().getQualifiedName(), recoveredAccumulator, getActiveMQDestination().getQualifiedName(), recoveredAccumulator,
Integer.valueOf((int) (recoveredAccumulator * 100 / totalMessageCount))); (int) (recoveredAccumulator * 100 / totalMessageCount));
} }
// Message could have expired while it was being // Message could have expired while it was being
// loaded.. // loaded..

View File

@ -753,7 +753,7 @@ public class RegionBroker extends EmptyBroker {
boolean stamped = false; boolean stamped = false;
if (message.getProperty(ORIGINAL_EXPIRATION) == null) { if (message.getProperty(ORIGINAL_EXPIRATION) == null) {
long expiration = message.getExpiration(); long expiration = message.getExpiration();
message.setProperty(ORIGINAL_EXPIRATION, Long.valueOf(expiration)); message.setProperty(ORIGINAL_EXPIRATION, expiration);
stamped = true; stamped = true;
} }
return stamped; return stamped;

View File

@ -63,7 +63,7 @@ public class JAXPXPathEvaluator implements XPathExpression.XPathEvaluator {
try { try {
InputSource inputSource = new InputSource(new ByteArrayInputStream(data)); InputSource inputSource = new InputSource(new ByteArrayInputStream(data));
Document inputDocument = builder.parse(inputSource); Document inputDocument = builder.parse(inputSource);
return ((Boolean)xpath.evaluate(xpathExpression, inputDocument, XPathConstants.BOOLEAN)).booleanValue(); return (Boolean) xpath.evaluate(xpathExpression, inputDocument, XPathConstants.BOOLEAN);
} catch (Exception e) { } catch (Exception e) {
return false; return false;
} }
@ -73,7 +73,7 @@ public class JAXPXPathEvaluator implements XPathExpression.XPathEvaluator {
try { try {
InputSource inputSource = new InputSource(new StringReader(text)); InputSource inputSource = new InputSource(new StringReader(text));
Document inputDocument = builder.parse(inputSource); Document inputDocument = builder.parse(inputSource);
return ((Boolean)xpath.evaluate(xpathExpression, inputDocument, XPathConstants.BOOLEAN)).booleanValue(); return (Boolean) xpath.evaluate(xpathExpression, inputDocument, XPathConstants.BOOLEAN);
} catch (Exception e) { } catch (Exception e) {
return false; return false;
} }

View File

@ -138,8 +138,8 @@ public class LDAPAuthorizationMap implements AuthorizationMap {
String queueSearchSubtree = options.get(QUEUE_SEARCH_SUBTREE); String queueSearchSubtree = options.get(QUEUE_SEARCH_SUBTREE);
topicSearchMatchingFormat = new MessageFormat(topicSearchMatching); topicSearchMatchingFormat = new MessageFormat(topicSearchMatching);
queueSearchMatchingFormat = new MessageFormat(queueSearchMatching); queueSearchMatchingFormat = new MessageFormat(queueSearchMatching);
topicSearchSubtreeBool = Boolean.valueOf(topicSearchSubtree).booleanValue(); topicSearchSubtreeBool = Boolean.valueOf(topicSearchSubtree);
queueSearchSubtreeBool = Boolean.valueOf(queueSearchSubtree).booleanValue(); queueSearchSubtreeBool = Boolean.valueOf(queueSearchSubtree);
} }
public Set<GroupPrincipal> getTempDestinationAdminACLs() { public Set<GroupPrincipal> getTempDestinationAdminACLs() {

View File

@ -185,7 +185,7 @@ public class CronParser {
static void validate(final CronEntry entry) throws MessageFormatException { static void validate(final CronEntry entry) throws MessageFormatException {
List<Integer> list = entry.currentWhen; List<Integer> list = entry.currentWhen;
if (list.isEmpty() || list.get(0).intValue() < entry.start || list.get(list.size() - 1).intValue() > entry.end) { if (list.isEmpty() || list.get(0) < entry.start || list.get(list.size() - 1) > entry.end) {
throw new MessageFormatException("Invalid token: " + entry); throw new MessageFormatException("Invalid token: " + entry);
} }
} }
@ -200,15 +200,15 @@ public class CronParser {
List<Integer> list = entry.currentWhen; List<Integer> list = entry.currentWhen;
int next = -1; int next = -1;
for (Integer i : list) { for (Integer i : list) {
if (i.intValue() > current) { if (i > current) {
next = i.intValue(); next = i;
break; break;
} }
} }
if (next != -1) { if (next != -1) {
result = next - current; result = next - current;
} else { } else {
int first = list.get(0).intValue(); int first = list.get(0);
int fixedEnd = entry.end; int fixedEnd = entry.end;
@ -229,7 +229,7 @@ public class CronParser {
} }
static boolean isCurrent(final CronEntry entry, final int current) throws MessageFormatException { static boolean isCurrent(final CronEntry entry, final int current) throws MessageFormatException {
boolean result = entry.currentWhen.contains(Integer.valueOf(current)); boolean result = entry.currentWhen.contains(current);
return result; return result;
} }
@ -265,7 +265,7 @@ public class CronParser {
CronEntry ce = new CronEntry(entry.name, numerator, entry.start, entry.end); CronEntry ce = new CronEntry(entry.name, numerator, entry.start, entry.end);
List<Integer> list = calculateValues(ce); List<Integer> list = calculateValues(ce);
for (Integer i : list) { for (Integer i : list) {
if (i.intValue() % denominator == 0) { if (i % denominator == 0) {
result.add(i); result.add(i);
} }
} }

View File

@ -778,21 +778,21 @@ public class ActiveMQBytesMessage extends ActiveMQMessage implements BytesMessag
} }
initializeWriting(); initializeWriting();
if (value instanceof Boolean) { if (value instanceof Boolean) {
writeBoolean(((Boolean)value).booleanValue()); writeBoolean((Boolean) value);
} else if (value instanceof Character) { } else if (value instanceof Character) {
writeChar(((Character)value).charValue()); writeChar((Character) value);
} else if (value instanceof Byte) { } else if (value instanceof Byte) {
writeByte(((Byte)value).byteValue()); writeByte((Byte) value);
} else if (value instanceof Short) { } else if (value instanceof Short) {
writeShort(((Short)value).shortValue()); writeShort((Short) value);
} else if (value instanceof Integer) { } else if (value instanceof Integer) {
writeInt(((Integer)value).intValue()); writeInt((Integer) value);
} else if (value instanceof Long) { } else if (value instanceof Long) {
writeLong(((Long)value).longValue()); writeLong((Long) value);
} else if (value instanceof Float) { } else if (value instanceof Float) {
writeFloat(((Float)value).floatValue()); writeFloat((Float) value);
} else if (value instanceof Double) { } else if (value instanceof Double) {
writeDouble(((Double)value).doubleValue()); writeDouble((Double) value);
} else if (value instanceof String) { } else if (value instanceof String) {
writeUTF(value.toString()); writeUTF(value.toString());
} else if (value instanceof byte[]) { } else if (value instanceof byte[]) {

View File

@ -243,13 +243,13 @@ public class ActiveMQMapMessage extends ActiveMQMessage implements MapMessage {
return false; return false;
} }
if (value instanceof Boolean) { if (value instanceof Boolean) {
return ((Boolean)value).booleanValue(); return (Boolean) value;
} }
if (value instanceof UTF8Buffer) { if (value instanceof UTF8Buffer) {
return Boolean.valueOf(value.toString()).booleanValue(); return Boolean.valueOf(value.toString());
} }
if (value instanceof String) { if (value instanceof String) {
return Boolean.valueOf(value.toString()).booleanValue(); return Boolean.valueOf(value.toString());
} else { } else {
throw new MessageFormatException(" cannot read a boolean from " + value.getClass().getName()); throw new MessageFormatException(" cannot read a boolean from " + value.getClass().getName());
} }
@ -272,13 +272,13 @@ public class ActiveMQMapMessage extends ActiveMQMessage implements MapMessage {
return 0; return 0;
} }
if (value instanceof Byte) { if (value instanceof Byte) {
return ((Byte)value).byteValue(); return (Byte) value;
} }
if (value instanceof UTF8Buffer) { if (value instanceof UTF8Buffer) {
return Byte.valueOf(value.toString()).byteValue(); return Byte.valueOf(value.toString());
} }
if (value instanceof String) { if (value instanceof String) {
return Byte.valueOf(value.toString()).byteValue(); return Byte.valueOf(value.toString());
} else { } else {
throw new MessageFormatException(" cannot read a byte from " + value.getClass().getName()); throw new MessageFormatException(" cannot read a byte from " + value.getClass().getName());
} }
@ -301,16 +301,16 @@ public class ActiveMQMapMessage extends ActiveMQMessage implements MapMessage {
return 0; return 0;
} }
if (value instanceof Short) { if (value instanceof Short) {
return ((Short)value).shortValue(); return (Short) value;
} }
if (value instanceof Byte) { if (value instanceof Byte) {
return ((Byte)value).shortValue(); return ((Byte)value).shortValue();
} }
if (value instanceof UTF8Buffer) { if (value instanceof UTF8Buffer) {
return Short.valueOf(value.toString()).shortValue(); return Short.valueOf(value.toString());
} }
if (value instanceof String) { if (value instanceof String) {
return Short.valueOf(value.toString()).shortValue(); return Short.valueOf(value.toString());
} else { } else {
throw new MessageFormatException(" cannot read a short from " + value.getClass().getName()); throw new MessageFormatException(" cannot read a short from " + value.getClass().getName());
} }
@ -333,7 +333,7 @@ public class ActiveMQMapMessage extends ActiveMQMessage implements MapMessage {
if (value == null) { if (value == null) {
throw new NullPointerException(); throw new NullPointerException();
} else if (value instanceof Character) { } else if (value instanceof Character) {
return ((Character)value).charValue(); return (Character) value;
} else { } else {
throw new MessageFormatException(" cannot read a char from " + value.getClass().getName()); throw new MessageFormatException(" cannot read a char from " + value.getClass().getName());
} }
@ -356,7 +356,7 @@ public class ActiveMQMapMessage extends ActiveMQMessage implements MapMessage {
return 0; return 0;
} }
if (value instanceof Integer) { if (value instanceof Integer) {
return ((Integer)value).intValue(); return (Integer) value;
} }
if (value instanceof Short) { if (value instanceof Short) {
return ((Short)value).intValue(); return ((Short)value).intValue();
@ -365,10 +365,10 @@ public class ActiveMQMapMessage extends ActiveMQMessage implements MapMessage {
return ((Byte)value).intValue(); return ((Byte)value).intValue();
} }
if (value instanceof UTF8Buffer) { if (value instanceof UTF8Buffer) {
return Integer.valueOf(value.toString()).intValue(); return Integer.valueOf(value.toString());
} }
if (value instanceof String) { if (value instanceof String) {
return Integer.valueOf(value.toString()).intValue(); return Integer.valueOf(value.toString());
} else { } else {
throw new MessageFormatException(" cannot read an int from " + value.getClass().getName()); throw new MessageFormatException(" cannot read an int from " + value.getClass().getName());
} }
@ -391,7 +391,7 @@ public class ActiveMQMapMessage extends ActiveMQMessage implements MapMessage {
return 0; return 0;
} }
if (value instanceof Long) { if (value instanceof Long) {
return ((Long)value).longValue(); return (Long) value;
} }
if (value instanceof Integer) { if (value instanceof Integer) {
return ((Integer)value).longValue(); return ((Integer)value).longValue();
@ -403,10 +403,10 @@ public class ActiveMQMapMessage extends ActiveMQMessage implements MapMessage {
return ((Byte)value).longValue(); return ((Byte)value).longValue();
} }
if (value instanceof UTF8Buffer) { if (value instanceof UTF8Buffer) {
return Long.valueOf(value.toString()).longValue(); return Long.valueOf(value.toString());
} }
if (value instanceof String) { if (value instanceof String) {
return Long.valueOf(value.toString()).longValue(); return Long.valueOf(value.toString());
} else { } else {
throw new MessageFormatException(" cannot read a long from " + value.getClass().getName()); throw new MessageFormatException(" cannot read a long from " + value.getClass().getName());
} }
@ -429,13 +429,13 @@ public class ActiveMQMapMessage extends ActiveMQMessage implements MapMessage {
return 0; return 0;
} }
if (value instanceof Float) { if (value instanceof Float) {
return ((Float)value).floatValue(); return (Float) value;
} }
if (value instanceof UTF8Buffer) { if (value instanceof UTF8Buffer) {
return Float.valueOf(value.toString()).floatValue(); return Float.valueOf(value.toString());
} }
if (value instanceof String) { if (value instanceof String) {
return Float.valueOf(value.toString()).floatValue(); return Float.valueOf(value.toString());
} else { } else {
throw new MessageFormatException(" cannot read a float from " + value.getClass().getName()); throw new MessageFormatException(" cannot read a float from " + value.getClass().getName());
} }
@ -458,13 +458,13 @@ public class ActiveMQMapMessage extends ActiveMQMessage implements MapMessage {
if (value == null) { if (value == null) {
return 0; return 0;
} else if (value instanceof Double) { } else if (value instanceof Double) {
return ((Double)value).doubleValue(); return (Double) value;
} else if (value instanceof Float) { } else if (value instanceof Float) {
return ((Float)value).floatValue(); return (Float) value;
} else if (value instanceof UTF8Buffer) { } else if (value instanceof UTF8Buffer) {
return Double.valueOf(value.toString()).doubleValue(); return Double.valueOf(value.toString());
} else if (value instanceof String) { } else if (value instanceof String) {
return Double.valueOf(value.toString()).doubleValue(); return Double.valueOf(value.toString());
} else { } else {
throw new MessageFormatException("Cannot read a double from " + value.getClass().getName()); throw new MessageFormatException("Cannot read a double from " + value.getClass().getName());
} }
@ -603,7 +603,7 @@ public class ActiveMQMapMessage extends ActiveMQMessage implements MapMessage {
@Override @Override
public void setByte(String name, byte value) throws JMSException { public void setByte(String name, byte value) throws JMSException {
initializeWriting(); initializeWriting();
put(name, Byte.valueOf(value)); put(name, value);
} }
/** /**
@ -620,7 +620,7 @@ public class ActiveMQMapMessage extends ActiveMQMessage implements MapMessage {
@Override @Override
public void setShort(String name, short value) throws JMSException { public void setShort(String name, short value) throws JMSException {
initializeWriting(); initializeWriting();
put(name, Short.valueOf(value)); put(name, value);
} }
/** /**
@ -637,7 +637,7 @@ public class ActiveMQMapMessage extends ActiveMQMessage implements MapMessage {
@Override @Override
public void setChar(String name, char value) throws JMSException { public void setChar(String name, char value) throws JMSException {
initializeWriting(); initializeWriting();
put(name, Character.valueOf(value)); put(name, value);
} }
/** /**
@ -654,7 +654,7 @@ public class ActiveMQMapMessage extends ActiveMQMessage implements MapMessage {
@Override @Override
public void setInt(String name, int value) throws JMSException { public void setInt(String name, int value) throws JMSException {
initializeWriting(); initializeWriting();
put(name, Integer.valueOf(value)); put(name, value);
} }
/** /**
@ -671,7 +671,7 @@ public class ActiveMQMapMessage extends ActiveMQMessage implements MapMessage {
@Override @Override
public void setLong(String name, long value) throws JMSException { public void setLong(String name, long value) throws JMSException {
initializeWriting(); initializeWriting();
put(name, Long.valueOf(value)); put(name, value);
} }
/** /**
@ -688,7 +688,7 @@ public class ActiveMQMapMessage extends ActiveMQMessage implements MapMessage {
@Override @Override
public void setFloat(String name, float value) throws JMSException { public void setFloat(String name, float value) throws JMSException {
initializeWriting(); initializeWriting();
put(name, Float.valueOf(value)); put(name, value);
} }
/** /**
@ -705,7 +705,7 @@ public class ActiveMQMapMessage extends ActiveMQMessage implements MapMessage {
@Override @Override
public void setDouble(String name, double value) throws JMSException { public void setDouble(String name, double value) throws JMSException {
initializeWriting(); initializeWriting();
put(name, Double.valueOf(value)); put(name, value);
} }
/** /**

View File

@ -360,7 +360,7 @@ public class ActiveMQMessage extends Message implements org.apache.activemq.Mess
if (rc == null) { if (rc == null) {
throw new MessageFormatException("Property JMSXDeliveryCount cannot be set from a " + value.getClass().getName() + "."); throw new MessageFormatException("Property JMSXDeliveryCount cannot be set from a " + value.getClass().getName() + ".");
} }
message.setRedeliveryCounter(rc.intValue() - 1); message.setRedeliveryCounter(rc - 1);
} }
}); });
JMS_PROPERTY_SETERS.put("JMSXGroupID", new PropertySetter() { JMS_PROPERTY_SETERS.put("JMSXGroupID", new PropertySetter() {
@ -380,7 +380,7 @@ public class ActiveMQMessage extends Message implements org.apache.activemq.Mess
if (rc == null) { if (rc == null) {
throw new MessageFormatException("Property JMSXGroupSeq cannot be set from a " + value.getClass().getName() + "."); throw new MessageFormatException("Property JMSXGroupSeq cannot be set from a " + value.getClass().getName() + ".");
} }
message.setGroupSequence(rc.intValue()); message.setGroupSequence(rc);
} }
}); });
JMS_PROPERTY_SETERS.put("JMSCorrelationID", new PropertySetter() { JMS_PROPERTY_SETERS.put("JMSCorrelationID", new PropertySetter() {
@ -415,7 +415,7 @@ public class ActiveMQMessage extends Message implements org.apache.activemq.Mess
if (bool == null) { if (bool == null) {
throw new MessageFormatException("Property JMSDeliveryMode cannot be set from a " + value.getClass().getName() + "."); throw new MessageFormatException("Property JMSDeliveryMode cannot be set from a " + value.getClass().getName() + ".");
} else { } else {
rc = bool.booleanValue() ? DeliveryMode.PERSISTENT : DeliveryMode.NON_PERSISTENT; rc = bool ? DeliveryMode.PERSISTENT : DeliveryMode.NON_PERSISTENT;
} }
} }
((ActiveMQMessage) message).setJMSDeliveryMode(rc); ((ActiveMQMessage) message).setJMSDeliveryMode(rc);
@ -428,7 +428,7 @@ public class ActiveMQMessage extends Message implements org.apache.activemq.Mess
if (rc == null) { if (rc == null) {
throw new MessageFormatException("Property JMSExpiration cannot be set from a " + value.getClass().getName() + "."); throw new MessageFormatException("Property JMSExpiration cannot be set from a " + value.getClass().getName() + ".");
} }
((ActiveMQMessage) message).setJMSExpiration(rc.longValue()); ((ActiveMQMessage) message).setJMSExpiration(rc);
} }
}); });
JMS_PROPERTY_SETERS.put("JMSPriority", new PropertySetter() { JMS_PROPERTY_SETERS.put("JMSPriority", new PropertySetter() {
@ -438,7 +438,7 @@ public class ActiveMQMessage extends Message implements org.apache.activemq.Mess
if (rc == null) { if (rc == null) {
throw new MessageFormatException("Property JMSPriority cannot be set from a " + value.getClass().getName() + "."); throw new MessageFormatException("Property JMSPriority cannot be set from a " + value.getClass().getName() + ".");
} }
((ActiveMQMessage) message).setJMSPriority(rc.intValue()); ((ActiveMQMessage) message).setJMSPriority(rc);
} }
}); });
JMS_PROPERTY_SETERS.put("JMSRedelivered", new PropertySetter() { JMS_PROPERTY_SETERS.put("JMSRedelivered", new PropertySetter() {
@ -448,7 +448,7 @@ public class ActiveMQMessage extends Message implements org.apache.activemq.Mess
if (rc == null) { if (rc == null) {
throw new MessageFormatException("Property JMSRedelivered cannot be set from a " + value.getClass().getName() + "."); throw new MessageFormatException("Property JMSRedelivered cannot be set from a " + value.getClass().getName() + ".");
} }
((ActiveMQMessage) message).setJMSRedelivered(rc.booleanValue()); ((ActiveMQMessage) message).setJMSRedelivered(rc);
} }
}); });
JMS_PROPERTY_SETERS.put("JMSReplyTo", new PropertySetter() { JMS_PROPERTY_SETERS.put("JMSReplyTo", new PropertySetter() {
@ -468,7 +468,7 @@ public class ActiveMQMessage extends Message implements org.apache.activemq.Mess
if (rc == null) { if (rc == null) {
throw new MessageFormatException("Property JMSTimestamp cannot be set from a " + value.getClass().getName() + "."); throw new MessageFormatException("Property JMSTimestamp cannot be set from a " + value.getClass().getName() + ".");
} }
((ActiveMQMessage) message).setJMSTimestamp(rc.longValue()); ((ActiveMQMessage) message).setJMSTimestamp(rc);
} }
}); });
JMS_PROPERTY_SETERS.put("JMSType", new PropertySetter() { JMS_PROPERTY_SETERS.put("JMSType", new PropertySetter() {
@ -590,7 +590,7 @@ public class ActiveMQMessage extends Message implements org.apache.activemq.Mess
if (rc == null) { if (rc == null) {
throw new MessageFormatException("Property " + name + " was a " + value.getClass().getName() + " and cannot be read as a boolean"); throw new MessageFormatException("Property " + name + " was a " + value.getClass().getName() + " and cannot be read as a boolean");
} }
return rc.booleanValue(); return rc;
} }
@Override @Override
@ -603,7 +603,7 @@ public class ActiveMQMessage extends Message implements org.apache.activemq.Mess
if (rc == null) { if (rc == null) {
throw new MessageFormatException("Property " + name + " was a " + value.getClass().getName() + " and cannot be read as a byte"); throw new MessageFormatException("Property " + name + " was a " + value.getClass().getName() + " and cannot be read as a byte");
} }
return rc.byteValue(); return rc;
} }
@Override @Override
@ -616,7 +616,7 @@ public class ActiveMQMessage extends Message implements org.apache.activemq.Mess
if (rc == null) { if (rc == null) {
throw new MessageFormatException("Property " + name + " was a " + value.getClass().getName() + " and cannot be read as a short"); throw new MessageFormatException("Property " + name + " was a " + value.getClass().getName() + " and cannot be read as a short");
} }
return rc.shortValue(); return rc;
} }
@Override @Override
@ -629,7 +629,7 @@ public class ActiveMQMessage extends Message implements org.apache.activemq.Mess
if (rc == null) { if (rc == null) {
throw new MessageFormatException("Property " + name + " was a " + value.getClass().getName() + " and cannot be read as an integer"); throw new MessageFormatException("Property " + name + " was a " + value.getClass().getName() + " and cannot be read as an integer");
} }
return rc.intValue(); return rc;
} }
@Override @Override
@ -642,7 +642,7 @@ public class ActiveMQMessage extends Message implements org.apache.activemq.Mess
if (rc == null) { if (rc == null) {
throw new MessageFormatException("Property " + name + " was a " + value.getClass().getName() + " and cannot be read as a long"); throw new MessageFormatException("Property " + name + " was a " + value.getClass().getName() + " and cannot be read as a long");
} }
return rc.longValue(); return rc;
} }
@Override @Override
@ -655,7 +655,7 @@ public class ActiveMQMessage extends Message implements org.apache.activemq.Mess
if (rc == null) { if (rc == null) {
throw new MessageFormatException("Property " + name + " was a " + value.getClass().getName() + " and cannot be read as a float"); throw new MessageFormatException("Property " + name + " was a " + value.getClass().getName() + " and cannot be read as a float");
} }
return rc.floatValue(); return rc;
} }
@Override @Override
@ -668,7 +668,7 @@ public class ActiveMQMessage extends Message implements org.apache.activemq.Mess
if (rc == null) { if (rc == null) {
throw new MessageFormatException("Property " + name + " was a " + value.getClass().getName() + " and cannot be read as a double"); throw new MessageFormatException("Property " + name + " was a " + value.getClass().getName() + " and cannot be read as a double");
} }
return rc.doubleValue(); return rc;
} }
@Override @Override
@ -698,37 +698,37 @@ public class ActiveMQMessage extends Message implements org.apache.activemq.Mess
} }
public void setBooleanProperty(String name, boolean value, boolean checkReadOnly) throws JMSException { public void setBooleanProperty(String name, boolean value, boolean checkReadOnly) throws JMSException {
setObjectProperty(name, Boolean.valueOf(value), checkReadOnly); setObjectProperty(name, value, checkReadOnly);
} }
@Override @Override
public void setByteProperty(String name, byte value) throws JMSException { public void setByteProperty(String name, byte value) throws JMSException {
setObjectProperty(name, Byte.valueOf(value)); setObjectProperty(name, value);
} }
@Override @Override
public void setShortProperty(String name, short value) throws JMSException { public void setShortProperty(String name, short value) throws JMSException {
setObjectProperty(name, Short.valueOf(value)); setObjectProperty(name, value);
} }
@Override @Override
public void setIntProperty(String name, int value) throws JMSException { public void setIntProperty(String name, int value) throws JMSException {
setObjectProperty(name, Integer.valueOf(value)); setObjectProperty(name, value);
} }
@Override @Override
public void setLongProperty(String name, long value) throws JMSException { public void setLongProperty(String name, long value) throws JMSException {
setObjectProperty(name, Long.valueOf(value)); setObjectProperty(name, value);
} }
@Override @Override
public void setFloatProperty(String name, float value) throws JMSException { public void setFloatProperty(String name, float value) throws JMSException {
setObjectProperty(name, Float.valueOf(value)); setObjectProperty(name, value);
} }
@Override @Override
public void setDoubleProperty(String name, double value) throws JMSException { public void setDoubleProperty(String name, double value) throws JMSException {
setObjectProperty(name, Double.valueOf(value)); setObjectProperty(name, value);
} }
@Override @Override

View File

@ -215,7 +215,7 @@ public class ActiveMQStreamMessage extends ActiveMQMessage implements StreamMess
return this.dataIn.readBoolean(); return this.dataIn.readBoolean();
} }
if (type == MarshallingSupport.STRING_TYPE) { if (type == MarshallingSupport.STRING_TYPE) {
return Boolean.valueOf(this.dataIn.readUTF()).booleanValue(); return Boolean.valueOf(this.dataIn.readUTF());
} }
if (type == MarshallingSupport.NULL) { if (type == MarshallingSupport.NULL) {
this.dataIn.reset(); this.dataIn.reset();
@ -258,7 +258,7 @@ public class ActiveMQStreamMessage extends ActiveMQMessage implements StreamMess
return this.dataIn.readByte(); return this.dataIn.readByte();
} }
if (type == MarshallingSupport.STRING_TYPE) { if (type == MarshallingSupport.STRING_TYPE) {
return Byte.valueOf(this.dataIn.readUTF()).byteValue(); return Byte.valueOf(this.dataIn.readUTF());
} }
if (type == MarshallingSupport.NULL) { if (type == MarshallingSupport.NULL) {
this.dataIn.reset(); this.dataIn.reset();
@ -311,7 +311,7 @@ public class ActiveMQStreamMessage extends ActiveMQMessage implements StreamMess
return this.dataIn.readByte(); return this.dataIn.readByte();
} }
if (type == MarshallingSupport.STRING_TYPE) { if (type == MarshallingSupport.STRING_TYPE) {
return Short.valueOf(this.dataIn.readUTF()).shortValue(); return Short.valueOf(this.dataIn.readUTF());
} }
if (type == MarshallingSupport.NULL) { if (type == MarshallingSupport.NULL) {
this.dataIn.reset(); this.dataIn.reset();
@ -416,7 +416,7 @@ public class ActiveMQStreamMessage extends ActiveMQMessage implements StreamMess
return this.dataIn.readByte(); return this.dataIn.readByte();
} }
if (type == MarshallingSupport.STRING_TYPE) { if (type == MarshallingSupport.STRING_TYPE) {
return Integer.valueOf(this.dataIn.readUTF()).intValue(); return Integer.valueOf(this.dataIn.readUTF());
} }
if (type == MarshallingSupport.NULL) { if (type == MarshallingSupport.NULL) {
this.dataIn.reset(); this.dataIn.reset();
@ -476,7 +476,7 @@ public class ActiveMQStreamMessage extends ActiveMQMessage implements StreamMess
return this.dataIn.readByte(); return this.dataIn.readByte();
} }
if (type == MarshallingSupport.STRING_TYPE) { if (type == MarshallingSupport.STRING_TYPE) {
return Long.valueOf(this.dataIn.readUTF()).longValue(); return Long.valueOf(this.dataIn.readUTF());
} }
if (type == MarshallingSupport.NULL) { if (type == MarshallingSupport.NULL) {
this.dataIn.reset(); this.dataIn.reset();
@ -525,7 +525,7 @@ public class ActiveMQStreamMessage extends ActiveMQMessage implements StreamMess
return this.dataIn.readFloat(); return this.dataIn.readFloat();
} }
if (type == MarshallingSupport.STRING_TYPE) { if (type == MarshallingSupport.STRING_TYPE) {
return Float.valueOf(this.dataIn.readUTF()).floatValue(); return Float.valueOf(this.dataIn.readUTF());
} }
if (type == MarshallingSupport.NULL) { if (type == MarshallingSupport.NULL) {
this.dataIn.reset(); this.dataIn.reset();
@ -578,7 +578,7 @@ public class ActiveMQStreamMessage extends ActiveMQMessage implements StreamMess
return this.dataIn.readFloat(); return this.dataIn.readFloat();
} }
if (type == MarshallingSupport.STRING_TYPE) { if (type == MarshallingSupport.STRING_TYPE) {
return Double.valueOf(this.dataIn.readUTF()).doubleValue(); return Double.valueOf(this.dataIn.readUTF());
} }
if (type == MarshallingSupport.NULL) { if (type == MarshallingSupport.NULL) {
this.dataIn.reset(); this.dataIn.reset();
@ -808,28 +808,28 @@ public class ActiveMQStreamMessage extends ActiveMQMessage implements StreamMess
return this.dataIn.readUTF(); return this.dataIn.readUTF();
} }
if (type == MarshallingSupport.LONG_TYPE) { if (type == MarshallingSupport.LONG_TYPE) {
return Long.valueOf(this.dataIn.readLong()); return this.dataIn.readLong();
} }
if (type == MarshallingSupport.INTEGER_TYPE) { if (type == MarshallingSupport.INTEGER_TYPE) {
return Integer.valueOf(this.dataIn.readInt()); return this.dataIn.readInt();
} }
if (type == MarshallingSupport.SHORT_TYPE) { if (type == MarshallingSupport.SHORT_TYPE) {
return Short.valueOf(this.dataIn.readShort()); return this.dataIn.readShort();
} }
if (type == MarshallingSupport.BYTE_TYPE) { if (type == MarshallingSupport.BYTE_TYPE) {
return Byte.valueOf(this.dataIn.readByte()); return this.dataIn.readByte();
} }
if (type == MarshallingSupport.FLOAT_TYPE) { if (type == MarshallingSupport.FLOAT_TYPE) {
return Float.valueOf(this.dataIn.readFloat()); return this.dataIn.readFloat();
} }
if (type == MarshallingSupport.DOUBLE_TYPE) { if (type == MarshallingSupport.DOUBLE_TYPE) {
return Double.valueOf(this.dataIn.readDouble()); return this.dataIn.readDouble();
} }
if (type == MarshallingSupport.BOOLEAN_TYPE) { if (type == MarshallingSupport.BOOLEAN_TYPE) {
return this.dataIn.readBoolean() ? Boolean.TRUE : Boolean.FALSE; return this.dataIn.readBoolean() ? Boolean.TRUE : Boolean.FALSE;
} }
if (type == MarshallingSupport.CHAR_TYPE) { if (type == MarshallingSupport.CHAR_TYPE) {
return Character.valueOf(this.dataIn.readChar()); return this.dataIn.readChar();
} }
if (type == MarshallingSupport.BYTE_ARRAY_TYPE) { if (type == MarshallingSupport.BYTE_ARRAY_TYPE) {
int len = this.dataIn.readInt(); int len = this.dataIn.readInt();
@ -1106,23 +1106,23 @@ public class ActiveMQStreamMessage extends ActiveMQMessage implements StreamMess
} else if (value instanceof String) { } else if (value instanceof String) {
writeString(value.toString()); writeString(value.toString());
} else if (value instanceof Character) { } else if (value instanceof Character) {
writeChar(((Character)value).charValue()); writeChar((Character) value);
} else if (value instanceof Boolean) { } else if (value instanceof Boolean) {
writeBoolean(((Boolean)value).booleanValue()); writeBoolean((Boolean) value);
} else if (value instanceof Byte) { } else if (value instanceof Byte) {
writeByte(((Byte)value).byteValue()); writeByte((Byte) value);
} else if (value instanceof Short) { } else if (value instanceof Short) {
writeShort(((Short)value).shortValue()); writeShort((Short) value);
} else if (value instanceof Integer) { } else if (value instanceof Integer) {
writeInt(((Integer)value).intValue()); writeInt((Integer) value);
} else if (value instanceof Float) { } else if (value instanceof Float) {
writeFloat(((Float)value).floatValue()); writeFloat((Float) value);
} else if (value instanceof Double) { } else if (value instanceof Double) {
writeDouble(((Double)value).doubleValue()); writeDouble((Double) value);
} else if (value instanceof byte[]) { } else if (value instanceof byte[]) {
writeBytes((byte[])value); writeBytes((byte[])value);
}else if (value instanceof Long) { }else if (value instanceof Long) {
writeLong(((Long)value).longValue()); writeLong((Long) value);
}else { }else {
throw new MessageFormatException("Unsupported Object type: " + value.getClass()); throw new MessageFormatException("Unsupported Object type: " + value.getClass());
} }

View File

@ -281,29 +281,29 @@ public class WireFormatInfo implements Command, MarshallAware {
*/ */
public long getMaxInactivityDuration() throws IOException { public long getMaxInactivityDuration() throws IOException {
Long l = (Long)getProperty("MaxInactivityDuration"); Long l = (Long)getProperty("MaxInactivityDuration");
return l == null ? 0 : l.longValue(); return l == null ? 0 : l;
} }
public void setMaxInactivityDuration(long maxInactivityDuration) throws IOException { public void setMaxInactivityDuration(long maxInactivityDuration) throws IOException {
setProperty("MaxInactivityDuration", Long.valueOf(maxInactivityDuration)); setProperty("MaxInactivityDuration", maxInactivityDuration);
} }
public long getMaxInactivityDurationInitalDelay() throws IOException { public long getMaxInactivityDurationInitalDelay() throws IOException {
Long l = (Long)getProperty("MaxInactivityDurationInitalDelay"); Long l = (Long)getProperty("MaxInactivityDurationInitalDelay");
return l == null ? 0 : l.longValue(); return l == null ? 0 : l;
} }
public void setMaxInactivityDurationInitalDelay(long maxInactivityDurationInitalDelay) throws IOException { public void setMaxInactivityDurationInitalDelay(long maxInactivityDurationInitalDelay) throws IOException {
setProperty("MaxInactivityDurationInitalDelay", Long.valueOf(maxInactivityDurationInitalDelay)); setProperty("MaxInactivityDurationInitalDelay", maxInactivityDurationInitalDelay);
} }
public long getMaxFrameSize() throws IOException { public long getMaxFrameSize() throws IOException {
Long l = (Long)getProperty("MaxFrameSize"); Long l = (Long)getProperty("MaxFrameSize");
return l == null ? 0 : l.longValue(); return l == null ? 0 : l;
} }
public void setMaxFrameSize(long maxFrameSize) throws IOException { public void setMaxFrameSize(long maxFrameSize) throws IOException {
setProperty("MaxFrameSize", Long.valueOf(maxFrameSize)); setProperty("MaxFrameSize", maxFrameSize);
} }
/** /**
@ -311,11 +311,11 @@ public class WireFormatInfo implements Command, MarshallAware {
*/ */
public int getCacheSize() throws IOException { public int getCacheSize() throws IOException {
Integer i = (Integer)getProperty("CacheSize"); Integer i = (Integer)getProperty("CacheSize");
return i == null ? 0 : i.intValue(); return i == null ? 0 : i;
} }
public void setCacheSize(int cacheSize) throws IOException { public void setCacheSize(int cacheSize) throws IOException {
setProperty("CacheSize", Integer.valueOf(cacheSize)); setProperty("CacheSize", cacheSize);
} }
/** /**

View File

@ -122,42 +122,42 @@ public abstract class ArithmeticExpression extends BinaryExpression {
protected Number plus(Number left, Number right) { protected Number plus(Number left, Number right) {
switch (numberType(left, right)) { switch (numberType(left, right)) {
case INTEGER: case INTEGER:
return Integer.valueOf(left.intValue() + right.intValue()); return left.intValue() + right.intValue();
case LONG: case LONG:
return Long.valueOf(left.longValue() + right.longValue()); return left.longValue() + right.longValue();
default: default:
return Double.valueOf(left.doubleValue() + right.doubleValue()); return left.doubleValue() + right.doubleValue();
} }
} }
protected Number minus(Number left, Number right) { protected Number minus(Number left, Number right) {
switch (numberType(left, right)) { switch (numberType(left, right)) {
case INTEGER: case INTEGER:
return Integer.valueOf(left.intValue() - right.intValue()); return left.intValue() - right.intValue();
case LONG: case LONG:
return Long.valueOf(left.longValue() - right.longValue()); return left.longValue() - right.longValue();
default: default:
return Double.valueOf(left.doubleValue() - right.doubleValue()); return left.doubleValue() - right.doubleValue();
} }
} }
protected Number multiply(Number left, Number right) { protected Number multiply(Number left, Number right) {
switch (numberType(left, right)) { switch (numberType(left, right)) {
case INTEGER: case INTEGER:
return Integer.valueOf(left.intValue() * right.intValue()); return left.intValue() * right.intValue();
case LONG: case LONG:
return Long.valueOf(left.longValue() * right.longValue()); return left.longValue() * right.longValue();
default: default:
return Double.valueOf(left.doubleValue() * right.doubleValue()); return left.doubleValue() * right.doubleValue();
} }
} }
protected Number divide(Number left, Number right) { protected Number divide(Number left, Number right) {
return Double.valueOf(left.doubleValue() / right.doubleValue()); return left.doubleValue() / right.doubleValue();
} }
protected Number mod(Number left, Number right) { protected Number mod(Number left, Number right) {
return Double.valueOf(left.doubleValue() % right.doubleValue()); return left.doubleValue() % right.doubleValue();
} }
private int numberType(Number left, Number right) { private int numberType(Number left, Number right) {

View File

@ -58,7 +58,7 @@ public class BooleanFunctionCallExpr extends FunctionCallExpression implements B
result = (Boolean) evaluate(message_ctx); result = (Boolean) evaluate(message_ctx);
if (result != null) if (result != null)
return result.booleanValue(); return result;
return false; return false;
} }

View File

@ -53,26 +53,26 @@ public abstract class ComparisonExpression extends BinaryExpression implements B
} }
static { static {
REGEXP_CONTROL_CHARS.add(Character.valueOf('.')); REGEXP_CONTROL_CHARS.add('.');
REGEXP_CONTROL_CHARS.add(Character.valueOf('\\')); REGEXP_CONTROL_CHARS.add('\\');
REGEXP_CONTROL_CHARS.add(Character.valueOf('[')); REGEXP_CONTROL_CHARS.add('[');
REGEXP_CONTROL_CHARS.add(Character.valueOf(']')); REGEXP_CONTROL_CHARS.add(']');
REGEXP_CONTROL_CHARS.add(Character.valueOf('^')); REGEXP_CONTROL_CHARS.add('^');
REGEXP_CONTROL_CHARS.add(Character.valueOf('$')); REGEXP_CONTROL_CHARS.add('$');
REGEXP_CONTROL_CHARS.add(Character.valueOf('?')); REGEXP_CONTROL_CHARS.add('?');
REGEXP_CONTROL_CHARS.add(Character.valueOf('*')); REGEXP_CONTROL_CHARS.add('*');
REGEXP_CONTROL_CHARS.add(Character.valueOf('+')); REGEXP_CONTROL_CHARS.add('+');
REGEXP_CONTROL_CHARS.add(Character.valueOf('{')); REGEXP_CONTROL_CHARS.add('{');
REGEXP_CONTROL_CHARS.add(Character.valueOf('}')); REGEXP_CONTROL_CHARS.add('}');
REGEXP_CONTROL_CHARS.add(Character.valueOf('|')); REGEXP_CONTROL_CHARS.add('|');
REGEXP_CONTROL_CHARS.add(Character.valueOf('(')); REGEXP_CONTROL_CHARS.add('(');
REGEXP_CONTROL_CHARS.add(Character.valueOf(')')); REGEXP_CONTROL_CHARS.add(')');
REGEXP_CONTROL_CHARS.add(Character.valueOf(':')); REGEXP_CONTROL_CHARS.add(':');
REGEXP_CONTROL_CHARS.add(Character.valueOf('&')); REGEXP_CONTROL_CHARS.add('&');
REGEXP_CONTROL_CHARS.add(Character.valueOf('<')); REGEXP_CONTROL_CHARS.add('<');
REGEXP_CONTROL_CHARS.add(Character.valueOf('>')); REGEXP_CONTROL_CHARS.add('>');
REGEXP_CONTROL_CHARS.add(Character.valueOf('=')); REGEXP_CONTROL_CHARS.add('=');
REGEXP_CONTROL_CHARS.add(Character.valueOf('!')); REGEXP_CONTROL_CHARS.add('!');
} }
static class LikeExpression extends UnaryExpression implements BooleanExpression { static class LikeExpression extends UnaryExpression implements BooleanExpression {
@ -116,7 +116,7 @@ public abstract class ComparisonExpression extends BinaryExpression implements B
regexp.append(".*?"); // Do a non-greedy match regexp.append(".*?"); // Do a non-greedy match
} else if (c == '_') { } else if (c == '_') {
regexp.append("."); // match one regexp.append("."); // match one
} else if (REGEXP_CONTROL_CHARS.contains(Character.valueOf(c))) { } else if (REGEXP_CONTROL_CHARS.contains(c)) {
regexp.append("\\x"); regexp.append("\\x");
regexp.append(Integer.toHexString(0xFFFF & c)); regexp.append(Integer.toHexString(0xFFFF & c));
} else { } else {
@ -404,21 +404,21 @@ public abstract class ComparisonExpression extends BinaryExpression implements B
try { try {
if (lc == Boolean.class) { if (lc == Boolean.class) {
if (convertStringExpressions && rc == String.class) { if (convertStringExpressions && rc == String.class) {
lv = Boolean.valueOf((String)lv).booleanValue(); lv = Boolean.valueOf((String) lv);
} else { } else {
return Boolean.FALSE; return Boolean.FALSE;
} }
} else if (lc == Byte.class) { } else if (lc == Byte.class) {
if (rc == Short.class) { if (rc == Short.class) {
lv = Short.valueOf(((Number)lv).shortValue()); lv = ((Number) lv).shortValue();
} else if (rc == Integer.class) { } else if (rc == Integer.class) {
lv = Integer.valueOf(((Number)lv).intValue()); lv = ((Number) lv).intValue();
} else if (rc == Long.class) { } else if (rc == Long.class) {
lv = Long.valueOf(((Number)lv).longValue()); lv = ((Number) lv).longValue();
} else if (rc == Float.class) { } else if (rc == Float.class) {
lv = Float.valueOf(((Number)lv).floatValue()); lv = ((Number) lv).floatValue();
} else if (rc == Double.class) { } else if (rc == Double.class) {
lv = Double.valueOf(((Number)lv).doubleValue()); lv = ((Number) lv).doubleValue();
} else if (convertStringExpressions && rc == String.class) { } else if (convertStringExpressions && rc == String.class) {
rv = Byte.valueOf((String)rv); rv = Byte.valueOf((String)rv);
} else { } else {
@ -426,13 +426,13 @@ public abstract class ComparisonExpression extends BinaryExpression implements B
} }
} else if (lc == Short.class) { } else if (lc == Short.class) {
if (rc == Integer.class) { if (rc == Integer.class) {
lv = Integer.valueOf(((Number)lv).intValue()); lv = ((Number) lv).intValue();
} else if (rc == Long.class) { } else if (rc == Long.class) {
lv = Long.valueOf(((Number)lv).longValue()); lv = ((Number) lv).longValue();
} else if (rc == Float.class) { } else if (rc == Float.class) {
lv = Float.valueOf(((Number)lv).floatValue()); lv = ((Number) lv).floatValue();
} else if (rc == Double.class) { } else if (rc == Double.class) {
lv = Double.valueOf(((Number)lv).doubleValue()); lv = ((Number) lv).doubleValue();
} else if (convertStringExpressions && rc == String.class) { } else if (convertStringExpressions && rc == String.class) {
rv = Short.valueOf((String)rv); rv = Short.valueOf((String)rv);
} else { } else {
@ -440,11 +440,11 @@ public abstract class ComparisonExpression extends BinaryExpression implements B
} }
} else if (lc == Integer.class) { } else if (lc == Integer.class) {
if (rc == Long.class) { if (rc == Long.class) {
lv = Long.valueOf(((Number)lv).longValue()); lv = ((Number) lv).longValue();
} else if (rc == Float.class) { } else if (rc == Float.class) {
lv = Float.valueOf(((Number)lv).floatValue()); lv = ((Number) lv).floatValue();
} else if (rc == Double.class) { } else if (rc == Double.class) {
lv = Double.valueOf(((Number)lv).doubleValue()); lv = ((Number) lv).doubleValue();
} else if (convertStringExpressions && rc == String.class) { } else if (convertStringExpressions && rc == String.class) {
rv = Integer.valueOf((String)rv); rv = Integer.valueOf((String)rv);
} else { } else {
@ -452,11 +452,11 @@ public abstract class ComparisonExpression extends BinaryExpression implements B
} }
} else if (lc == Long.class) { } else if (lc == Long.class) {
if (rc == Integer.class) { if (rc == Integer.class) {
rv = Long.valueOf(((Number)rv).longValue()); rv = ((Number) rv).longValue();
} else if (rc == Float.class) { } else if (rc == Float.class) {
lv = Float.valueOf(((Number)lv).floatValue()); lv = ((Number) lv).floatValue();
} else if (rc == Double.class) { } else if (rc == Double.class) {
lv = Double.valueOf(((Number)lv).doubleValue()); lv = ((Number) lv).doubleValue();
} else if (convertStringExpressions && rc == String.class) { } else if (convertStringExpressions && rc == String.class) {
rv = Long.valueOf((String)rv); rv = Long.valueOf((String)rv);
} else { } else {
@ -464,11 +464,11 @@ public abstract class ComparisonExpression extends BinaryExpression implements B
} }
} else if (lc == Float.class) { } else if (lc == Float.class) {
if (rc == Integer.class) { if (rc == Integer.class) {
rv = Float.valueOf(((Number)rv).floatValue()); rv = ((Number) rv).floatValue();
} else if (rc == Long.class) { } else if (rc == Long.class) {
rv = Float.valueOf(((Number)rv).floatValue()); rv = ((Number) rv).floatValue();
} else if (rc == Double.class) { } else if (rc == Double.class) {
lv = Double.valueOf(((Number)lv).doubleValue()); lv = ((Number) lv).doubleValue();
} else if (convertStringExpressions && rc == String.class) { } else if (convertStringExpressions && rc == String.class) {
rv = Float.valueOf((String)rv); rv = Float.valueOf((String)rv);
} else { } else {
@ -476,11 +476,11 @@ public abstract class ComparisonExpression extends BinaryExpression implements B
} }
} else if (lc == Double.class) { } else if (lc == Double.class) {
if (rc == Integer.class) { if (rc == Integer.class) {
rv = Double.valueOf(((Number)rv).doubleValue()); rv = ((Number) rv).doubleValue();
} else if (rc == Long.class) { } else if (rc == Long.class) {
rv = Double.valueOf(((Number)rv).doubleValue()); rv = ((Number) rv).doubleValue();
} else if (rc == Float.class) { } else if (rc == Float.class) {
rv = new Float(((Number)rv).doubleValue()); rv = (float) ((Number) rv).doubleValue();
} else if (convertStringExpressions && rc == String.class) { } else if (convertStringExpressions && rc == String.class) {
rv = Double.valueOf((String)rv); rv = Double.valueOf((String)rv);
} else { } else {

View File

@ -65,25 +65,25 @@ public class ConstantExpression implements Expression {
long l = value.longValue(); long l = value.longValue();
if (Integer.MIN_VALUE <= l && l <= Integer.MAX_VALUE) { if (Integer.MIN_VALUE <= l && l <= Integer.MAX_VALUE) {
value = Integer.valueOf(value.intValue()); value = value.intValue();
} }
return new ConstantExpression(value); return new ConstantExpression(value);
} }
public static ConstantExpression createFromHex(String text) { public static ConstantExpression createFromHex(String text) {
Number value = Long.valueOf(Long.parseLong(text.substring(2), 16)); Number value = Long.parseLong(text.substring(2), 16);
long l = value.longValue(); long l = value.longValue();
if (Integer.MIN_VALUE <= l && l <= Integer.MAX_VALUE) { if (Integer.MIN_VALUE <= l && l <= Integer.MAX_VALUE) {
value = Integer.valueOf(value.intValue()); value = value.intValue();
} }
return new ConstantExpression(value); return new ConstantExpression(value);
} }
public static ConstantExpression createFromOctal(String text) { public static ConstantExpression createFromOctal(String text) {
Number value = Long.valueOf(Long.parseLong(text, 8)); Number value = Long.parseLong(text, 8);
long l = value.longValue(); long l = value.longValue();
if (Integer.MIN_VALUE <= l && l <= Integer.MAX_VALUE) { if (Integer.MIN_VALUE <= l && l <= Integer.MAX_VALUE) {
value = Integer.valueOf(value.intValue()); value = value.intValue();
} }
return new ConstantExpression(value); return new ConstantExpression(value);
} }
@ -109,7 +109,7 @@ public class ConstantExpression implements Expression {
return "NULL"; return "NULL";
} }
if (value instanceof Boolean) { if (value instanceof Boolean) {
return ((Boolean)value).booleanValue() ? "TRUE" : "FALSE"; return (Boolean) value ? "TRUE" : "FALSE";
} }
if (value instanceof String) { if (value instanceof String) {
return encodeString((String)value); return encodeString((String)value);

View File

@ -113,7 +113,7 @@ public abstract class LogicExpression implements BooleanExpression {
boolean someNulls = false; boolean someNulls = false;
for (BooleanExpression expression : expressions) { for (BooleanExpression expression : expressions) {
Boolean lv = (Boolean)expression.evaluate(message); Boolean lv = (Boolean)expression.evaluate(message);
if (lv != null && lv.booleanValue()) { if (lv != null && lv) {
return Boolean.TRUE; return Boolean.TRUE;
} }
if (lv == null) { if (lv == null) {
@ -154,7 +154,7 @@ public abstract class LogicExpression implements BooleanExpression {
boolean someNulls = false; boolean someNulls = false;
for (BooleanExpression expression : expressions) { for (BooleanExpression expression : expressions) {
Boolean lv = (Boolean)expression.evaluate(message); Boolean lv = (Boolean)expression.evaluate(message);
if (lv != null && !lv.booleanValue()) { if (lv != null && !lv) {
return Boolean.FALSE; return Boolean.FALSE;
} }
if (lv == null) { if (lv == null) {

View File

@ -83,7 +83,7 @@ public class PropertyExpression implements Expression {
@Override @Override
public Object evaluate(Message message) { public Object evaluate(Message message) {
return Integer.valueOf(message.getPriority()); return (int) message.getPriority();
} }
}); });
JMS_PROPERTY_EXPRESSIONS.put("JMSMessageID", new SubExpression() { JMS_PROPERTY_EXPRESSIONS.put("JMSMessageID", new SubExpression() {
@ -100,7 +100,7 @@ public class PropertyExpression implements Expression {
@Override @Override
public Object evaluate(Message message) { public Object evaluate(Message message) {
return Long.valueOf(message.getTimestamp()); return message.getTimestamp();
} }
}); });
JMS_PROPERTY_EXPRESSIONS.put("JMSCorrelationID", new SubExpression() { JMS_PROPERTY_EXPRESSIONS.put("JMSCorrelationID", new SubExpression() {
@ -114,21 +114,21 @@ public class PropertyExpression implements Expression {
@Override @Override
public Object evaluate(Message message) { public Object evaluate(Message message) {
return Long.valueOf(message.getExpiration()); return message.getExpiration();
} }
}); });
JMS_PROPERTY_EXPRESSIONS.put("JMSRedelivered", new SubExpression() { JMS_PROPERTY_EXPRESSIONS.put("JMSRedelivered", new SubExpression() {
@Override @Override
public Object evaluate(Message message) { public Object evaluate(Message message) {
return Boolean.valueOf(message.isRedelivered()); return message.isRedelivered();
} }
}); });
JMS_PROPERTY_EXPRESSIONS.put("JMSXDeliveryCount", new SubExpression() { JMS_PROPERTY_EXPRESSIONS.put("JMSXDeliveryCount", new SubExpression() {
@Override @Override
public Object evaluate(Message message) { public Object evaluate(Message message) {
return Integer.valueOf(message.getRedeliveryCounter() + 1); return message.getRedeliveryCounter() + 1;
} }
}); });
JMS_PROPERTY_EXPRESSIONS.put("JMSXGroupID", new SubExpression() { JMS_PROPERTY_EXPRESSIONS.put("JMSXGroupID", new SubExpression() {
@ -157,7 +157,7 @@ public class PropertyExpression implements Expression {
@Override @Override
public Object evaluate(Message message) { public Object evaluate(Message message) {
return Integer.valueOf(message.getGroupSequence()); return message.getGroupSequence();
} }
}); });
JMS_PROPERTY_EXPRESSIONS.put("JMSXProducerTXID", new SubExpression() { JMS_PROPERTY_EXPRESSIONS.put("JMSXProducerTXID", new SubExpression() {
@ -178,14 +178,14 @@ public class PropertyExpression implements Expression {
@Override @Override
public Object evaluate(Message message) { public Object evaluate(Message message) {
return Long.valueOf(message.getBrokerInTime()); return message.getBrokerInTime();
} }
}); });
JMS_PROPERTY_EXPRESSIONS.put("JMSActiveMQBrokerOutTime", new SubExpression() { JMS_PROPERTY_EXPRESSIONS.put("JMSActiveMQBrokerOutTime", new SubExpression() {
@Override @Override
public Object evaluate(Message message) { public Object evaluate(Message message) {
return Long.valueOf(message.getBrokerOutTime()); return message.getBrokerOutTime();
} }
}); });
JMS_PROPERTY_EXPRESSIONS.put("JMSActiveMQBrokerPath", new SubExpression() { JMS_PROPERTY_EXPRESSIONS.put("JMSActiveMQBrokerPath", new SubExpression() {
@ -199,7 +199,7 @@ public class PropertyExpression implements Expression {
@Override @Override
public Object evaluate(Message message) { public Object evaluate(Message message) {
return Boolean.valueOf(message.isJMSXGroupFirstForConsumer()); return message.isJMSXGroupFirstForConsumer();
} }
}); });
} }

View File

@ -152,7 +152,7 @@ public abstract class UnaryExpression implements Expression {
if (!rvalue.getClass().equals(Boolean.class)) { if (!rvalue.getClass().equals(Boolean.class)) {
return Boolean.FALSE; return Boolean.FALSE;
} }
return ((Boolean)rvalue).booleanValue() ? Boolean.TRUE : Boolean.FALSE; return (Boolean) rvalue ? Boolean.TRUE : Boolean.FALSE;
} }
public String toString() { public String toString() {
@ -168,13 +168,13 @@ public abstract class UnaryExpression implements Expression {
private static Number negate(Number left) { private static Number negate(Number left) {
Class clazz = left.getClass(); Class clazz = left.getClass();
if (clazz == Integer.class) { if (clazz == Integer.class) {
return Integer.valueOf(-left.intValue()); return -left.intValue();
} else if (clazz == Long.class) { } else if (clazz == Long.class) {
return Long.valueOf(-left.longValue()); return -left.longValue();
} else if (clazz == Float.class) { } else if (clazz == Float.class) {
return Float.valueOf(-left.floatValue()); return -left.floatValue();
} else if (clazz == Double.class) { } else if (clazz == Double.class) {
return Double.valueOf(-left.doubleValue()); return -left.doubleValue();
} else if (clazz == BigDecimal.class) { } else if (clazz == BigDecimal.class) {
// We ussually get a big deciamal when we have Long.MIN_VALUE // We ussually get a big deciamal when we have Long.MIN_VALUE
// constant in the // constant in the
@ -187,7 +187,7 @@ public abstract class UnaryExpression implements Expression {
bd = bd.negate(); bd = bd.negate();
if (BD_LONG_MIN_VALUE.compareTo(bd) == 0) { if (BD_LONG_MIN_VALUE.compareTo(bd) == 0) {
return Long.valueOf(Long.MIN_VALUE); return Long.MIN_VALUE;
} }
return bd; return bd;
} else { } else {

View File

@ -88,6 +88,6 @@ public class inListFunction implements FilterFunction {
cur++; cur++;
} }
return Boolean.valueOf(found_f); return found_f;
} }
} }

View File

@ -121,7 +121,7 @@ public class regexMatchFunction implements FilterFunction {
// point in the candidate (see Matcher#find()). // point in the candidate (see Matcher#find()).
// //
return Boolean.valueOf(match_eng.find()); return match_eng.find();
} }
} }

View File

@ -77,7 +77,7 @@ public class splitFunction implements FilterFunction {
limit = (Integer) expr.getArgument(2).evaluate(message_ctx); limit = (Integer) expr.getArgument(2).evaluate(message_ctx);
result = src.split(split_pat, limit.intValue()); result = src.split(split_pat, limit);
} else { } else {
result = src.split(split_pat); result = src.split(split_pat);
} }

View File

@ -532,13 +532,13 @@ public final class OpenWireFormat implements WireFormat {
// We can only cache that item if there is space left. // We can only cache that item if there is space left.
if (marshallCacheMap.size() < marshallCache.length) { if (marshallCacheMap.size() < marshallCache.length) {
marshallCache[i] = o; marshallCache[i] = o;
Short index = Short.valueOf(i); Short index = i;
marshallCacheMap.put(o, index); marshallCacheMap.put(o, index);
return index; return index;
} else { } else {
// Use -1 to indicate that the value was not cached due to cache // Use -1 to indicate that the value was not cached due to cache
// being full. // being full.
return Short.valueOf((short)-1); return (short) -1;
} }
} }

View File

@ -176,10 +176,10 @@ public abstract class BaseDataStreamMarshaller implements DataStreamMarshaller {
if (wireFormat.isCacheEnabled()) { if (wireFormat.isCacheEnabled()) {
Short index = wireFormat.getMarshallCacheIndex(o); Short index = wireFormat.getMarshallCacheIndex(o);
if (bs.readBoolean()) { if (bs.readBoolean()) {
dataOut.writeShort(index.shortValue()); dataOut.writeShort(index);
wireFormat.tightMarshalNestedObject2(o, dataOut, bs); wireFormat.tightMarshalNestedObject2(o, dataOut, bs);
} else { } else {
dataOut.writeShort(index.shortValue()); dataOut.writeShort(index);
} }
} else { } else {
wireFormat.tightMarshalNestedObject2(o, dataOut, bs); wireFormat.tightMarshalNestedObject2(o, dataOut, bs);
@ -201,7 +201,7 @@ public abstract class BaseDataStreamMarshaller implements DataStreamMarshaller {
.newInstance(new Object[] {tightUnmarshalString(dataIn, bs), .newInstance(new Object[] {tightUnmarshalString(dataIn, bs),
tightUnmarshalString(dataIn, bs), tightUnmarshalString(dataIn, bs),
tightUnmarshalString(dataIn, bs), tightUnmarshalString(dataIn, bs),
Integer.valueOf(dataIn.readInt())}); dataIn.readInt()});
} catch (IOException e) { } catch (IOException e) {
throw e; throw e;
} catch (Throwable e) { } catch (Throwable e) {
@ -497,10 +497,10 @@ public abstract class BaseDataStreamMarshaller implements DataStreamMarshaller {
dataOut.writeBoolean(index == null); dataOut.writeBoolean(index == null);
if (index == null) { if (index == null) {
index = wireFormat.addToMarshallCache(o); index = wireFormat.addToMarshallCache(o);
dataOut.writeShort(index.shortValue()); dataOut.writeShort(index);
wireFormat.looseMarshalNestedObject(o, dataOut); wireFormat.looseMarshalNestedObject(o, dataOut);
} else { } else {
dataOut.writeShort(index.shortValue()); dataOut.writeShort(index);
} }
} else { } else {
wireFormat.looseMarshalNestedObject(o, dataOut); wireFormat.looseMarshalNestedObject(o, dataOut);
@ -522,7 +522,7 @@ public abstract class BaseDataStreamMarshaller implements DataStreamMarshaller {
.newInstance(new Object[] {looseUnmarshalString(dataIn), .newInstance(new Object[] {looseUnmarshalString(dataIn),
looseUnmarshalString(dataIn), looseUnmarshalString(dataIn),
looseUnmarshalString(dataIn), looseUnmarshalString(dataIn),
Integer.valueOf(dataIn.readInt())}); dataIn.readInt()});
} catch (IOException e) { } catch (IOException e) {
throw e; throw e;
} catch (Throwable e) { } catch (Throwable e) {

View File

@ -175,10 +175,10 @@ public abstract class BaseDataStreamMarshaller implements DataStreamMarshaller {
if (wireFormat.isCacheEnabled()) { if (wireFormat.isCacheEnabled()) {
Short index = wireFormat.getMarshallCacheIndex(o); Short index = wireFormat.getMarshallCacheIndex(o);
if (bs.readBoolean()) { if (bs.readBoolean()) {
dataOut.writeShort(index.shortValue()); dataOut.writeShort(index);
wireFormat.tightMarshalNestedObject2(o, dataOut, bs); wireFormat.tightMarshalNestedObject2(o, dataOut, bs);
} else { } else {
dataOut.writeShort(index.shortValue()); dataOut.writeShort(index);
} }
} else { } else {
wireFormat.tightMarshalNestedObject2(o, dataOut, bs); wireFormat.tightMarshalNestedObject2(o, dataOut, bs);
@ -200,7 +200,7 @@ public abstract class BaseDataStreamMarshaller implements DataStreamMarshaller {
.newInstance(new Object[] {tightUnmarshalString(dataIn, bs), .newInstance(new Object[] {tightUnmarshalString(dataIn, bs),
tightUnmarshalString(dataIn, bs), tightUnmarshalString(dataIn, bs),
tightUnmarshalString(dataIn, bs), tightUnmarshalString(dataIn, bs),
Integer.valueOf(dataIn.readInt())}); dataIn.readInt()});
} catch (IOException e) { } catch (IOException e) {
throw e; throw e;
} catch (Throwable e) { } catch (Throwable e) {
@ -496,10 +496,10 @@ public abstract class BaseDataStreamMarshaller implements DataStreamMarshaller {
dataOut.writeBoolean(index == null); dataOut.writeBoolean(index == null);
if (index == null) { if (index == null) {
index = wireFormat.addToMarshallCache(o); index = wireFormat.addToMarshallCache(o);
dataOut.writeShort(index.shortValue()); dataOut.writeShort(index);
wireFormat.looseMarshalNestedObject(o, dataOut); wireFormat.looseMarshalNestedObject(o, dataOut);
} else { } else {
dataOut.writeShort(index.shortValue()); dataOut.writeShort(index);
} }
} else { } else {
wireFormat.looseMarshalNestedObject(o, dataOut); wireFormat.looseMarshalNestedObject(o, dataOut);
@ -521,7 +521,7 @@ public abstract class BaseDataStreamMarshaller implements DataStreamMarshaller {
.newInstance(new Object[] {looseUnmarshalString(dataIn), .newInstance(new Object[] {looseUnmarshalString(dataIn),
looseUnmarshalString(dataIn), looseUnmarshalString(dataIn),
looseUnmarshalString(dataIn), looseUnmarshalString(dataIn),
Integer.valueOf(dataIn.readInt())}); dataIn.readInt()});
} catch (IOException e) { } catch (IOException e) {
throw e; throw e;
} catch (Throwable e) { } catch (Throwable e) {

View File

@ -174,10 +174,10 @@ public abstract class BaseDataStreamMarshaller implements DataStreamMarshaller {
if (wireFormat.isCacheEnabled()) { if (wireFormat.isCacheEnabled()) {
Short index = wireFormat.getMarshallCacheIndex(o); Short index = wireFormat.getMarshallCacheIndex(o);
if (bs.readBoolean()) { if (bs.readBoolean()) {
dataOut.writeShort(index.shortValue()); dataOut.writeShort(index);
wireFormat.tightMarshalNestedObject2(o, dataOut, bs); wireFormat.tightMarshalNestedObject2(o, dataOut, bs);
} else { } else {
dataOut.writeShort(index.shortValue()); dataOut.writeShort(index);
} }
} else { } else {
wireFormat.tightMarshalNestedObject2(o, dataOut, bs); wireFormat.tightMarshalNestedObject2(o, dataOut, bs);
@ -199,7 +199,7 @@ public abstract class BaseDataStreamMarshaller implements DataStreamMarshaller {
.newInstance(new Object[] {tightUnmarshalString(dataIn, bs), .newInstance(new Object[] {tightUnmarshalString(dataIn, bs),
tightUnmarshalString(dataIn, bs), tightUnmarshalString(dataIn, bs),
tightUnmarshalString(dataIn, bs), tightUnmarshalString(dataIn, bs),
Integer.valueOf(dataIn.readInt())}); dataIn.readInt()});
} catch (IOException e) { } catch (IOException e) {
throw e; throw e;
} catch (Throwable e) { } catch (Throwable e) {
@ -495,10 +495,10 @@ public abstract class BaseDataStreamMarshaller implements DataStreamMarshaller {
dataOut.writeBoolean(index == null); dataOut.writeBoolean(index == null);
if (index == null) { if (index == null) {
index = wireFormat.addToMarshallCache(o); index = wireFormat.addToMarshallCache(o);
dataOut.writeShort(index.shortValue()); dataOut.writeShort(index);
wireFormat.looseMarshalNestedObject(o, dataOut); wireFormat.looseMarshalNestedObject(o, dataOut);
} else { } else {
dataOut.writeShort(index.shortValue()); dataOut.writeShort(index);
} }
} else { } else {
wireFormat.looseMarshalNestedObject(o, dataOut); wireFormat.looseMarshalNestedObject(o, dataOut);
@ -520,7 +520,7 @@ public abstract class BaseDataStreamMarshaller implements DataStreamMarshaller {
.newInstance(new Object[] {looseUnmarshalString(dataIn), .newInstance(new Object[] {looseUnmarshalString(dataIn),
looseUnmarshalString(dataIn), looseUnmarshalString(dataIn),
looseUnmarshalString(dataIn), looseUnmarshalString(dataIn),
Integer.valueOf(dataIn.readInt())}); dataIn.readInt()});
} catch (IOException e) { } catch (IOException e) {
throw e; throw e;
} catch (Throwable e) { } catch (Throwable e) {

View File

@ -174,10 +174,10 @@ public abstract class BaseDataStreamMarshaller implements DataStreamMarshaller {
if (wireFormat.isCacheEnabled()) { if (wireFormat.isCacheEnabled()) {
Short index = wireFormat.getMarshallCacheIndex(o); Short index = wireFormat.getMarshallCacheIndex(o);
if (bs.readBoolean()) { if (bs.readBoolean()) {
dataOut.writeShort(index.shortValue()); dataOut.writeShort(index);
wireFormat.tightMarshalNestedObject2(o, dataOut, bs); wireFormat.tightMarshalNestedObject2(o, dataOut, bs);
} else { } else {
dataOut.writeShort(index.shortValue()); dataOut.writeShort(index);
} }
} else { } else {
wireFormat.tightMarshalNestedObject2(o, dataOut, bs); wireFormat.tightMarshalNestedObject2(o, dataOut, bs);
@ -199,7 +199,7 @@ public abstract class BaseDataStreamMarshaller implements DataStreamMarshaller {
.newInstance(new Object[] {tightUnmarshalString(dataIn, bs), .newInstance(new Object[] {tightUnmarshalString(dataIn, bs),
tightUnmarshalString(dataIn, bs), tightUnmarshalString(dataIn, bs),
tightUnmarshalString(dataIn, bs), tightUnmarshalString(dataIn, bs),
Integer.valueOf(dataIn.readInt())}); dataIn.readInt()});
} catch (IOException e) { } catch (IOException e) {
throw e; throw e;
} catch (Throwable e) { } catch (Throwable e) {
@ -495,10 +495,10 @@ public abstract class BaseDataStreamMarshaller implements DataStreamMarshaller {
dataOut.writeBoolean(index == null); dataOut.writeBoolean(index == null);
if (index == null) { if (index == null) {
index = wireFormat.addToMarshallCache(o); index = wireFormat.addToMarshallCache(o);
dataOut.writeShort(index.shortValue()); dataOut.writeShort(index);
wireFormat.looseMarshalNestedObject(o, dataOut); wireFormat.looseMarshalNestedObject(o, dataOut);
} else { } else {
dataOut.writeShort(index.shortValue()); dataOut.writeShort(index);
} }
} else { } else {
wireFormat.looseMarshalNestedObject(o, dataOut); wireFormat.looseMarshalNestedObject(o, dataOut);
@ -520,7 +520,7 @@ public abstract class BaseDataStreamMarshaller implements DataStreamMarshaller {
.newInstance(new Object[] {looseUnmarshalString(dataIn), .newInstance(new Object[] {looseUnmarshalString(dataIn),
looseUnmarshalString(dataIn), looseUnmarshalString(dataIn),
looseUnmarshalString(dataIn), looseUnmarshalString(dataIn),
Integer.valueOf(dataIn.readInt())}); dataIn.readInt()});
} catch (IOException e) { } catch (IOException e) {
throw e; throw e;
} catch (Throwable e) { } catch (Throwable e) {

View File

@ -174,10 +174,10 @@ public abstract class BaseDataStreamMarshaller implements DataStreamMarshaller {
if (wireFormat.isCacheEnabled()) { if (wireFormat.isCacheEnabled()) {
Short index = wireFormat.getMarshallCacheIndex(o); Short index = wireFormat.getMarshallCacheIndex(o);
if (bs.readBoolean()) { if (bs.readBoolean()) {
dataOut.writeShort(index.shortValue()); dataOut.writeShort(index);
wireFormat.tightMarshalNestedObject2(o, dataOut, bs); wireFormat.tightMarshalNestedObject2(o, dataOut, bs);
} else { } else {
dataOut.writeShort(index.shortValue()); dataOut.writeShort(index);
} }
} else { } else {
wireFormat.tightMarshalNestedObject2(o, dataOut, bs); wireFormat.tightMarshalNestedObject2(o, dataOut, bs);
@ -199,7 +199,7 @@ public abstract class BaseDataStreamMarshaller implements DataStreamMarshaller {
.newInstance(new Object[] {tightUnmarshalString(dataIn, bs), .newInstance(new Object[] {tightUnmarshalString(dataIn, bs),
tightUnmarshalString(dataIn, bs), tightUnmarshalString(dataIn, bs),
tightUnmarshalString(dataIn, bs), tightUnmarshalString(dataIn, bs),
Integer.valueOf(dataIn.readInt())}); dataIn.readInt()});
} catch (IOException e) { } catch (IOException e) {
throw e; throw e;
} catch (Throwable e) { } catch (Throwable e) {
@ -495,10 +495,10 @@ public abstract class BaseDataStreamMarshaller implements DataStreamMarshaller {
dataOut.writeBoolean(index == null); dataOut.writeBoolean(index == null);
if (index == null) { if (index == null) {
index = wireFormat.addToMarshallCache(o); index = wireFormat.addToMarshallCache(o);
dataOut.writeShort(index.shortValue()); dataOut.writeShort(index);
wireFormat.looseMarshalNestedObject(o, dataOut); wireFormat.looseMarshalNestedObject(o, dataOut);
} else { } else {
dataOut.writeShort(index.shortValue()); dataOut.writeShort(index);
} }
} else { } else {
wireFormat.looseMarshalNestedObject(o, dataOut); wireFormat.looseMarshalNestedObject(o, dataOut);
@ -520,7 +520,7 @@ public abstract class BaseDataStreamMarshaller implements DataStreamMarshaller {
.newInstance(new Object[] {looseUnmarshalString(dataIn), .newInstance(new Object[] {looseUnmarshalString(dataIn),
looseUnmarshalString(dataIn), looseUnmarshalString(dataIn),
looseUnmarshalString(dataIn), looseUnmarshalString(dataIn),
Integer.valueOf(dataIn.readInt())}); dataIn.readInt()});
} catch (IOException e) { } catch (IOException e) {
throw e; throw e;
} catch (Throwable e) { } catch (Throwable e) {

View File

@ -69,7 +69,7 @@ public class ResponseCorrelator extends TransportFilter {
synchronized (requestMap) { synchronized (requestMap) {
priorError = this.error; priorError = this.error;
if (priorError == null) { if (priorError == null) {
requestMap.put(Integer.valueOf(command.getCommandId()), future); requestMap.put(command.getCommandId(), future);
} }
} }
@ -103,7 +103,7 @@ public class ResponseCorrelator extends TransportFilter {
Response response = (Response)command; Response response = (Response)command;
FutureResponse future = null; FutureResponse future = null;
synchronized (requestMap) { synchronized (requestMap) {
future = requestMap.remove(Integer.valueOf(response.getCorrelationId())); future = requestMap.remove(response.getCorrelationId());
} }
if (future != null) { if (future != null) {
future.set(response); future.set(response);

View File

@ -191,7 +191,7 @@ public class FailoverTransport implements CompositeTransport {
if (command.isResponse()) { if (command.isResponse()) {
Object object = null; Object object = null;
synchronized (requestMap) { synchronized (requestMap) {
object = requestMap.remove(Integer.valueOf(((Response) command).getCorrelationId())); object = requestMap.remove(((Response) command).getCorrelationId());
} }
if (object != null && object.getClass() == Tracked.class) { if (object != null && object.getClass() == Tracked.class) {
((Tracked) object).onResponses(command); ((Tracked) object).onResponses(command);
@ -659,9 +659,9 @@ public class FailoverTransport implements CompositeTransport {
// it later. // it later.
synchronized (requestMap) { synchronized (requestMap) {
if (tracked != null && tracked.isWaitingForResponse()) { if (tracked != null && tracked.isWaitingForResponse()) {
requestMap.put(Integer.valueOf(command.getCommandId()), tracked); requestMap.put(command.getCommandId(), tracked);
} else if (tracked == null && command.isResponseRequired()) { } else if (tracked == null && command.isResponseRequired()) {
requestMap.put(Integer.valueOf(command.getCommandId()), command); requestMap.put(command.getCommandId(), command);
} }
} }
@ -683,7 +683,7 @@ public class FailoverTransport implements CompositeTransport {
// map so that it is not sent 2 times on // map so that it is not sent 2 times on
// recovery // recovery
if (command.isResponseRequired()) { if (command.isResponseRequired()) {
requestMap.remove(Integer.valueOf(command.getCommandId())); requestMap.remove(command.getCommandId());
} }
// Rethrow the exception so it will handled by // Rethrow the exception so it will handled by

View File

@ -115,7 +115,7 @@ public class FanoutTransport implements CompositeTransport {
public void onCommand(Object o) { public void onCommand(Object o) {
Command command = (Command) o; Command command = (Command) o;
if (command.isResponse()) { if (command.isResponse()) {
Integer id = Integer.valueOf(((Response) command).getCorrelationId()); Integer id = ((Response) command).getCorrelationId();
RequestCounter rc = requestMap.get(id); RequestCounter rc = requestMap.get(id);
if (rc != null) { if (rc != null) {
if (rc.ackCount.decrementAndGet() <= 0) { if (rc.ackCount.decrementAndGet() <= 0) {
@ -403,7 +403,7 @@ public class FanoutTransport implements CompositeTransport {
boolean fanout = isFanoutCommand(command); boolean fanout = isFanoutCommand(command);
if (stateTracker.track(command) == null && command.isResponseRequired()) { if (stateTracker.track(command) == null && command.isResponseRequired()) {
int size = fanout ? minAckCount : 1; int size = fanout ? minAckCount : 1;
requestMap.put(Integer.valueOf(command.getCommandId()), new RequestCounter(command, size)); requestMap.put(command.getCommandId(), new RequestCounter(command, size));
} }
// Send the message. // Send the message.

View File

@ -50,10 +50,10 @@ public class DefaultReplayBuffer implements ReplayBuffer {
int max = size - 1; int max = size - 1;
while (map.size() >= max) { while (map.size() >= max) {
// lets find things to evict // lets find things to evict
Object evictedBuffer = map.remove(Integer.valueOf(++lowestCommandId)); Object evictedBuffer = map.remove(++lowestCommandId);
onEvictedBuffer(lowestCommandId, evictedBuffer); onEvictedBuffer(lowestCommandId, evictedBuffer);
} }
map.put(Integer.valueOf(commandId), buffer); map.put(commandId, buffer);
} }
} }
@ -71,7 +71,7 @@ public class DefaultReplayBuffer implements ReplayBuffer {
for (int i = fromCommandId; i <= toCommandId; i++) { for (int i = fromCommandId; i <= toCommandId; i++) {
Object buffer = null; Object buffer = null;
synchronized (lock) { synchronized (lock) {
buffer = map.get(Integer.valueOf(i)); buffer = map.get(i);
} }
replayer.sendBuffer(i, buffer); replayer.sendBuffer(i, buffer);
} }

View File

@ -467,7 +467,7 @@ public class TcpTransport extends TransportThreadSupport implements Transport, S
sock.setSoTimeout(soTimeout); sock.setSoTimeout(soTimeout);
if (keepAlive != null) { if (keepAlive != null) {
sock.setKeepAlive(keepAlive.booleanValue()); sock.setKeepAlive(keepAlive);
} }
if (soLinger > -1) { if (soLinger > -1) {
@ -476,7 +476,7 @@ public class TcpTransport extends TransportThreadSupport implements Transport, S
sock.setSoLinger(false, 0); sock.setSoLinger(false, 0);
} }
if (tcpNoDelay != null) { if (tcpNoDelay != null) {
sock.setTcpNoDelay(tcpNoDelay.booleanValue()); sock.setTcpNoDelay(tcpNoDelay);
} }
if (!this.trafficClassSet) { if (!this.trafficClassSet) {
this.trafficClassSet = setTrafficClass(sock); this.trafficClassSet = setTrafficClass(sock);

View File

@ -596,17 +596,17 @@ public class TcpTransportServer extends TransportServerThreadSupport implements
countIncremented = true; countIncremented = true;
HashMap<String, Object> options = new HashMap<String, Object>(); HashMap<String, Object> options = new HashMap<String, Object>();
options.put("maxInactivityDuration", Long.valueOf(maxInactivityDuration)); options.put("maxInactivityDuration", maxInactivityDuration);
options.put("maxInactivityDurationInitalDelay", Long.valueOf(maxInactivityDurationInitalDelay)); options.put("maxInactivityDurationInitalDelay", maxInactivityDurationInitalDelay);
options.put("minmumWireFormatVersion", Integer.valueOf(minmumWireFormatVersion)); options.put("minmumWireFormatVersion", minmumWireFormatVersion);
options.put("trace", Boolean.valueOf(trace)); options.put("trace", trace);
options.put("soTimeout", Integer.valueOf(soTimeout)); options.put("soTimeout", soTimeout);
options.put("socketBufferSize", Integer.valueOf(socketBufferSize)); options.put("socketBufferSize", socketBufferSize);
options.put("connectionTimeout", Integer.valueOf(connectionTimeout)); options.put("connectionTimeout", connectionTimeout);
options.put("logWriterName", logWriterName); options.put("logWriterName", logWriterName);
options.put("dynamicManagement", Boolean.valueOf(dynamicManagement)); options.put("dynamicManagement", dynamicManagement);
options.put("startLogging", Boolean.valueOf(startLogging)); options.put("startLogging", startLogging);
options.put("jmxPort", Integer.valueOf(jmxPort)); options.put("jmxPort", jmxPort);
options.putAll(transportOptions); options.putAll(transportOptions);
TransportInfo transportInfo = configureTransport(this, socket); TransportInfo transportInfo = configureTransport(this, socket);

View File

@ -125,21 +125,21 @@ public final class MarshallingSupport {
if (value == null) { if (value == null) {
marshalNull(out); marshalNull(out);
} else if (value.getClass() == Boolean.class) { } else if (value.getClass() == Boolean.class) {
marshalBoolean(out, ((Boolean)value).booleanValue()); marshalBoolean(out, (Boolean) value);
} else if (value.getClass() == Byte.class) { } else if (value.getClass() == Byte.class) {
marshalByte(out, ((Byte)value).byteValue()); marshalByte(out, (Byte) value);
} else if (value.getClass() == Character.class) { } else if (value.getClass() == Character.class) {
marshalChar(out, ((Character)value).charValue()); marshalChar(out, (Character) value);
} else if (value.getClass() == Short.class) { } else if (value.getClass() == Short.class) {
marshalShort(out, ((Short)value).shortValue()); marshalShort(out, (Short) value);
} else if (value.getClass() == Integer.class) { } else if (value.getClass() == Integer.class) {
marshalInt(out, ((Integer)value).intValue()); marshalInt(out, (Integer) value);
} else if (value.getClass() == Long.class) { } else if (value.getClass() == Long.class) {
marshalLong(out, ((Long)value).longValue()); marshalLong(out, (Long) value);
} else if (value.getClass() == Float.class) { } else if (value.getClass() == Float.class) {
marshalFloat(out, ((Float)value).floatValue()); marshalFloat(out, (Float) value);
} else if (value.getClass() == Double.class) { } else if (value.getClass() == Double.class) {
marshalDouble(out, ((Double)value).doubleValue()); marshalDouble(out, (Double) value);
} else if (value.getClass() == byte[].class) { } else if (value.getClass() == byte[].class) {
marshalByteArray(out, (byte[])value); marshalByteArray(out, (byte[])value);
} else if (value.getClass() == String.class) { } else if (value.getClass() == String.class) {
@ -166,28 +166,28 @@ public final class MarshallingSupport {
byte type = in.readByte(); byte type = in.readByte();
switch (type) { switch (type) {
case BYTE_TYPE: case BYTE_TYPE:
value = Byte.valueOf(in.readByte()); value = in.readByte();
break; break;
case BOOLEAN_TYPE: case BOOLEAN_TYPE:
value = in.readBoolean() ? Boolean.TRUE : Boolean.FALSE; value = in.readBoolean() ? Boolean.TRUE : Boolean.FALSE;
break; break;
case CHAR_TYPE: case CHAR_TYPE:
value = Character.valueOf(in.readChar()); value = in.readChar();
break; break;
case SHORT_TYPE: case SHORT_TYPE:
value = Short.valueOf(in.readShort()); value = in.readShort();
break; break;
case INTEGER_TYPE: case INTEGER_TYPE:
value = Integer.valueOf(in.readInt()); value = in.readInt();
break; break;
case LONG_TYPE: case LONG_TYPE:
value = Long.valueOf(in.readLong()); value = in.readLong();
break; break;
case FLOAT_TYPE: case FLOAT_TYPE:
value = Float.valueOf(in.readFloat()); value = in.readFloat();
break; break;
case DOUBLE_TYPE: case DOUBLE_TYPE:
value = Double.valueOf(in.readDouble()); value = in.readDouble();
break; break;
case BYTE_ARRAY_TYPE: case BYTE_ARRAY_TYPE:
value = new byte[in.readInt()]; value = new byte[in.readInt()];

View File

@ -146,7 +146,7 @@ public final class TypeConversionSupport {
Converter longConverter = new Converter() { Converter longConverter = new Converter() {
@Override @Override
public Object convert(Object value) { public Object convert(Object value) {
return Long.valueOf(((Number)value).longValue()); return ((Number) value).longValue();
} }
}; };
CONVERSION_MAP.put(new ConversionKey(Byte.class, Long.class), longConverter); CONVERSION_MAP.put(new ConversionKey(Byte.class, Long.class), longConverter);
@ -155,14 +155,14 @@ public final class TypeConversionSupport {
CONVERSION_MAP.put(new ConversionKey(Date.class, Long.class), new Converter() { CONVERSION_MAP.put(new ConversionKey(Date.class, Long.class), new Converter() {
@Override @Override
public Object convert(Object value) { public Object convert(Object value) {
return Long.valueOf(((Date)value).getTime()); return ((Date) value).getTime();
} }
}); });
Converter intConverter = new Converter() { Converter intConverter = new Converter() {
@Override @Override
public Object convert(Object value) { public Object convert(Object value) {
return Integer.valueOf(((Number)value).intValue()); return ((Number) value).intValue();
} }
}; };
CONVERSION_MAP.put(new ConversionKey(Byte.class, Integer.class), intConverter); CONVERSION_MAP.put(new ConversionKey(Byte.class, Integer.class), intConverter);
@ -171,14 +171,14 @@ public final class TypeConversionSupport {
CONVERSION_MAP.put(new ConversionKey(Byte.class, Short.class), new Converter() { CONVERSION_MAP.put(new ConversionKey(Byte.class, Short.class), new Converter() {
@Override @Override
public Object convert(Object value) { public Object convert(Object value) {
return Short.valueOf(((Number)value).shortValue()); return ((Number) value).shortValue();
} }
}); });
CONVERSION_MAP.put(new ConversionKey(Float.class, Double.class), new Converter() { CONVERSION_MAP.put(new ConversionKey(Float.class, Double.class), new Converter() {
@Override @Override
public Object convert(Object value) { public Object convert(Object value) {
return Double.valueOf(((Number)value).doubleValue()); return ((Number) value).doubleValue();
} }
}); });
CONVERSION_MAP.put(new ConversionKey(String.class, ActiveMQDestination.class), new Converter() { CONVERSION_MAP.put(new ConversionKey(String.class, ActiveMQDestination.class), new Converter() {

View File

@ -101,32 +101,32 @@ public class ClassLoadingAwareObjectInputStreamTest {
@Test @Test
public void testReadObjectByte() throws Exception { public void testReadObjectByte() throws Exception {
doTestReadObject(Byte.valueOf((byte) 255), ACCEPTS_ALL_FILTER); doTestReadObject((byte) 255, ACCEPTS_ALL_FILTER);
} }
@Test @Test
public void testReadObjectShort() throws Exception { public void testReadObjectShort() throws Exception {
doTestReadObject(Short.valueOf((short) 255), ACCEPTS_ALL_FILTER); doTestReadObject((short) 255, ACCEPTS_ALL_FILTER);
} }
@Test @Test
public void testReadObjectInteger() throws Exception { public void testReadObjectInteger() throws Exception {
doTestReadObject(Integer.valueOf(255), ACCEPTS_ALL_FILTER); doTestReadObject(255, ACCEPTS_ALL_FILTER);
} }
@Test @Test
public void testReadObjectLong() throws Exception { public void testReadObjectLong() throws Exception {
doTestReadObject(Long.valueOf(255l), ACCEPTS_ALL_FILTER); doTestReadObject(255L, ACCEPTS_ALL_FILTER);
} }
@Test @Test
public void testReadObjectFloat() throws Exception { public void testReadObjectFloat() throws Exception {
doTestReadObject(Float.valueOf(255.0f), ACCEPTS_ALL_FILTER); doTestReadObject(255.0f, ACCEPTS_ALL_FILTER);
} }
@Test @Test
public void testReadObjectDouble() throws Exception { public void testReadObjectDouble() throws Exception {
doTestReadObject(Double.valueOf(255.0), ACCEPTS_ALL_FILTER); doTestReadObject(255.0, ACCEPTS_ALL_FILTER);
} }
@Test @Test
@ -321,7 +321,7 @@ public class ClassLoadingAwareObjectInputStreamTest {
} }
// Replace the filtered type and try again // Replace the filtered type and try again
value[3] = Integer.valueOf(20); value[3] = 20;
serialized = serializeObject(value); serialized = serializeObject(value);

View File

@ -42,7 +42,7 @@ public class IntrospectionSupportTest {
@Test @Test
public void testSetPropertyPrimitiveWithWrapperValue() { public void testSetPropertyPrimitiveWithWrapperValue() {
// Wrapper value // Wrapper value
Boolean value = Boolean.valueOf(true); Boolean value = Boolean.TRUE;
DummyClass dummyClass = new DummyClass(false); DummyClass dummyClass = new DummyClass(false);
dummyClass.setTrace(false); dummyClass.setTrace(false);

View File

@ -29,7 +29,7 @@ public class LRUCacheTest {
public void testResize() throws Exception { public void testResize() throws Exception {
LRUCache<Long, Long> underTest = new LRUCache<Long, Long>(1000); LRUCache<Long, Long> underTest = new LRUCache<Long, Long>(1000);
Long count = Long.valueOf(0); Long count = 0L;
long max = 0; long max = 0;
for (; count < 27276827; count++) { for (; count < 27276827; count++) {
long start = System.currentTimeMillis(); long start = System.currentTimeMillis();

View File

@ -129,7 +129,7 @@ public class ShutdownCommand extends AbstractJmxCommand {
try { try {
jmxConnection.invoke(brokerObjName, "terminateJVM", new Object[] { jmxConnection.invoke(brokerObjName, "terminateJVM", new Object[] {
Integer.valueOf(0) 0
}, new String[] { }, new String[] {
"int" "int"
}); });

View File

@ -58,9 +58,9 @@ public class MBeansRegExQueryFilter extends RegExQueryFilter {
Method method = this.getClass().getDeclaredMethod("matches", new Class[] { Method method = this.getClass().getDeclaredMethod("matches", new Class[] {
data.getClass(), Map.class data.getClass(), Map.class
}); });
return ((Boolean)method.invoke(this, new Object[] { return (Boolean) method.invoke(this, new Object[]{
data, regex data, regex
})).booleanValue(); });
} catch (NoSuchMethodException e) { } catch (NoSuchMethodException e) {
return false; return false;
} }

View File

@ -187,7 +187,7 @@ public class HttpJMSMessagesWithCompressionTest {
@Test @Test
public void testObjectMessage() throws Exception { public void testObjectMessage() throws Exception {
executeTest(new MessageCommand<ObjectMessage>() { executeTest(new MessageCommand<ObjectMessage>() {
private Long value = Long.valueOf(101); private Long value = 101L;
public ObjectMessage createMessage(Session session) throws JMSException { public ObjectMessage createMessage(Session session) throws JMSException {
return session.createObjectMessage(value); return session.createObjectMessage(value);
@ -202,7 +202,7 @@ public class HttpJMSMessagesWithCompressionTest {
@Test @Test
public void testStreamMessage() throws Exception { public void testStreamMessage() throws Exception {
executeTest(new MessageCommand<StreamMessage>() { executeTest(new MessageCommand<StreamMessage>() {
private Long value = Long.valueOf(1013); private Long value = 1013L;
public StreamMessage createMessage(Session session) throws JMSException { public StreamMessage createMessage(Session session) throws JMSException {
StreamMessage message = session.createStreamMessage(); StreamMessage message = session.createStreamMessage();

View File

@ -331,7 +331,7 @@ public class PooledConnectionFactoryTest extends JmsPoolTestSupport {
@Override @Override
public boolean isSatisified() throws Exception { public boolean isSatisified() throws Exception {
return result.isDone() && result.get().booleanValue(); return result.isDone() && result.get();
} }
}, TimeUnit.SECONDS.toMillis(10), TimeUnit.MILLISECONDS.toMillis(50)); }, TimeUnit.SECONDS.toMillis(10), TimeUnit.MILLISECONDS.toMillis(50));

View File

@ -1682,7 +1682,7 @@ public abstract class MessageDatabase extends ServiceSupport implements BrokerSe
} }
private void recordAckMessageReferenceLocation(Location ackLocation, Location messageLocation) { private void recordAckMessageReferenceLocation(Location ackLocation, Location messageLocation) {
Set<Integer> referenceFileIds = metadata.ackMessageFileMap.get(Integer.valueOf(ackLocation.getDataFileId())); Set<Integer> referenceFileIds = metadata.ackMessageFileMap.get(ackLocation.getDataFileId());
if (referenceFileIds == null) { if (referenceFileIds == null) {
referenceFileIds = new HashSet<>(); referenceFileIds = new HashSet<>();
referenceFileIds.add(messageLocation.getDataFileId()); referenceFileIds.add(messageLocation.getDataFileId());
@ -1690,7 +1690,7 @@ public abstract class MessageDatabase extends ServiceSupport implements BrokerSe
metadata.ackMessageFileMapDirtyFlag.lazySet(true); metadata.ackMessageFileMapDirtyFlag.lazySet(true);
} else { } else {
Integer id = Integer.valueOf(messageLocation.getDataFileId()); Integer id = messageLocation.getDataFileId();
if (!referenceFileIds.contains(id)) { if (!referenceFileIds.contains(id)) {
referenceFileIds.add(id); referenceFileIds.add(id);
} }
@ -3869,13 +3869,13 @@ public abstract class MessageDatabase extends ServiceSupport implements BrokerSe
void setBatch(Transaction tx, Long sequence) throws IOException { void setBatch(Transaction tx, Long sequence) throws IOException {
if (sequence != null) { if (sequence != null) {
Long nextPosition = Long.valueOf(sequence.longValue() + 1); Long nextPosition = sequence + 1;
lastDefaultKey = sequence; lastDefaultKey = sequence;
cursor.defaultCursorPosition = nextPosition.longValue(); cursor.defaultCursorPosition = nextPosition;
lastHighKey = sequence; lastHighKey = sequence;
cursor.highPriorityCursorPosition = nextPosition.longValue(); cursor.highPriorityCursorPosition = nextPosition;
lastLowKey = sequence; lastLowKey = sequence;
cursor.lowPriorityCursorPosition = nextPosition.longValue(); cursor.lowPriorityCursorPosition = nextPosition;
} }
} }
@ -3904,13 +3904,13 @@ public abstract class MessageDatabase extends ServiceSupport implements BrokerSe
void stoppedIterating() { void stoppedIterating() {
if (lastDefaultKey!=null) { if (lastDefaultKey!=null) {
cursor.defaultCursorPosition=lastDefaultKey.longValue()+1; cursor.defaultCursorPosition= lastDefaultKey +1;
} }
if (lastHighKey!=null) { if (lastHighKey!=null) {
cursor.highPriorityCursorPosition=lastHighKey.longValue()+1; cursor.highPriorityCursorPosition= lastHighKey +1;
} }
if (lastLowKey!=null) { if (lastLowKey!=null) {
cursor.lowPriorityCursorPosition=lastLowKey.longValue()+1; cursor.lowPriorityCursorPosition= lastLowKey +1;
} }
lastDefaultKey = null; lastDefaultKey = null;
lastHighKey = null; lastHighKey = null;

View File

@ -40,7 +40,7 @@ public class DataFile extends LinkedNode<DataFile> implements Comparable<DataFil
DataFile(File file, int number) { DataFile(File file, int number) {
this.file = file; this.file = file;
this.dataFileId = Integer.valueOf(number); this.dataFileId = number;
length = (int)(file.exists() ? file.length() : 0); length = (int)(file.exists() ? file.length() : 0);
} }

View File

@ -718,7 +718,7 @@ public class Journal {
} }
DataFile getDataFile(Location item) throws IOException { DataFile getDataFile(Location item) throws IOException {
Integer key = Integer.valueOf(item.getDataFileId()); Integer key = item.getDataFileId();
DataFile dataFile = null; DataFile dataFile = null;
synchronized (currentDataFile) { synchronized (currentDataFile) {
dataFile = fileMap.get(key); dataFile = fileMap.get(key);
@ -906,7 +906,7 @@ public class Journal {
if (dataFile == null) { if (dataFile == null) {
return null; return null;
} else { } else {
cur.setDataFileId(dataFile.getDataFileId().intValue()); cur.setDataFileId(dataFile.getDataFileId());
cur.setOffset(0); cur.setOffset(0);
if (limit != null && cur.compareTo(limit) >= 0) { if (limit != null && cur.compareTo(limit) >= 0) {
LOG.trace("reached limit: {} at: {}", limit, cur); LOG.trace("reached limit: {} at: {}", limit, cur);
@ -1045,7 +1045,7 @@ public class Journal {
public DataFile getDataFileById(int dataFileId) { public DataFile getDataFileById(int dataFileId) {
synchronized (currentDataFile) { synchronized (currentDataFile) {
return fileMap.get(Integer.valueOf(dataFileId)); return fileMap.get(dataFileId);
} }
} }

View File

@ -195,7 +195,7 @@ public class JobSchedulerImpl extends ServiceSupport implements Runnable, JobSch
Iterator<Map.Entry<Long, List<JobLocation>>> iter = index.iterator(tx, start); Iterator<Map.Entry<Long, List<JobLocation>>> iter = index.iterator(tx, start);
while (iter.hasNext()) { while (iter.hasNext()) {
Map.Entry<Long, List<JobLocation>> next = iter.next(); Map.Entry<Long, List<JobLocation>> next = iter.next();
if (next != null && next.getKey().longValue() <= finish) { if (next != null && next.getKey() <= finish) {
for (JobLocation jl : next.getValue()) { for (JobLocation jl : next.getValue()) {
ByteSequence bs = getPayload(jl.getLocation()); ByteSequence bs = getPayload(jl.getLocation());
Job job = new JobImpl(jl, bs); Job job = new JobImpl(jl, bs);
@ -565,7 +565,7 @@ public class JobSchedulerImpl extends ServiceSupport implements Runnable, JobSch
List<Long> keys = new ArrayList<>(); List<Long> keys = new ArrayList<>();
for (Iterator<Map.Entry<Long, List<JobLocation>>> i = this.index.iterator(tx, start); i.hasNext();) { for (Iterator<Map.Entry<Long, List<JobLocation>>> i = this.index.iterator(tx, start); i.hasNext();) {
Map.Entry<Long, List<JobLocation>> entry = i.next(); Map.Entry<Long, List<JobLocation>> entry = i.next();
if (entry.getKey().longValue() <= finish) { if (entry.getKey() <= finish) {
keys.add(entry.getKey()); keys.add(entry.getKey());
} else { } else {
break; break;

View File

@ -460,7 +460,7 @@ public class JobSchedulerStoreImpl extends AbstractKahaDBStore implements JobSch
protected void incrementJournalCount(Transaction tx, Location location) throws IOException { protected void incrementJournalCount(Transaction tx, Location location) throws IOException {
int logId = location.getDataFileId(); int logId = location.getDataFileId();
Integer val = metaData.getJournalRC().get(tx, logId); Integer val = metaData.getJournalRC().get(tx, logId);
int refCount = val != null ? val.intValue() + 1 : 1; int refCount = val != null ? val + 1 : 1;
metaData.getJournalRC().put(tx, logId, refCount); metaData.getJournalRC().put(tx, logId, refCount);
} }

View File

@ -142,7 +142,7 @@ final class LegacyJobSchedulerImpl extends ServiceSupport {
Iterator<Map.Entry<Long, List<LegacyJobLocation>>> iter = index.iterator(store.getPageFile().tx(), start); Iterator<Map.Entry<Long, List<LegacyJobLocation>>> iter = index.iterator(store.getPageFile().tx(), start);
while (iter.hasNext()) { while (iter.hasNext()) {
Map.Entry<Long, List<LegacyJobLocation>> next = iter.next(); Map.Entry<Long, List<LegacyJobLocation>> next = iter.next();
if (next != null && next.getKey().longValue() <= finish) { if (next != null && next.getKey() <= finish) {
for (LegacyJobLocation jl : next.getValue()) { for (LegacyJobLocation jl : next.getValue()) {
ByteSequence bs = getPayload(jl.getLocation()); ByteSequence bs = getPayload(jl.getLocation());
LegacyJobImpl job = new LegacyJobImpl(jl, bs); LegacyJobImpl job = new LegacyJobImpl(jl, bs);

View File

@ -369,7 +369,7 @@ public class JournalCorruptionEofIndexRecoveryTest {
private void corruptLocation(Location toCorrupt) throws IOException { private void corruptLocation(Location toCorrupt) throws IOException {
DataFile dataFile = ((KahaDBPersistenceAdapter) broker.getPersistenceAdapter()).getStore().getJournal().getFileMap().get(Integer.valueOf(toCorrupt.getDataFileId())); DataFile dataFile = ((KahaDBPersistenceAdapter) broker.getPersistenceAdapter()).getStore().getJournal().getFileMap().get(toCorrupt.getDataFileId());
RecoverableRandomAccessFile randomAccessFile = dataFile.openRandomAccessFile(); RecoverableRandomAccessFile randomAccessFile = dataFile.openRandomAccessFile();

View File

@ -117,7 +117,7 @@ public class ListIndexTest extends IndexTestSupport {
tx = pf.tx(); tx = pf.tx();
Long value = listIndex.get(tx, key(10)); Long value = listIndex.get(tx, key(10));
assertNotNull(value); assertNotNull(value);
listIndex.put(tx, key(10), Long.valueOf(1024)); listIndex.put(tx, key(10), 1024L);
tx.commit(); tx.commit();
tx = pf.tx(); tx = pf.tx();
@ -127,7 +127,7 @@ public class ListIndexTest extends IndexTestSupport {
tx.commit(); tx.commit();
tx = pf.tx(); tx = pf.tx();
value = listIndex.put(tx, key(31), Long.valueOf(2048)); value = listIndex.put(tx, key(31), 2048L);
assertNull(value); assertNull(value);
assertTrue(listIndex.size() == 31); assertTrue(listIndex.size() == 31);
tx.commit(); tx.commit();
@ -407,7 +407,7 @@ public class ListIndexTest extends IndexTestSupport {
for (long i = 0; i < NUM_ADDITIONS; ++i) { for (long i = 0; i < NUM_ADDITIONS; ++i) {
final int stringSize = getMessageSize(1, 4096); final int stringSize = getMessageSize(1, 4096);
String val = new String(new byte[stringSize]); String val = new String(new byte[stringSize]);
expected.add(Long.valueOf(stringSize)); expected.add((long) stringSize);
test.add(tx, i, val); test.add(tx, i, val);
} }
tx.commit(); tx.commit();
@ -425,7 +425,7 @@ public class ListIndexTest extends IndexTestSupport {
for (long i = 0; i < NUM_ADDITIONS; ++i) { for (long i = 0; i < NUM_ADDITIONS; ++i) {
final int stringSize = getMessageSize(1, 4096); final int stringSize = getMessageSize(1, 4096);
String val = new String(new byte[stringSize]); String val = new String(new byte[stringSize]);
expected.add(Long.valueOf(stringSize)); expected.add((long) stringSize);
test.addFirst(tx, i+NUM_ADDITIONS, val); test.addFirst(tx, i+NUM_ADDITIONS, val);
} }
tx.commit(); tx.commit();
@ -443,7 +443,7 @@ public class ListIndexTest extends IndexTestSupport {
for (long i = 0; i < NUM_ADDITIONS; ++i) { for (long i = 0; i < NUM_ADDITIONS; ++i) {
final int stringSize = getMessageSize(1, 4096); final int stringSize = getMessageSize(1, 4096);
String val = new String(new byte[stringSize]); String val = new String(new byte[stringSize]);
expected.add(Long.valueOf(stringSize)); expected.add((long) stringSize);
test.put(tx, i, val); test.put(tx, i, val);
} }
tx.commit(); tx.commit();

View File

@ -432,7 +432,7 @@ public class MQTTProtocolConverter {
public void onActiveMQCommand(Command command) throws Exception { public void onActiveMQCommand(Command command) throws Exception {
if (command.isResponse()) { if (command.isResponse()) {
Response response = (Response) command; Response response = (Response) command;
ResponseHandler rh = resposeHandlers.remove(Integer.valueOf(response.getCorrelationId())); ResponseHandler rh = resposeHandlers.remove(response.getCorrelationId());
if (rh != null) { if (rh != null) {
rh.onResponse(this, response); rh.onResponse(this, response);
} else { } else {

View File

@ -552,11 +552,11 @@ public class ActiveMQActivationSpec implements MessageActivationSpec, Serializab
} }
public boolean isUseRAManagedTransactionEnabled() { public boolean isUseRAManagedTransactionEnabled() {
return Boolean.valueOf(useRAManagedTransaction).booleanValue(); return Boolean.valueOf(useRAManagedTransaction);
} }
public boolean getNoLocalBooleanValue() { public boolean getNoLocalBooleanValue() {
return Boolean.valueOf(noLocal).booleanValue(); return Boolean.valueOf(noLocal);
} }
public String getEnableBatch() { public String getEnableBatch() {
@ -573,7 +573,7 @@ public class ActiveMQActivationSpec implements MessageActivationSpec, Serializab
} }
public boolean getEnableBatchBooleanValue() { public boolean getEnableBatchBooleanValue() {
return Boolean.valueOf(enableBatch).booleanValue(); return Boolean.valueOf(enableBatch);
} }
public int getMaxMessagesPerBatchIntValue() { public int getMaxMessagesPerBatchIntValue() {

View File

@ -281,27 +281,27 @@ public class ActiveMQConnectionRequestInfo implements ConnectionRequestInfo, Ser
} }
public boolean isUseInboundSessionEnabled() { public boolean isUseInboundSessionEnabled() {
return useInboundSession != null && useInboundSession.booleanValue(); return useInboundSession != null && useInboundSession;
} }
public Double getRedeliveryBackOffMultiplier() { public Double getRedeliveryBackOffMultiplier() {
return Double.valueOf(redeliveryPolicy().getBackOffMultiplier()); return redeliveryPolicy().getBackOffMultiplier();
} }
public Long getInitialRedeliveryDelay() { public Long getInitialRedeliveryDelay() {
return Long.valueOf(redeliveryPolicy().getInitialRedeliveryDelay()); return redeliveryPolicy().getInitialRedeliveryDelay();
} }
public Long getMaximumRedeliveryDelay() { public Long getMaximumRedeliveryDelay() {
return Long.valueOf(redeliveryPolicy().getMaximumRedeliveryDelay()); return redeliveryPolicy().getMaximumRedeliveryDelay();
} }
public Integer getMaximumRedeliveries() { public Integer getMaximumRedeliveries() {
return Integer.valueOf(redeliveryPolicy().getMaximumRedeliveries()); return redeliveryPolicy().getMaximumRedeliveries();
} }
public Boolean getRedeliveryUseExponentialBackOff() { public Boolean getRedeliveryUseExponentialBackOff() {
return Boolean.valueOf(redeliveryPolicy().isUseExponentialBackOff()); return redeliveryPolicy().isUseExponentialBackOff();
} }
public void setRedeliveryBackOffMultiplier(Double value) { public void setRedeliveryBackOffMultiplier(Double value) {
@ -312,34 +312,34 @@ public class ActiveMQConnectionRequestInfo implements ConnectionRequestInfo, Ser
public void setInitialRedeliveryDelay(Long value) { public void setInitialRedeliveryDelay(Long value) {
if (value != null) { if (value != null) {
redeliveryPolicy().setInitialRedeliveryDelay(value.longValue()); redeliveryPolicy().setInitialRedeliveryDelay(value);
} }
} }
public void setMaximumRedeliveryDelay(Long value) { public void setMaximumRedeliveryDelay(Long value) {
if (value != null) { if (value != null) {
redeliveryPolicy().setMaximumRedeliveryDelay(value.longValue()); redeliveryPolicy().setMaximumRedeliveryDelay(value);
} }
} }
public void setMaximumRedeliveries(Integer value) { public void setMaximumRedeliveries(Integer value) {
if (value != null) { if (value != null) {
redeliveryPolicy().setMaximumRedeliveries(value.intValue()); redeliveryPolicy().setMaximumRedeliveries(value);
} }
} }
public void setRedeliveryUseExponentialBackOff(Boolean value) { public void setRedeliveryUseExponentialBackOff(Boolean value) {
if (value != null) { if (value != null) {
redeliveryPolicy().setUseExponentialBackOff(value.booleanValue()); redeliveryPolicy().setUseExponentialBackOff(value);
} }
} }
public Integer getDurableTopicPrefetch() { public Integer getDurableTopicPrefetch() {
return Integer.valueOf(prefetchPolicy().getDurableTopicPrefetch()); return prefetchPolicy().getDurableTopicPrefetch();
} }
public Integer getOptimizeDurableTopicPrefetch() { public Integer getOptimizeDurableTopicPrefetch() {
return Integer.valueOf(prefetchPolicy().getOptimizeDurableTopicPrefetch()); return prefetchPolicy().getOptimizeDurableTopicPrefetch();
} }
@Deprecated @Deprecated
@ -348,50 +348,50 @@ public class ActiveMQConnectionRequestInfo implements ConnectionRequestInfo, Ser
} }
public Integer getQueueBrowserPrefetch() { public Integer getQueueBrowserPrefetch() {
return Integer.valueOf(prefetchPolicy().getQueueBrowserPrefetch()); return prefetchPolicy().getQueueBrowserPrefetch();
} }
public Integer getQueuePrefetch() { public Integer getQueuePrefetch() {
return Integer.valueOf(prefetchPolicy().getQueuePrefetch()); return prefetchPolicy().getQueuePrefetch();
} }
public Integer getTopicPrefetch() { public Integer getTopicPrefetch() {
return Integer.valueOf(prefetchPolicy().getTopicPrefetch()); return prefetchPolicy().getTopicPrefetch();
} }
public void setAllPrefetchValues(Integer i) { public void setAllPrefetchValues(Integer i) {
if (i != null) { if (i != null) {
prefetchPolicy().setAll(i.intValue()); prefetchPolicy().setAll(i);
} }
} }
public void setDurableTopicPrefetch(Integer durableTopicPrefetch) { public void setDurableTopicPrefetch(Integer durableTopicPrefetch) {
if (durableTopicPrefetch != null) { if (durableTopicPrefetch != null) {
prefetchPolicy().setDurableTopicPrefetch(durableTopicPrefetch.intValue()); prefetchPolicy().setDurableTopicPrefetch(durableTopicPrefetch);
} }
} }
public void setOptimizeDurableTopicPrefetch(Integer optimizeDurableTopicPrefetch) { public void setOptimizeDurableTopicPrefetch(Integer optimizeDurableTopicPrefetch) {
if (optimizeDurableTopicPrefetch != null) { if (optimizeDurableTopicPrefetch != null) {
prefetchPolicy().setOptimizeDurableTopicPrefetch(optimizeDurableTopicPrefetch.intValue()); prefetchPolicy().setOptimizeDurableTopicPrefetch(optimizeDurableTopicPrefetch);
} }
} }
public void setQueueBrowserPrefetch(Integer queueBrowserPrefetch) { public void setQueueBrowserPrefetch(Integer queueBrowserPrefetch) {
if (queueBrowserPrefetch != null) { if (queueBrowserPrefetch != null) {
prefetchPolicy().setQueueBrowserPrefetch(queueBrowserPrefetch.intValue()); prefetchPolicy().setQueueBrowserPrefetch(queueBrowserPrefetch);
} }
} }
public void setQueuePrefetch(Integer queuePrefetch) { public void setQueuePrefetch(Integer queuePrefetch) {
if (queuePrefetch != null) { if (queuePrefetch != null) {
prefetchPolicy().setQueuePrefetch(queuePrefetch.intValue()); prefetchPolicy().setQueuePrefetch(queuePrefetch);
} }
} }
public void setTopicPrefetch(Integer topicPrefetch) { public void setTopicPrefetch(Integer topicPrefetch) {
if (topicPrefetch != null) { if (topicPrefetch != null) {
prefetchPolicy().setTopicPrefetch(topicPrefetch.intValue()); prefetchPolicy().setTopicPrefetch(topicPrefetch);
} }
} }
@ -418,7 +418,7 @@ public class ActiveMQConnectionRequestInfo implements ConnectionRequestInfo, Ser
} }
public boolean isUseSessionArgs() { public boolean isUseSessionArgs() {
return useSessionArgs != null ? useSessionArgs.booleanValue() : false; return useSessionArgs != null ? useSessionArgs : false;
} }
public Boolean getUseSessionArgs() { public Boolean getUseSessionArgs() {

View File

@ -54,7 +54,7 @@ public class ActiveMQConnectionFactoryTest {
info.setServerUrl(url); info.setServerUrl(url);
info.setUserName(user); info.setUserName(user);
info.setPassword(pwd); info.setPassword(pwd);
info.setAllPrefetchValues(new Integer(100)); info.setAllPrefetchValues(100);
} }
@Test(timeout = 60000) @Test(timeout = 60000)

View File

@ -174,7 +174,7 @@ public class ProtocolConverter {
command.setCommandId(generateCommandId()); command.setCommandId(generateCommandId());
if (handler != null) { if (handler != null) {
command.setResponseRequired(true); command.setResponseRequired(true);
resposeHandlers.put(Integer.valueOf(command.getCommandId()), handler); resposeHandlers.put(command.getCommandId(), handler);
} }
stompTransport.sendToActiveMQ(command); stompTransport.sendToActiveMQ(command);
} }
@ -863,7 +863,7 @@ public class ProtocolConverter {
public void onActiveMQCommand(Command command) throws IOException, JMSException { public void onActiveMQCommand(Command command) throws IOException, JMSException {
if (command.isResponse()) { if (command.isResponse()) {
Response response = (Response)command; Response response = (Response)command;
ResponseHandler rh = resposeHandlers.remove(Integer.valueOf(response.getCorrelationId())); ResponseHandler rh = resposeHandlers.remove(response.getCorrelationId());
if (rh != null) { if (rh != null) {
rh.onResponse(this, response); rh.onResponse(this, response);
} else { } else {

View File

@ -84,14 +84,14 @@ public class JMSMemtest {
url = settings.getProperty("url"); url = settings.getProperty("url");
topic = Boolean.parseBoolean(settings.getProperty("topic")); topic = Boolean.parseBoolean(settings.getProperty("topic"));
durable = Boolean.parseBoolean(settings.getProperty("durable")); durable = Boolean.parseBoolean(settings.getProperty("durable"));
connectionCheckpointSize = Integer.valueOf(settings.getProperty("connectionCheckpointSize")).intValue(); connectionCheckpointSize = Integer.valueOf(settings.getProperty("connectionCheckpointSize"));
producerCount = Integer.valueOf(settings.getProperty("producerCount")).intValue(); producerCount = Integer.valueOf(settings.getProperty("producerCount"));
consumerCount = Integer.valueOf(settings.getProperty("consumerCount")).intValue(); consumerCount = Integer.valueOf(settings.getProperty("consumerCount"));
messageCount = Integer.valueOf(settings.getProperty("messageCount")).intValue(); messageCount = Integer.valueOf(settings.getProperty("messageCount"));
messageSize = Integer.valueOf(settings.getProperty("messageSize")).intValue(); messageSize = Integer.valueOf(settings.getProperty("messageSize"));
prefetchSize = Integer.valueOf(settings.getProperty("prefetchSize")).intValue(); prefetchSize = Integer.valueOf(settings.getProperty("prefetchSize"));
checkpointInterval = Integer.valueOf(settings.getProperty("checkpointInterval")).intValue() * 1000; checkpointInterval = Integer.valueOf(settings.getProperty("checkpointInterval")) * 1000;
producerCount = Integer.valueOf(settings.getProperty("producerCount")).intValue(); producerCount = Integer.valueOf(settings.getProperty("producerCount"));
reportName = settings.getProperty("reportName"); reportName = settings.getProperty("reportName");
destinationName = settings.getProperty("destinationName"); destinationName = settings.getProperty("destinationName");
reportDirectory = settings.getProperty("reportDirectory"); reportDirectory = settings.getProperty("reportDirectory");

View File

@ -67,7 +67,7 @@ public class MemoryMonitoringTool implements Runnable {
public Thread startMonitor() { public Thread startMonitor() {
String intervalStr = this.getTestSettings().getProperty("checkpoint_interval"); String intervalStr = this.getTestSettings().getProperty("checkpoint_interval");
checkpointInterval = Integer.valueOf(intervalStr).intValue(); checkpointInterval = Integer.valueOf(intervalStr);
this.getTestSettings().remove("checkpoint_interval"); this.getTestSettings().remove("checkpoint_interval");
memoryBean = ManagementFactory.getMemoryMXBean(); memoryBean = ManagementFactory.getMemoryMXBean();

View File

@ -127,7 +127,7 @@ public final class ReflectionUtil {
}); });
} else if (paramType == Character.TYPE) { } else if (paramType == Character.TYPE) {
setterMethod.invoke(target, new Object[] { setterMethod.invoke(target, new Object[] {
new Character(val.charAt(0)) val.charAt(0)
}); });
} }
} else { } else {

View File

@ -27,7 +27,7 @@ public final class PerformanceStatisticsUtil {
long sum = 0; long sum = 0;
if (numList != null) { if (numList != null) {
for (Iterator i = numList.iterator(); i.hasNext();) { for (Iterator i = numList.iterator(); i.hasNext();) {
sum += ((Long)i.next()).longValue(); sum += (Long) i.next();
} }
} else { } else {
sum = -1; sum = -1;
@ -39,7 +39,7 @@ public final class PerformanceStatisticsUtil {
long min = Long.MAX_VALUE; long min = Long.MAX_VALUE;
if (numList != null) { if (numList != null) {
for (Iterator i = numList.iterator(); i.hasNext();) { for (Iterator i = numList.iterator(); i.hasNext();) {
min = Math.min(((Long)i.next()).longValue(), min); min = Math.min((Long) i.next(), min);
} }
} else { } else {
min = -1; min = -1;
@ -51,7 +51,7 @@ public final class PerformanceStatisticsUtil {
long max = Long.MIN_VALUE; long max = Long.MIN_VALUE;
if (numList != null) { if (numList != null) {
for (Iterator i = numList.iterator(); i.hasNext();) { for (Iterator i = numList.iterator(); i.hasNext();) {
max = Math.max(((Long)i.next()).longValue(), max); max = Math.max((Long) i.next(), max);
} }
} else { } else {
max = -1; max = -1;
@ -66,7 +66,7 @@ public final class PerformanceStatisticsUtil {
long totalTP = 0; long totalTP = 0;
for (Iterator i = numList.iterator(); i.hasNext();) { for (Iterator i = numList.iterator(); i.hasNext();) {
sampleCount++; sampleCount++;
totalTP += ((Long)i.next()).longValue(); totalTP += (Long) i.next();
} }
return (double)totalTP / (double)sampleCount; return (double)totalTP / (double)sampleCount;
} else { } else {
@ -85,7 +85,7 @@ public final class PerformanceStatisticsUtil {
long sampleTP; long sampleTP;
for (Iterator i = numList.iterator(); i.hasNext();) { for (Iterator i = numList.iterator(); i.hasNext();) {
sampleCount++; sampleCount++;
sampleTP = ((Long)i.next()).longValue(); sampleTP = (Long) i.next();
if (sampleTP != minTP && sampleTP != maxTP) { if (sampleTP != minTP && sampleTP != maxTP) {
totalTP += sampleTP; totalTP += sampleTP;
} }

View File

@ -77,9 +77,9 @@ public class JMSConsumerTest extends JmsTestSupport {
} }
public void initCombosForTestMessageListenerWithConsumerCanBeStopped() { public void initCombosForTestMessageListenerWithConsumerCanBeStopped() {
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.PERSISTENT)}); addCombinationValues("deliveryMode", new Object[] {DeliveryMode.NON_PERSISTENT, DeliveryMode.PERSISTENT});
addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE), addCombinationValues("destinationType", new Object[] {ActiveMQDestination.QUEUE_TYPE, ActiveMQDestination.TOPIC_TYPE,
Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)}); ActiveMQDestination.TEMP_QUEUE_TYPE, ActiveMQDestination.TEMP_TOPIC_TYPE});
} }
public void testMessageListenerWithConsumerCanBeStopped() throws Exception { public void testMessageListenerWithConsumerCanBeStopped() throws Exception {
@ -199,11 +199,11 @@ public class JMSConsumerTest extends JmsTestSupport {
} }
public void initCombosForTestMutiReceiveWithPrefetch1() { public void initCombosForTestMutiReceiveWithPrefetch1() {
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.PERSISTENT)}); addCombinationValues("deliveryMode", new Object[] {DeliveryMode.NON_PERSISTENT, DeliveryMode.PERSISTENT});
addCombinationValues("ackMode", new Object[] {Integer.valueOf(Session.AUTO_ACKNOWLEDGE), Integer.valueOf(Session.DUPS_OK_ACKNOWLEDGE), addCombinationValues("ackMode", new Object[] {Session.AUTO_ACKNOWLEDGE, Session.DUPS_OK_ACKNOWLEDGE,
Integer.valueOf(Session.CLIENT_ACKNOWLEDGE)}); Session.CLIENT_ACKNOWLEDGE});
addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE), addCombinationValues("destinationType", new Object[] {ActiveMQDestination.QUEUE_TYPE, ActiveMQDestination.TOPIC_TYPE,
Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)}); ActiveMQDestination.TEMP_QUEUE_TYPE, ActiveMQDestination.TEMP_TOPIC_TYPE});
} }
public void testMutiReceiveWithPrefetch1() throws Exception { public void testMutiReceiveWithPrefetch1() throws Exception {
@ -322,8 +322,8 @@ public class JMSConsumerTest extends JmsTestSupport {
} }
public void initCombosForTestDurableConsumerSelectorChange() { public void initCombosForTestDurableConsumerSelectorChange() {
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.PERSISTENT)}); addCombinationValues("deliveryMode", new Object[] {DeliveryMode.NON_PERSISTENT, DeliveryMode.PERSISTENT});
addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.TOPIC_TYPE)}); addCombinationValues("destinationType", new Object[] {ActiveMQDestination.TOPIC_TYPE});
} }
public void testDurableConsumerSelectorChange() throws Exception { public void testDurableConsumerSelectorChange() throws Exception {
@ -366,9 +366,9 @@ public class JMSConsumerTest extends JmsTestSupport {
} }
public void initCombosForTestSendReceiveBytesMessage() { public void initCombosForTestSendReceiveBytesMessage() {
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.PERSISTENT)}); addCombinationValues("deliveryMode", new Object[] {DeliveryMode.NON_PERSISTENT, DeliveryMode.PERSISTENT});
addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE), addCombinationValues("destinationType", new Object[] {ActiveMQDestination.QUEUE_TYPE, ActiveMQDestination.TOPIC_TYPE,
Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)}); ActiveMQDestination.TEMP_QUEUE_TYPE, ActiveMQDestination.TEMP_TOPIC_TYPE});
} }
public void testSendReceiveBytesMessage() throws Exception { public void testSendReceiveBytesMessage() throws Exception {
@ -395,9 +395,9 @@ public class JMSConsumerTest extends JmsTestSupport {
} }
public void initCombosForTestSetMessageListenerAfterStart() { public void initCombosForTestSetMessageListenerAfterStart() {
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.PERSISTENT)}); addCombinationValues("deliveryMode", new Object[] {DeliveryMode.NON_PERSISTENT, DeliveryMode.PERSISTENT});
addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE), addCombinationValues("destinationType", new Object[] {ActiveMQDestination.QUEUE_TYPE, ActiveMQDestination.TOPIC_TYPE,
Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)}); ActiveMQDestination.TEMP_QUEUE_TYPE, ActiveMQDestination.TEMP_TOPIC_TYPE});
} }
public void testSetMessageListenerAfterStart() throws Exception { public void testSetMessageListenerAfterStart() throws Exception {
@ -433,7 +433,7 @@ public class JMSConsumerTest extends JmsTestSupport {
} }
public void initCombosForTestPassMessageListenerIntoCreateConsumer() { public void initCombosForTestPassMessageListenerIntoCreateConsumer() {
addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE)}); addCombinationValues("destinationType", new Object[] {ActiveMQDestination.QUEUE_TYPE, ActiveMQDestination.TOPIC_TYPE});
} }
public void testPassMessageListenerIntoCreateConsumer() throws Exception { public void testPassMessageListenerIntoCreateConsumer() throws Exception {
@ -467,9 +467,9 @@ public class JMSConsumerTest extends JmsTestSupport {
} }
public void initCombosForTestMessageListenerOnMessageCloseUnackedWithPrefetch1StayInQueue() { public void initCombosForTestMessageListenerOnMessageCloseUnackedWithPrefetch1StayInQueue() {
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.PERSISTENT)}); addCombinationValues("deliveryMode", new Object[] {DeliveryMode.NON_PERSISTENT, DeliveryMode.PERSISTENT});
addCombinationValues("ackMode", new Object[] {Integer.valueOf(Session.CLIENT_ACKNOWLEDGE)}); addCombinationValues("ackMode", new Object[] {Session.CLIENT_ACKNOWLEDGE});
addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE)}); addCombinationValues("destinationType", new Object[] {ActiveMQDestination.QUEUE_TYPE});
} }
public void testMessageListenerOnMessageCloseUnackedWithPrefetch1StayInQueue() throws Exception { public void testMessageListenerOnMessageCloseUnackedWithPrefetch1StayInQueue() throws Exception {
@ -555,9 +555,9 @@ public class JMSConsumerTest extends JmsTestSupport {
} }
public void initCombosForTestMessageListenerAutoAckOnCloseWithPrefetch1() { public void initCombosForTestMessageListenerAutoAckOnCloseWithPrefetch1() {
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.PERSISTENT)}); addCombinationValues("deliveryMode", new Object[] {DeliveryMode.NON_PERSISTENT, DeliveryMode.PERSISTENT});
addCombinationValues("ackMode", new Object[] {Integer.valueOf(Session.AUTO_ACKNOWLEDGE), Integer.valueOf(Session.CLIENT_ACKNOWLEDGE)}); addCombinationValues("ackMode", new Object[] {Session.AUTO_ACKNOWLEDGE, Session.CLIENT_ACKNOWLEDGE});
addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE)}); addCombinationValues("destinationType", new Object[] {ActiveMQDestination.QUEUE_TYPE});
} }
public void testMessageListenerAutoAckOnCloseWithPrefetch1() throws Exception { public void testMessageListenerAutoAckOnCloseWithPrefetch1() throws Exception {
@ -642,9 +642,9 @@ public class JMSConsumerTest extends JmsTestSupport {
} }
public void initCombosForTestMessageListenerWithConsumerWithPrefetch1() { public void initCombosForTestMessageListenerWithConsumerWithPrefetch1() {
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.PERSISTENT)}); addCombinationValues("deliveryMode", new Object[] {DeliveryMode.NON_PERSISTENT, DeliveryMode.PERSISTENT});
addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE), addCombinationValues("destinationType", new Object[] {ActiveMQDestination.QUEUE_TYPE, ActiveMQDestination.TOPIC_TYPE,
Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)}); ActiveMQDestination.TEMP_QUEUE_TYPE, ActiveMQDestination.TEMP_TOPIC_TYPE});
} }
public void testMessageListenerWithConsumerWithPrefetch1() throws Exception { public void testMessageListenerWithConsumerWithPrefetch1() throws Exception {
@ -680,9 +680,9 @@ public class JMSConsumerTest extends JmsTestSupport {
} }
public void initCombosForTestMessageListenerWithConsumer() { public void initCombosForTestMessageListenerWithConsumer() {
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.PERSISTENT)}); addCombinationValues("deliveryMode", new Object[] {DeliveryMode.NON_PERSISTENT, DeliveryMode.PERSISTENT});
addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE), addCombinationValues("destinationType", new Object[] {ActiveMQDestination.QUEUE_TYPE, ActiveMQDestination.TOPIC_TYPE,
Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)}); ActiveMQDestination.TEMP_QUEUE_TYPE, ActiveMQDestination.TEMP_TOPIC_TYPE});
} }
public void testMessageListenerWithConsumer() throws Exception { public void testMessageListenerWithConsumer() throws Exception {
@ -716,10 +716,10 @@ public class JMSConsumerTest extends JmsTestSupport {
} }
public void initCombosForTestUnackedWithPrefetch1StayInQueue() { public void initCombosForTestUnackedWithPrefetch1StayInQueue() {
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.PERSISTENT)}); addCombinationValues("deliveryMode", new Object[] {DeliveryMode.NON_PERSISTENT, DeliveryMode.PERSISTENT});
addCombinationValues("ackMode", new Object[] {Integer.valueOf(Session.AUTO_ACKNOWLEDGE), Integer.valueOf(Session.DUPS_OK_ACKNOWLEDGE), addCombinationValues("ackMode", new Object[] {Session.AUTO_ACKNOWLEDGE, Session.DUPS_OK_ACKNOWLEDGE,
Integer.valueOf(Session.CLIENT_ACKNOWLEDGE)}); Session.CLIENT_ACKNOWLEDGE});
addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE)}); addCombinationValues("destinationType", new Object[] {ActiveMQDestination.QUEUE_TYPE});
} }
public void testUnackedWithPrefetch1StayInQueue() throws Exception { public void testUnackedWithPrefetch1StayInQueue() throws Exception {
@ -764,7 +764,7 @@ public class JMSConsumerTest extends JmsTestSupport {
} }
public void initCombosForTestPrefetch1MessageNotDispatched() { public void initCombosForTestPrefetch1MessageNotDispatched() {
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.PERSISTENT)}); addCombinationValues("deliveryMode", new Object[] {DeliveryMode.NON_PERSISTENT, DeliveryMode.PERSISTENT});
} }
public void testPrefetch1MessageNotDispatched() throws Exception { public void testPrefetch1MessageNotDispatched() throws Exception {
@ -806,8 +806,8 @@ public class JMSConsumerTest extends JmsTestSupport {
} }
public void initCombosForTestDontStart() { public void initCombosForTestDontStart() {
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT)}); addCombinationValues("deliveryMode", new Object[] {DeliveryMode.NON_PERSISTENT});
addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE)}); addCombinationValues("destinationType", new Object[] {ActiveMQDestination.QUEUE_TYPE, ActiveMQDestination.TOPIC_TYPE});
} }
public void testDontStart() throws Exception { public void testDontStart() throws Exception {
@ -824,8 +824,8 @@ public class JMSConsumerTest extends JmsTestSupport {
} }
public void initCombosForTestStartAfterSend() { public void initCombosForTestStartAfterSend() {
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT)}); addCombinationValues("deliveryMode", new Object[] {DeliveryMode.NON_PERSISTENT});
addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE)}); addCombinationValues("destinationType", new Object[] {ActiveMQDestination.QUEUE_TYPE, ActiveMQDestination.TOPIC_TYPE});
} }
public void testStartAfterSend() throws Exception { public void testStartAfterSend() throws Exception {
@ -846,9 +846,9 @@ public class JMSConsumerTest extends JmsTestSupport {
} }
public void initCombosForTestReceiveMessageWithConsumer() { public void initCombosForTestReceiveMessageWithConsumer() {
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.PERSISTENT)}); addCombinationValues("deliveryMode", new Object[] {DeliveryMode.NON_PERSISTENT, DeliveryMode.PERSISTENT});
addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE), addCombinationValues("destinationType", new Object[] {ActiveMQDestination.QUEUE_TYPE, ActiveMQDestination.TOPIC_TYPE,
Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)}); ActiveMQDestination.TEMP_QUEUE_TYPE, ActiveMQDestination.TEMP_TOPIC_TYPE});
} }
public void testReceiveMessageWithConsumer() throws Exception { public void testReceiveMessageWithConsumer() throws Exception {
@ -990,7 +990,7 @@ public class JMSConsumerTest extends JmsTestSupport {
public void initCombosForTestAckOfExpired() { public void initCombosForTestAckOfExpired() {
addCombinationValues("destinationType", addCombinationValues("destinationType",
new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE)}); new Object[] {ActiveMQDestination.QUEUE_TYPE, ActiveMQDestination.TOPIC_TYPE});
} }
public void testAckOfExpired() throws Exception { public void testAckOfExpired() throws Exception {

View File

@ -43,7 +43,7 @@ public class JMSExclusiveConsumerTest extends JmsTestSupport {
} }
public void initCombosForTestRoundRobinDispatchOnNonExclusive() { public void initCombosForTestRoundRobinDispatchOnNonExclusive() {
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.PERSISTENT)}); addCombinationValues("deliveryMode", new Object[] {DeliveryMode.NON_PERSISTENT, DeliveryMode.PERSISTENT});
} }
/** /**
@ -80,7 +80,7 @@ public class JMSExclusiveConsumerTest extends JmsTestSupport {
} }
public void initCombosForTestDispatchExclusive() { public void initCombosForTestDispatchExclusive() {
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.PERSISTENT)}); addCombinationValues("deliveryMode", new Object[] {DeliveryMode.NON_PERSISTENT, DeliveryMode.PERSISTENT});
} }
/** /**

View File

@ -60,9 +60,9 @@ public class JMSMessageTest extends JmsTestSupport {
public void initCombos() { public void initCombos() {
addCombinationValues("connectURL", new Object[] {"vm://localhost?marshal=false", addCombinationValues("connectURL", new Object[] {"vm://localhost?marshal=false",
"vm://localhost?marshal=true"}); "vm://localhost?marshal=true"});
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), addCombinationValues("deliveryMode", new Object[] {DeliveryMode.NON_PERSISTENT,
Integer.valueOf(DeliveryMode.PERSISTENT)}); DeliveryMode.PERSISTENT});
addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE)}); addCombinationValues("destinationType", new Object[] {ActiveMQDestination.QUEUE_TYPE});
} }
public void testTextMessage() throws Exception { public void testTextMessage() throws Exception {

View File

@ -49,8 +49,8 @@ public class JMSUsecaseTest extends JmsTestSupport {
} }
public void initCombosForTestQueueBrowser() { public void initCombosForTestQueueBrowser() {
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.PERSISTENT)}); addCombinationValues("deliveryMode", new Object[] {DeliveryMode.NON_PERSISTENT, DeliveryMode.PERSISTENT});
addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE)}); addCombinationValues("destinationType", new Object[] {ActiveMQDestination.QUEUE_TYPE, ActiveMQDestination.TEMP_QUEUE_TYPE});
} }
public void testQueueBrowser() throws Exception { public void testQueueBrowser() throws Exception {
@ -77,9 +77,9 @@ public class JMSUsecaseTest extends JmsTestSupport {
} }
public void initCombosForTestSendReceive() { public void initCombosForTestSendReceive() {
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.PERSISTENT)}); addCombinationValues("deliveryMode", new Object[] {DeliveryMode.NON_PERSISTENT, DeliveryMode.PERSISTENT});
addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE), addCombinationValues("destinationType", new Object[] {ActiveMQDestination.QUEUE_TYPE, ActiveMQDestination.TOPIC_TYPE,
Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)}); ActiveMQDestination.TEMP_QUEUE_TYPE, ActiveMQDestination.TEMP_TOPIC_TYPE});
} }
public void testSendReceive() throws Exception { public void testSendReceive() throws Exception {
@ -99,9 +99,9 @@ public class JMSUsecaseTest extends JmsTestSupport {
} }
public void initCombosForTestSendReceiveTransacted() { public void initCombosForTestSendReceiveTransacted() {
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.PERSISTENT)}); addCombinationValues("deliveryMode", new Object[] {DeliveryMode.NON_PERSISTENT, DeliveryMode.PERSISTENT});
addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE), addCombinationValues("destinationType", new Object[] {ActiveMQDestination.QUEUE_TYPE, ActiveMQDestination.TOPIC_TYPE,
Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)}); ActiveMQDestination.TEMP_QUEUE_TYPE, ActiveMQDestination.TEMP_TOPIC_TYPE});
} }
public void testSendReceiveTransacted() throws Exception { public void testSendReceiveTransacted() throws Exception {

View File

@ -93,14 +93,14 @@ public class LoadTestBurnIn extends JmsTestSupport {
} }
public void initCombosForTestSendReceive() { public void initCombosForTestSendReceive() {
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), addCombinationValues("deliveryMode", new Object[] {DeliveryMode.NON_PERSISTENT,
Integer.valueOf(DeliveryMode.PERSISTENT)}); DeliveryMode.PERSISTENT});
addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.TOPIC_TYPE)}); addCombinationValues("destinationType", new Object[] {ActiveMQDestination.TOPIC_TYPE});
addCombinationValues("durableConsumer", new Object[] {Boolean.TRUE}); addCombinationValues("durableConsumer", new Object[] {Boolean.TRUE});
addCombinationValues("messageSize", new Object[] {Integer.valueOf(101), Integer.valueOf(102), addCombinationValues("messageSize", new Object[] {101, 102,
Integer.valueOf(103), Integer.valueOf(104), 103, 104,
Integer.valueOf(105), Integer.valueOf(106), 105, 106,
Integer.valueOf(107), Integer.valueOf(108)}); 107, 108});
} }
public void testSendReceive() throws Exception { public void testSendReceive() throws Exception {

View File

@ -46,8 +46,8 @@ public class BrokerTest extends BrokerTestSupport {
protected static final int MAX_NULL_WAIT=500; protected static final int MAX_NULL_WAIT=500;
public void initCombosForTestQueueOnlyOnceDeliveryWith2Consumers() { public void initCombosForTestQueueOnlyOnceDeliveryWith2Consumers() {
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), addCombinationValues("deliveryMode", new Object[] {DeliveryMode.NON_PERSISTENT,
Integer.valueOf(DeliveryMode.PERSISTENT)}); DeliveryMode.PERSISTENT});
} }
public void testQueueOnlyOnceDeliveryWith2Consumers() throws Exception { public void testQueueOnlyOnceDeliveryWith2Consumers() throws Exception {
@ -100,8 +100,8 @@ public class BrokerTest extends BrokerTestSupport {
} }
public void initCombosForTestQueueBrowserWith2Consumers() { public void initCombosForTestQueueBrowserWith2Consumers() {
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), addCombinationValues("deliveryMode", new Object[] {DeliveryMode.NON_PERSISTENT,
Integer.valueOf(DeliveryMode.PERSISTENT)}); DeliveryMode.PERSISTENT});
} }
public void testQueueBrowserWith2Consumers() throws Exception { public void testQueueBrowserWith2Consumers() throws Exception {
@ -287,12 +287,12 @@ public class BrokerTest extends BrokerTestSupport {
public void initCombosForTestConsumerPrefetchAndStandardAck() { public void initCombosForTestConsumerPrefetchAndStandardAck() {
addCombinationValues("deliveryMode", new Object[] { addCombinationValues("deliveryMode", new Object[] {
// Integer.valueOf(DeliveryMode.NON_PERSISTENT), // Integer.valueOf(DeliveryMode.NON_PERSISTENT),
Integer.valueOf(DeliveryMode.PERSISTENT)}); DeliveryMode.PERSISTENT});
addCombinationValues("destinationType", addCombinationValues("destinationType",
new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), new Object[] {ActiveMQDestination.QUEUE_TYPE,
Byte.valueOf(ActiveMQDestination.TOPIC_TYPE), ActiveMQDestination.TOPIC_TYPE,
Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE), ActiveMQDestination.TEMP_QUEUE_TYPE,
Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)}); ActiveMQDestination.TEMP_TOPIC_TYPE});
} }
public void testConsumerPrefetchAndStandardAck() throws Exception { public void testConsumerPrefetchAndStandardAck() throws Exception {
@ -338,13 +338,13 @@ public class BrokerTest extends BrokerTestSupport {
} }
public void initCombosForTestTransactedAckWithPrefetchOfOne() { public void initCombosForTestTransactedAckWithPrefetchOfOne() {
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), addCombinationValues("deliveryMode", new Object[] {DeliveryMode.NON_PERSISTENT,
Integer.valueOf(DeliveryMode.PERSISTENT)}); DeliveryMode.PERSISTENT});
addCombinationValues("destinationType", addCombinationValues("destinationType",
new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), new Object[] {ActiveMQDestination.QUEUE_TYPE,
Byte.valueOf(ActiveMQDestination.TOPIC_TYPE), ActiveMQDestination.TOPIC_TYPE,
Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE), ActiveMQDestination.TEMP_QUEUE_TYPE,
Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)}); ActiveMQDestination.TEMP_TOPIC_TYPE});
} }
public void testTransactedAckWithPrefetchOfOne() throws Exception { public void testTransactedAckWithPrefetchOfOne() throws Exception {
@ -389,13 +389,13 @@ public class BrokerTest extends BrokerTestSupport {
} }
public void initCombosForTestTransactedSend() { public void initCombosForTestTransactedSend() {
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), addCombinationValues("deliveryMode", new Object[] {DeliveryMode.NON_PERSISTENT,
Integer.valueOf(DeliveryMode.PERSISTENT)}); DeliveryMode.PERSISTENT});
addCombinationValues("destinationType", addCombinationValues("destinationType",
new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), new Object[] {ActiveMQDestination.QUEUE_TYPE,
Byte.valueOf(ActiveMQDestination.TOPIC_TYPE), ActiveMQDestination.TOPIC_TYPE,
Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE), ActiveMQDestination.TEMP_QUEUE_TYPE,
Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)}); ActiveMQDestination.TEMP_TOPIC_TYPE});
} }
public void testTransactedSend() throws Exception { public void testTransactedSend() throws Exception {
@ -443,11 +443,11 @@ public class BrokerTest extends BrokerTestSupport {
} }
public void initCombosForTestQueueTransactedAck() { public void initCombosForTestQueueTransactedAck() {
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), addCombinationValues("deliveryMode", new Object[] {DeliveryMode.NON_PERSISTENT,
Integer.valueOf(DeliveryMode.PERSISTENT)}); DeliveryMode.PERSISTENT});
addCombinationValues("destinationType", addCombinationValues("destinationType",
new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), new Object[] {ActiveMQDestination.QUEUE_TYPE,
Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE)}); ActiveMQDestination.TEMP_QUEUE_TYPE});
} }
public void testQueueTransactedAck() throws Exception { public void testQueueTransactedAck() throws Exception {
@ -552,8 +552,8 @@ public class BrokerTest extends BrokerTestSupport {
} }
public void initCombosForTestGroupedMessagesDeliveredToOnlyOneConsumer() { public void initCombosForTestGroupedMessagesDeliveredToOnlyOneConsumer() {
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), addCombinationValues("deliveryMode", new Object[] {DeliveryMode.NON_PERSISTENT,
Integer.valueOf(DeliveryMode.PERSISTENT)}); DeliveryMode.PERSISTENT});
} }
public void testGroupedMessagesDeliveredToOnlyOneConsumer() throws Exception { public void testGroupedMessagesDeliveredToOnlyOneConsumer() throws Exception {
@ -614,8 +614,8 @@ public class BrokerTest extends BrokerTestSupport {
} }
public void initCombosForTestTopicConsumerOnlySeeMessagesAfterCreation() { public void initCombosForTestTopicConsumerOnlySeeMessagesAfterCreation() {
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), addCombinationValues("deliveryMode", new Object[] {DeliveryMode.NON_PERSISTENT,
Integer.valueOf(DeliveryMode.PERSISTENT)}); DeliveryMode.PERSISTENT});
addCombinationValues("durableConsumer", new Object[] {Boolean.TRUE, Boolean.FALSE}); addCombinationValues("durableConsumer", new Object[] {Boolean.TRUE, Boolean.FALSE});
} }
@ -659,8 +659,8 @@ public class BrokerTest extends BrokerTestSupport {
} }
public void initCombosForTestTopicRetroactiveConsumerSeeMessagesBeforeCreation() { public void initCombosForTestTopicRetroactiveConsumerSeeMessagesBeforeCreation() {
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), addCombinationValues("deliveryMode", new Object[] {DeliveryMode.NON_PERSISTENT,
Integer.valueOf(DeliveryMode.PERSISTENT)}); DeliveryMode.PERSISTENT});
addCombinationValues("durableConsumer", new Object[] {Boolean.TRUE, Boolean.FALSE}); addCombinationValues("durableConsumer", new Object[] {Boolean.TRUE, Boolean.FALSE});
} }
@ -809,8 +809,8 @@ public class BrokerTest extends BrokerTestSupport {
public void initCombosForTestExclusiveQueueDeliversToOnlyOneConsumer() { public void initCombosForTestExclusiveQueueDeliversToOnlyOneConsumer() {
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), addCombinationValues("deliveryMode", new Object[] {DeliveryMode.NON_PERSISTENT,
Integer.valueOf(DeliveryMode.PERSISTENT)}); DeliveryMode.PERSISTENT});
} }
public void testExclusiveQueueDeliversToOnlyOneConsumer() throws Exception { public void testExclusiveQueueDeliversToOnlyOneConsumer() throws Exception {
@ -874,10 +874,10 @@ public class BrokerTest extends BrokerTestSupport {
} }
public void initCombosForTestWildcardConsume() { public void initCombosForTestWildcardConsume() {
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), addCombinationValues("deliveryMode", new Object[] {DeliveryMode.NON_PERSISTENT,
Integer.valueOf(DeliveryMode.PERSISTENT)}); DeliveryMode.PERSISTENT});
addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), addCombinationValues("destinationType", new Object[] {ActiveMQDestination.QUEUE_TYPE,
Byte.valueOf(ActiveMQDestination.TOPIC_TYPE)}); ActiveMQDestination.TOPIC_TYPE});
} }
public void testWildcardConsume() throws Exception { public void testWildcardConsume() throws Exception {
@ -925,10 +925,10 @@ public class BrokerTest extends BrokerTestSupport {
} }
public void initCombosForTestCompositeConsume() { public void initCombosForTestCompositeConsume() {
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), addCombinationValues("deliveryMode", new Object[] {DeliveryMode.NON_PERSISTENT,
Integer.valueOf(DeliveryMode.PERSISTENT)}); DeliveryMode.PERSISTENT});
addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), addCombinationValues("destinationType", new Object[] {ActiveMQDestination.QUEUE_TYPE,
Byte.valueOf(ActiveMQDestination.TOPIC_TYPE)}); ActiveMQDestination.TOPIC_TYPE});
} }
public void testCompositeConsume() throws Exception { public void testCompositeConsume() throws Exception {
@ -969,10 +969,10 @@ public class BrokerTest extends BrokerTestSupport {
} }
public void initCombosForTestCompositeSend() { public void initCombosForTestCompositeSend() {
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), addCombinationValues("deliveryMode", new Object[] {DeliveryMode.NON_PERSISTENT,
Integer.valueOf(DeliveryMode.PERSISTENT)}); DeliveryMode.PERSISTENT});
addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), addCombinationValues("destinationType", new Object[] {ActiveMQDestination.QUEUE_TYPE,
Byte.valueOf(ActiveMQDestination.TOPIC_TYPE)}); ActiveMQDestination.TOPIC_TYPE});
} }
public void testCompositeSend() throws Exception { public void testCompositeSend() throws Exception {
@ -1038,8 +1038,8 @@ public class BrokerTest extends BrokerTestSupport {
} }
public void initCombosForTestConnectionCloseCascades() { public void initCombosForTestConnectionCloseCascades() {
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), addCombinationValues("deliveryMode", new Object[] {DeliveryMode.NON_PERSISTENT,
Integer.valueOf(DeliveryMode.PERSISTENT)}); DeliveryMode.PERSISTENT});
addCombinationValues("destination", new Object[] {new ActiveMQTopic("TEST"), addCombinationValues("destination", new Object[] {new ActiveMQTopic("TEST"),
new ActiveMQQueue("TEST")}); new ActiveMQQueue("TEST")});
} }
@ -1094,8 +1094,8 @@ public class BrokerTest extends BrokerTestSupport {
} }
public void initCombosForTestSessionCloseCascades() { public void initCombosForTestSessionCloseCascades() {
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), addCombinationValues("deliveryMode", new Object[] {DeliveryMode.NON_PERSISTENT,
Integer.valueOf(DeliveryMode.PERSISTENT)}); DeliveryMode.PERSISTENT});
addCombinationValues("destination", new Object[] {new ActiveMQTopic("TEST"), addCombinationValues("destination", new Object[] {new ActiveMQTopic("TEST"),
new ActiveMQQueue("TEST")}); new ActiveMQQueue("TEST")});
} }
@ -1147,8 +1147,8 @@ public class BrokerTest extends BrokerTestSupport {
} }
public void initCombosForTestConsumerClose() { public void initCombosForTestConsumerClose() {
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), addCombinationValues("deliveryMode", new Object[] {DeliveryMode.NON_PERSISTENT,
Integer.valueOf(DeliveryMode.PERSISTENT)}); DeliveryMode.PERSISTENT});
addCombinationValues("destination", new Object[] {new ActiveMQTopic("TEST"), addCombinationValues("destination", new Object[] {new ActiveMQTopic("TEST"),
new ActiveMQQueue("TEST")}); new ActiveMQQueue("TEST")});
} }
@ -1205,8 +1205,8 @@ public class BrokerTest extends BrokerTestSupport {
} }
public void initCombosForTestTopicNoLocal() { public void initCombosForTestTopicNoLocal() {
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), addCombinationValues("deliveryMode", new Object[] {DeliveryMode.NON_PERSISTENT,
Integer.valueOf(DeliveryMode.PERSISTENT)}); DeliveryMode.PERSISTENT});
} }
public void testTopicNoLocal() throws Exception { public void testTopicNoLocal() throws Exception {
@ -1271,8 +1271,8 @@ public class BrokerTest extends BrokerTestSupport {
} }
public void initCombosForTopicDispatchIsBroadcast() { public void initCombosForTopicDispatchIsBroadcast() {
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), addCombinationValues("deliveryMode", new Object[] {DeliveryMode.NON_PERSISTENT,
Integer.valueOf(DeliveryMode.PERSISTENT)}); DeliveryMode.PERSISTENT});
} }
public void testTopicDispatchIsBroadcast() throws Exception { public void testTopicDispatchIsBroadcast() throws Exception {
@ -1320,11 +1320,11 @@ public class BrokerTest extends BrokerTestSupport {
} }
public void initCombosForTestQueueDispatchedAreRedeliveredOnConsumerClose() { public void initCombosForTestQueueDispatchedAreRedeliveredOnConsumerClose() {
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), addCombinationValues("deliveryMode", new Object[] {DeliveryMode.NON_PERSISTENT,
Integer.valueOf(DeliveryMode.PERSISTENT)}); DeliveryMode.PERSISTENT});
addCombinationValues("destinationType", addCombinationValues("destinationType",
new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), new Object[] {ActiveMQDestination.QUEUE_TYPE,
Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE)}); ActiveMQDestination.TEMP_QUEUE_TYPE});
} }
public void testQueueDispatchedAreRedeliveredOnConsumerClose() throws Exception { public void testQueueDispatchedAreRedeliveredOnConsumerClose() throws Exception {
@ -1381,11 +1381,11 @@ public class BrokerTest extends BrokerTestSupport {
} }
public void initCombosForTestQueueBrowseMessages() { public void initCombosForTestQueueBrowseMessages() {
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), addCombinationValues("deliveryMode", new Object[] {DeliveryMode.NON_PERSISTENT,
Integer.valueOf(DeliveryMode.PERSISTENT)}); DeliveryMode.PERSISTENT});
addCombinationValues("destinationType", addCombinationValues("destinationType",
new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), new Object[] {ActiveMQDestination.QUEUE_TYPE,
Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE)}); ActiveMQDestination.TEMP_QUEUE_TYPE});
} }
public void testQueueBrowseMessages() throws Exception { public void testQueueBrowseMessages() throws Exception {
@ -1421,11 +1421,11 @@ public class BrokerTest extends BrokerTestSupport {
} }
public void initCombosForTestQueueSendThenAddConsumer() { public void initCombosForTestQueueSendThenAddConsumer() {
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), addCombinationValues("deliveryMode", new Object[] {DeliveryMode.NON_PERSISTENT,
Integer.valueOf(DeliveryMode.PERSISTENT)}); DeliveryMode.PERSISTENT});
addCombinationValues("destinationType", addCombinationValues("destinationType",
new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), new Object[] {ActiveMQDestination.QUEUE_TYPE,
Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE)}); ActiveMQDestination.TEMP_QUEUE_TYPE});
} }
public void testQueueSendThenAddConsumer() throws Exception { public void testQueueSendThenAddConsumer() throws Exception {
@ -1455,11 +1455,11 @@ public class BrokerTest extends BrokerTestSupport {
} }
public void initCombosForTestQueueAckRemovesMessage() { public void initCombosForTestQueueAckRemovesMessage() {
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), addCombinationValues("deliveryMode", new Object[] {DeliveryMode.NON_PERSISTENT,
Integer.valueOf(DeliveryMode.PERSISTENT)}); DeliveryMode.PERSISTENT});
addCombinationValues("destinationType", addCombinationValues("destinationType",
new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), new Object[] {ActiveMQDestination.QUEUE_TYPE,
Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE)}); ActiveMQDestination.TEMP_QUEUE_TYPE});
} }
public void testQueueAckRemovesMessage() throws Exception { public void testQueueAckRemovesMessage() throws Exception {
@ -1499,10 +1499,10 @@ public class BrokerTest extends BrokerTestSupport {
addCombinationValues("destination", new Object[] {new ActiveMQTopic("TEST_TOPIC"), addCombinationValues("destination", new Object[] {new ActiveMQTopic("TEST_TOPIC"),
new ActiveMQQueue("TEST_QUEUE")}); new ActiveMQQueue("TEST_QUEUE")});
addCombinationValues("destinationType", addCombinationValues("destinationType",
new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), new Object[] {ActiveMQDestination.QUEUE_TYPE,
Byte.valueOf(ActiveMQDestination.TOPIC_TYPE), ActiveMQDestination.TOPIC_TYPE,
Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE), ActiveMQDestination.TEMP_QUEUE_TYPE,
Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)}); ActiveMQDestination.TEMP_TOPIC_TYPE});
} }
public void testSelectorSkipsMessages() throws Exception { public void testSelectorSkipsMessages() throws Exception {
@ -1540,13 +1540,13 @@ public class BrokerTest extends BrokerTestSupport {
} }
public void initCombosForTestAddConsumerThenSend() { public void initCombosForTestAddConsumerThenSend() {
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), addCombinationValues("deliveryMode", new Object[] {DeliveryMode.NON_PERSISTENT,
Integer.valueOf(DeliveryMode.PERSISTENT)}); DeliveryMode.PERSISTENT});
addCombinationValues("destinationType", addCombinationValues("destinationType",
new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), new Object[] {ActiveMQDestination.QUEUE_TYPE,
Byte.valueOf(ActiveMQDestination.TOPIC_TYPE), ActiveMQDestination.TOPIC_TYPE,
Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE), ActiveMQDestination.TEMP_QUEUE_TYPE,
Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)}); ActiveMQDestination.TEMP_TOPIC_TYPE});
} }
public void testAddConsumerThenSend() throws Exception { public void testAddConsumerThenSend() throws Exception {
@ -1573,13 +1573,13 @@ public class BrokerTest extends BrokerTestSupport {
} }
public void initCombosForTestConsumerPrefetchAtOne() { public void initCombosForTestConsumerPrefetchAtOne() {
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), addCombinationValues("deliveryMode", new Object[] {DeliveryMode.NON_PERSISTENT,
Integer.valueOf(DeliveryMode.PERSISTENT)}); DeliveryMode.PERSISTENT});
addCombinationValues("destinationType", addCombinationValues("destinationType",
new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), new Object[] {ActiveMQDestination.QUEUE_TYPE,
Byte.valueOf(ActiveMQDestination.TOPIC_TYPE), ActiveMQDestination.TOPIC_TYPE,
Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE), ActiveMQDestination.TEMP_QUEUE_TYPE,
Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)}); ActiveMQDestination.TEMP_TOPIC_TYPE});
} }
public void testConsumerPrefetchAtOne() throws Exception { public void testConsumerPrefetchAtOne() throws Exception {
@ -1611,13 +1611,13 @@ public class BrokerTest extends BrokerTestSupport {
} }
public void initCombosForTestConsumerPrefetchAtTwo() { public void initCombosForTestConsumerPrefetchAtTwo() {
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), addCombinationValues("deliveryMode", new Object[] {DeliveryMode.NON_PERSISTENT,
Integer.valueOf(DeliveryMode.PERSISTENT)}); DeliveryMode.PERSISTENT});
addCombinationValues("destinationType", addCombinationValues("destinationType",
new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), new Object[] {ActiveMQDestination.QUEUE_TYPE,
Byte.valueOf(ActiveMQDestination.TOPIC_TYPE), ActiveMQDestination.TOPIC_TYPE,
Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE), ActiveMQDestination.TEMP_QUEUE_TYPE,
Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)}); ActiveMQDestination.TEMP_TOPIC_TYPE});
} }
public void testConsumerPrefetchAtTwo() throws Exception { public void testConsumerPrefetchAtTwo() throws Exception {
@ -1652,13 +1652,13 @@ public class BrokerTest extends BrokerTestSupport {
} }
public void initCombosForTestConsumerPrefetchAndDeliveredAck() { public void initCombosForTestConsumerPrefetchAndDeliveredAck() {
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), addCombinationValues("deliveryMode", new Object[] {DeliveryMode.NON_PERSISTENT,
Integer.valueOf(DeliveryMode.PERSISTENT)}); DeliveryMode.PERSISTENT});
addCombinationValues("destinationType", addCombinationValues("destinationType",
new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), new Object[] {ActiveMQDestination.QUEUE_TYPE,
Byte.valueOf(ActiveMQDestination.TOPIC_TYPE), ActiveMQDestination.TOPIC_TYPE,
Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE), ActiveMQDestination.TEMP_QUEUE_TYPE,
Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)}); ActiveMQDestination.TEMP_TOPIC_TYPE});
} }
public void testConsumerPrefetchAndDeliveredAck() throws Exception { public void testConsumerPrefetchAndDeliveredAck() throws Exception {

View File

@ -48,9 +48,9 @@ public class MessageExpirationTest extends BrokerTestSupport {
} }
public void initCombosForTestMessagesWaitingForUssageDecreaseExpire() { public void initCombosForTestMessagesWaitingForUssageDecreaseExpire() {
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.PERSISTENT)}); addCombinationValues("deliveryMode", new Object[] {DeliveryMode.NON_PERSISTENT, DeliveryMode.PERSISTENT});
addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE), addCombinationValues("destinationType", new Object[] {ActiveMQDestination.TEMP_QUEUE_TYPE, ActiveMQDestination.TEMP_TOPIC_TYPE,
Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE)}); ActiveMQDestination.QUEUE_TYPE, ActiveMQDestination.TOPIC_TYPE});
} }
@Override @Override
@ -146,9 +146,9 @@ public class MessageExpirationTest extends BrokerTestSupport {
} }
public void initCombosForTestMessagesInLongTransactionExpire() { public void initCombosForTestMessagesInLongTransactionExpire() {
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.PERSISTENT), Integer.valueOf(DeliveryMode.NON_PERSISTENT)}); addCombinationValues("deliveryMode", new Object[] {DeliveryMode.PERSISTENT, DeliveryMode.NON_PERSISTENT});
addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE), addCombinationValues("destinationType", new Object[] {ActiveMQDestination.QUEUE_TYPE, ActiveMQDestination.TOPIC_TYPE,
Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)}); ActiveMQDestination.TEMP_QUEUE_TYPE, ActiveMQDestination.TEMP_TOPIC_TYPE});
} }
public void testMessagesInLongTransactionExpire() throws Exception { public void testMessagesInLongTransactionExpire() throws Exception {
@ -210,9 +210,9 @@ public class MessageExpirationTest extends BrokerTestSupport {
} }
public void initCombosForTestMessagesInSubscriptionPendingListExpire() { public void initCombosForTestMessagesInSubscriptionPendingListExpire() {
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.PERSISTENT)}); addCombinationValues("deliveryMode", new Object[] {DeliveryMode.NON_PERSISTENT, DeliveryMode.PERSISTENT});
addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE), addCombinationValues("destinationType", new Object[] {ActiveMQDestination.QUEUE_TYPE, ActiveMQDestination.TOPIC_TYPE,
Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)}); ActiveMQDestination.TEMP_QUEUE_TYPE, ActiveMQDestination.TEMP_TOPIC_TYPE});
} }
public void testMessagesInSubscriptionPendingListExpire() throws Exception { public void testMessagesInSubscriptionPendingListExpire() throws Exception {

View File

@ -47,8 +47,8 @@ public class DestinationRemoveRestartTest extends CombinationTestSupport {
} }
public void initCombosForTestCheckDestinationRemoveActionAfterRestart() { public void initCombosForTestCheckDestinationRemoveActionAfterRestart() {
addCombinationValues("destinationType", new Object[]{Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), addCombinationValues("destinationType", new Object[]{ActiveMQDestination.QUEUE_TYPE,
Byte.valueOf(ActiveMQDestination.TOPIC_TYPE)}); ActiveMQDestination.TOPIC_TYPE});
} }
public void testCheckDestinationRemoveActionAfterRestart() throws Exception { public void testCheckDestinationRemoveActionAfterRestart() throws Exception {

View File

@ -87,10 +87,10 @@ public abstract class CursorSupport extends CombinationTestSupport {
public void initCombosForTestSendWhilstConsume() { public void initCombosForTestSendWhilstConsume() {
addCombinationValues("MESSAGE_COUNT", new Object[] {Integer.valueOf(400), addCombinationValues("MESSAGE_COUNT", new Object[] {400,
Integer.valueOf(500)}); 500});
addCombinationValues("PREFETCH_SIZE", new Object[] {Integer.valueOf(100), addCombinationValues("PREFETCH_SIZE", new Object[] {100,
Integer.valueOf(50)}); 50});
} }
public void testSendWhilstConsume() throws Exception { public void testSendWhilstConsume() throws Exception {

View File

@ -91,7 +91,7 @@ public class VirtualDestPerfTest {
executor.awaitTermination(5, TimeUnit.MINUTES); executor.awaitTermination(5, TimeUnit.MINUTES);
long endTime = System.currentTimeMillis(); long endTime = System.currentTimeMillis();
long seconds = (endTime - startTime) / 1000; long seconds = (endTime - startTime) / 1000;
LOG.info("For numThreads {} duration {}", numThreads.intValue(), seconds); LOG.info("For numThreads {} duration {}", numThreads, seconds);
results.put(numThreads, seconds); results.put(numThreads, seconds);
LOG.info("Broker got {} messages", brokerService.getAdminView().getTotalEnqueueCount()); LOG.info("Broker got {} messages", brokerService.getAdminView().getTotalEnqueueCount());
} }

View File

@ -46,7 +46,7 @@ public class VirtualTopicPubSubTest extends EmbeddedBrokerTestSupport {
} }
public void initCombosForTestVirtualTopicCreation() { public void initCombosForTestVirtualTopicCreation() {
addCombinationValues("ackMode", new Object[] {Integer.valueOf(Session.AUTO_ACKNOWLEDGE), Integer.valueOf(Session.CLIENT_ACKNOWLEDGE) }); addCombinationValues("ackMode", new Object[] {Session.AUTO_ACKNOWLEDGE, Session.CLIENT_ACKNOWLEDGE});
} }
private boolean doneTwice = false; private boolean doneTwice = false;

View File

@ -53,7 +53,7 @@ public class AMQ1282 extends TestCase {
public void testUnmappedBooleanMessage() throws JMSException { public void testUnmappedBooleanMessage() throws JMSException {
Object expected; Object expected;
try { try {
expected = Boolean.valueOf(null); expected = (Boolean) null;
} catch (Exception ex) { } catch (Exception ex) {
expected = ex; expected = ex;
} }
@ -68,7 +68,7 @@ public class AMQ1282 extends TestCase {
public void testUnmappedIntegerMessage() throws JMSException { public void testUnmappedIntegerMessage() throws JMSException {
Object expected; Object expected;
try { try {
expected = Integer.valueOf(null); expected = (Integer) null;
} catch (Exception ex) { } catch (Exception ex) {
expected = ex; expected = ex;
} }
@ -84,7 +84,7 @@ public class AMQ1282 extends TestCase {
public void testUnmappedShortMessage() throws JMSException { public void testUnmappedShortMessage() throws JMSException {
Object expected; Object expected;
try { try {
expected = Short.valueOf(null); expected = (Short) null;
} catch (Exception ex) { } catch (Exception ex) {
expected = ex; expected = ex;
} }
@ -100,7 +100,7 @@ public class AMQ1282 extends TestCase {
public void testUnmappedLongMessage() throws JMSException { public void testUnmappedLongMessage() throws JMSException {
Object expected; Object expected;
try { try {
expected = Long.valueOf(null); expected = (Long) null;
} catch (Exception ex) { } catch (Exception ex) {
expected = ex; expected = ex;
} }
@ -141,7 +141,7 @@ public class AMQ1282 extends TestCase {
public void testUnmappedByteMessage() throws JMSException { public void testUnmappedByteMessage() throws JMSException {
Object expected; Object expected;
try { try {
expected = Byte.valueOf(null); expected = (Byte) null;
} catch (Exception ex) { } catch (Exception ex) {
expected = ex; expected = ex;
} }
@ -157,7 +157,7 @@ public class AMQ1282 extends TestCase {
public void testUnmappedDoubleMessage() throws JMSException { public void testUnmappedDoubleMessage() throws JMSException {
Object expected; Object expected;
try { try {
expected = Double.valueOf(null); expected = (Double) null;
} catch (Exception ex) { } catch (Exception ex) {
expected = ex; expected = ex;
} }
@ -173,7 +173,7 @@ public class AMQ1282 extends TestCase {
public void testUnmappedFloatMessage() throws JMSException { public void testUnmappedFloatMessage() throws JMSException {
Object expected; Object expected;
try { try {
expected = Float.valueOf(null); expected = (Float) null;
} catch (Exception ex) { } catch (Exception ex) {
expected = ex; expected = ex;
} }

View File

@ -132,7 +132,7 @@ public class AMQ4531Test extends TestCase {
} }
private long openFileDescriptorCount() throws Exception { private long openFileDescriptorCount() throws Exception {
return ((Long) mbeanServer.getAttribute(new ObjectName("java.lang:type=OperatingSystem"), "OpenFileDescriptorCount")).longValue(); return (Long) mbeanServer.getAttribute(new ObjectName("java.lang:type=OperatingSystem"), "OpenFileDescriptorCount");
} }
private String getStack(Throwable aThrowable) { private String getStack(Throwable aThrowable) {

View File

@ -239,7 +239,7 @@ public class AMQ5212Test {
super.send(producerExchange, messageSend); super.send(producerExchange, messageSend);
Object seq = messageSend.getProperty("seq"); Object seq = messageSend.getProperty("seq");
if (seq instanceof Integer) { if (seq instanceof Integer) {
if ( ((Integer) seq).intValue() %200 == 0 && producerExchange.getConnectionContext().getConnection() != null) { if ((Integer) seq %200 == 0 && producerExchange.getConnectionContext().getConnection() != null) {
producerExchange.getConnectionContext().setDontSendReponse(true); producerExchange.getConnectionContext().setDontSendReponse(true);
producerExchange.getConnectionContext().getConnection().serviceException(new IOException("force reconnect")); producerExchange.getConnectionContext().getConnection().serviceException(new IOException("force reconnect"));
} }

View File

@ -311,9 +311,9 @@ public class DurableConsumerTest extends CombinationTestSupport{
public void testPrefetchViaBrokerConfig() throws Exception { public void testPrefetchViaBrokerConfig() throws Exception {
Integer prefetchVal = Integer.valueOf(150); Integer prefetchVal = 150;
PolicyEntry policyEntry = new PolicyEntry(); PolicyEntry policyEntry = new PolicyEntry();
policyEntry.setDurableTopicPrefetch(prefetchVal.intValue()); policyEntry.setDurableTopicPrefetch(prefetchVal);
policyEntry.setPrioritizedMessages(true); policyEntry.setPrioritizedMessages(true);
PolicyMap policyMap = new PolicyMap(); PolicyMap policyMap = new PolicyMap();
policyMap.setDefaultEntry(policyEntry); policyMap.setDefaultEntry(policyEntry);

View File

@ -235,13 +235,13 @@ public class ActiveMQBytesMessageTest extends TestCase {
try { try {
msg.writeObject("fred"); msg.writeObject("fred");
msg.writeObject(Boolean.TRUE); msg.writeObject(Boolean.TRUE);
msg.writeObject(Character.valueOf('q')); msg.writeObject('q');
msg.writeObject(Byte.valueOf((byte) 1)); msg.writeObject((byte) 1);
msg.writeObject(Short.valueOf((short) 3)); msg.writeObject((short) 3);
msg.writeObject(Integer.valueOf(3)); msg.writeObject(3);
msg.writeObject(Long.valueOf(300L)); msg.writeObject(300L);
msg.writeObject(Float.valueOf(3.3f)); msg.writeObject(3.3f);
msg.writeObject(Double.valueOf(3.3)); msg.writeObject(3.3);
msg.writeObject(new byte[3]); msg.writeObject(new byte[3]);
} catch (MessageFormatException mfe) { } catch (MessageFormatException mfe) {
fail("objectified primitives should be allowed"); fail("objectified primitives should be allowed");

View File

@ -208,7 +208,7 @@ public class ActiveMQMapMessageTest {
Boolean booleanValue = Boolean.TRUE; Boolean booleanValue = Boolean.TRUE;
Byte byteValue = Byte.valueOf("1"); Byte byteValue = Byte.valueOf("1");
byte[] bytesValue = new byte[3]; byte[] bytesValue = new byte[3];
Character charValue = Character.valueOf('a'); Character charValue = 'a';
Double doubleValue = Double.valueOf("1.5"); Double doubleValue = Double.valueOf("1.5");
Float floatValue = Float.valueOf("1.5"); Float floatValue = Float.valueOf("1.5");
Integer intValue = Integer.valueOf("1"); Integer intValue = Integer.valueOf("1");
@ -237,7 +237,7 @@ public class ActiveMQMapMessageTest {
assertTrue(msg.getObject("boolean") instanceof Boolean); assertTrue(msg.getObject("boolean") instanceof Boolean);
assertEquals(msg.getObject("boolean"), booleanValue); assertEquals(msg.getObject("boolean"), booleanValue);
assertEquals(msg.getBoolean("boolean"), booleanValue.booleanValue()); assertEquals(msg.getBoolean("boolean"), booleanValue);
assertTrue(msg.getObject("byte") instanceof Byte); assertTrue(msg.getObject("byte") instanceof Byte);
assertEquals(msg.getObject("byte"), byteValue); assertEquals(msg.getObject("byte"), byteValue);
assertEquals(msg.getByte("byte"), byteValue.byteValue()); assertEquals(msg.getByte("byte"), byteValue.byteValue());
@ -249,10 +249,10 @@ public class ActiveMQMapMessageTest {
assertEquals(msg.getChar("char"), charValue.charValue()); assertEquals(msg.getChar("char"), charValue.charValue());
assertTrue(msg.getObject("double") instanceof Double); assertTrue(msg.getObject("double") instanceof Double);
assertEquals(msg.getObject("double"), doubleValue); assertEquals(msg.getObject("double"), doubleValue);
assertEquals(msg.getDouble("double"), doubleValue.doubleValue(), 0); assertEquals(msg.getDouble("double"), doubleValue, 0);
assertTrue(msg.getObject("float") instanceof Float); assertTrue(msg.getObject("float") instanceof Float);
assertEquals(msg.getObject("float"), floatValue); assertEquals(msg.getObject("float"), floatValue);
assertEquals(msg.getFloat("float"), floatValue.floatValue(), 0); assertEquals(msg.getFloat("float"), floatValue, 0);
assertTrue(msg.getObject("int") instanceof Integer); assertTrue(msg.getObject("int") instanceof Integer);
assertEquals(msg.getObject("int"), intValue); assertEquals(msg.getObject("int"), intValue);
assertEquals(msg.getInt("int"), intValue.intValue()); assertEquals(msg.getInt("int"), intValue.intValue());

View File

@ -351,7 +351,7 @@ public class ActiveMQMessageTest extends TestCase {
String name = "floatProperty"; String name = "floatProperty";
msg.setFloatProperty(name, 1.3f); msg.setFloatProperty(name, 1.3f);
assertTrue(msg.getObjectProperty(name) instanceof Float); assertTrue(msg.getObjectProperty(name) instanceof Float);
assertTrue(((Float) msg.getObjectProperty(name)).floatValue() == 1.3f); assertTrue((Float) msg.getObjectProperty(name) == 1.3f);
} }
public void testSetJMSDeliveryModeProperty() throws JMSException { public void testSetJMSDeliveryModeProperty() throws JMSException {
@ -519,8 +519,8 @@ public class ActiveMQMessageTest extends TestCase {
assertEquals(((Short) properties.get("shortProperty")).shortValue(), 1); assertEquals(((Short) properties.get("shortProperty")).shortValue(), 1);
assertEquals(((Integer) properties.get("intProperty")).intValue(), 1); assertEquals(((Integer) properties.get("intProperty")).intValue(), 1);
assertEquals(((Long) properties.get("longProperty")).longValue(), 1); assertEquals(((Long) properties.get("longProperty")).longValue(), 1);
assertEquals(((Float) properties.get("floatProperty")).floatValue(), 1.1f, 0); assertEquals((Float) properties.get("floatProperty"), 1.1f, 0);
assertEquals(((Double) properties.get("doubleProperty")).doubleValue(), 1.1, 0); assertEquals((Double) properties.get("doubleProperty"), 1.1, 0);
assertEquals(((Boolean) properties.get("booleanProperty")).booleanValue(), true); assertEquals(((Boolean) properties.get("booleanProperty")).booleanValue(), true);
assertNull(properties.get("nullProperty")); assertNull(properties.get("nullProperty"));
} }
@ -751,7 +751,7 @@ public class ActiveMQMessageTest extends TestCase {
ActiveMQMessage msg = new ActiveMQMessage(); ActiveMQMessage msg = new ActiveMQMessage();
String propertyName = "property"; String propertyName = "property";
msg.setFloatProperty(propertyName, (float) 1.5); msg.setFloatProperty(propertyName, (float) 1.5);
assertEquals(((Float) msg.getObjectProperty(propertyName)).floatValue(), 1.5, 0); assertEquals((Float) msg.getObjectProperty(propertyName), 1.5, 0);
assertEquals(msg.getFloatProperty(propertyName), 1.5, 0); assertEquals(msg.getFloatProperty(propertyName), 1.5, 0);
assertEquals(msg.getDoubleProperty(propertyName), 1.5, 0); assertEquals(msg.getDoubleProperty(propertyName), 1.5, 0);
assertEquals(msg.getStringProperty(propertyName), "1.5"); assertEquals(msg.getStringProperty(propertyName), "1.5");
@ -786,7 +786,7 @@ public class ActiveMQMessageTest extends TestCase {
ActiveMQMessage msg = new ActiveMQMessage(); ActiveMQMessage msg = new ActiveMQMessage();
String propertyName = "property"; String propertyName = "property";
msg.setDoubleProperty(propertyName, 1.5); msg.setDoubleProperty(propertyName, 1.5);
assertEquals(((Double) msg.getObjectProperty(propertyName)).doubleValue(), 1.5, 0); assertEquals((Double) msg.getObjectProperty(propertyName), 1.5, 0);
assertEquals(msg.getDoubleProperty(propertyName), 1.5, 0); assertEquals(msg.getDoubleProperty(propertyName), 1.5, 0);
assertEquals(msg.getStringProperty(propertyName), "1.5"); assertEquals(msg.getStringProperty(propertyName), "1.5");
try { try {

View File

@ -679,43 +679,43 @@ public class ActiveMQStreamMessageTest {
byte testByte = (byte)2; byte testByte = (byte)2;
msg.writeByte(testByte); msg.writeByte(testByte);
msg.reset(); msg.reset();
assertTrue(((Byte)msg.readObject()).byteValue() == testByte); assertTrue((Byte) msg.readObject() == testByte);
msg.clearBody(); msg.clearBody();
short testShort = 3; short testShort = 3;
msg.writeShort(testShort); msg.writeShort(testShort);
msg.reset(); msg.reset();
assertTrue(((Short)msg.readObject()).shortValue() == testShort); assertTrue((Short) msg.readObject() == testShort);
msg.clearBody(); msg.clearBody();
int testInt = 4; int testInt = 4;
msg.writeInt(testInt); msg.writeInt(testInt);
msg.reset(); msg.reset();
assertTrue(((Integer)msg.readObject()).intValue() == testInt); assertTrue((Integer) msg.readObject() == testInt);
msg.clearBody(); msg.clearBody();
long testLong = 6L; long testLong = 6L;
msg.writeLong(testLong); msg.writeLong(testLong);
msg.reset(); msg.reset();
assertTrue(((Long)msg.readObject()).longValue() == testLong); assertTrue((Long) msg.readObject() == testLong);
msg.clearBody(); msg.clearBody();
float testFloat = 6.6f; float testFloat = 6.6f;
msg.writeFloat(testFloat); msg.writeFloat(testFloat);
msg.reset(); msg.reset();
assertTrue(((Float)msg.readObject()).floatValue() == testFloat); assertTrue((Float) msg.readObject() == testFloat);
msg.clearBody(); msg.clearBody();
double testDouble = 7.7d; double testDouble = 7.7d;
msg.writeDouble(testDouble); msg.writeDouble(testDouble);
msg.reset(); msg.reset();
assertTrue(((Double)msg.readObject()).doubleValue() == testDouble); assertTrue((Double) msg.readObject() == testDouble);
msg.clearBody(); msg.clearBody();
char testChar = 'z'; char testChar = 'z';
msg.writeChar(testChar); msg.writeChar(testChar);
msg.reset(); msg.reset();
assertTrue(((Character)msg.readObject()).charValue() == testChar); assertTrue((Character) msg.readObject() == testChar);
msg.clearBody(); msg.clearBody();
byte[] data = new byte[50]; byte[] data = new byte[50];
@ -732,7 +732,7 @@ public class ActiveMQStreamMessageTest {
msg.clearBody(); msg.clearBody();
msg.writeBoolean(true); msg.writeBoolean(true);
msg.reset(); msg.reset();
assertTrue(((Boolean)msg.readObject()).booleanValue()); assertTrue((Boolean) msg.readObject());
} catch (JMSException jmsEx) { } catch (JMSException jmsEx) {
jmsEx.printStackTrace(); jmsEx.printStackTrace();
assertTrue(false); assertTrue(false);
@ -743,10 +743,10 @@ public class ActiveMQStreamMessageTest {
public void testClearBody() throws JMSException { public void testClearBody() throws JMSException {
ActiveMQStreamMessage streamMessage = new ActiveMQStreamMessage(); ActiveMQStreamMessage streamMessage = new ActiveMQStreamMessage();
try { try {
streamMessage.writeObject(Long.valueOf(2)); streamMessage.writeObject(2L);
streamMessage.clearBody(); streamMessage.clearBody();
assertFalse(streamMessage.isReadOnlyBody()); assertFalse(streamMessage.isReadOnlyBody());
streamMessage.writeObject(Long.valueOf(2)); streamMessage.writeObject(2L);
streamMessage.readObject(); streamMessage.readObject();
fail("should throw exception"); fail("should throw exception");
} catch (MessageNotReadableException mnwe) { } catch (MessageNotReadableException mnwe) {
@ -967,14 +967,14 @@ public class ActiveMQStreamMessageTest {
ActiveMQStreamMessage message = new ActiveMQStreamMessage(); ActiveMQStreamMessage message = new ActiveMQStreamMessage();
message.clearBody(); message.clearBody();
message.writeObject("test"); message.writeObject("test");
message.writeObject(Character.valueOf('a')); message.writeObject('a');
message.writeObject(Boolean.FALSE); message.writeObject(Boolean.FALSE);
message.writeObject(Byte.valueOf((byte) 2)); message.writeObject((byte) 2);
message.writeObject(Short.valueOf((short) 2)); message.writeObject((short) 2);
message.writeObject(Integer.valueOf(2)); message.writeObject(2);
message.writeObject(Long.valueOf(2l)); message.writeObject(2L);
message.writeObject(Float.valueOf(2.0f)); message.writeObject(2.0f);
message.writeObject(Double.valueOf(2.0d)); message.writeObject(2.0d);
} catch(Exception e) { } catch(Exception e) {
fail(e.getMessage()); fail(e.getMessage());
} }

View File

@ -76,7 +76,7 @@ public final class SimpleProducer {
destinationName = args[0]; destinationName = args[0];
LOG.info("Destination name is " + destinationName); LOG.info("Destination name is " + destinationName);
if (args.length == 2) { if (args.length == 2) {
numMsgs = (Integer.valueOf(args[1])).intValue(); numMsgs = new Integer(args[1]);
} else { } else {
numMsgs = 1; numMsgs = 1;
} }

View File

@ -74,7 +74,7 @@ public final class SimpleQueueSender {
queueName = args[0]; queueName = args[0];
LOG.info("Queue name is " + queueName); LOG.info("Queue name is " + queueName);
if (args.length == 2) { if (args.length == 2) {
numMsgs = (Integer.valueOf(args[1])).intValue(); numMsgs = (Integer.valueOf(args[1]));
} else { } else {
numMsgs = 1; numMsgs = 1;
} }

View File

@ -28,7 +28,7 @@ public class ActiveMQWASInitialContextFactoryTest extends JNDITestSupport {
originalEnvironment.put("java.naming.connectionFactoryNames", "ConnectionFactory"); originalEnvironment.put("java.naming.connectionFactoryNames", "ConnectionFactory");
originalEnvironment.put("java.naming.topic.jms.systemMessageTopic", "jms/systemMessageTopic"); originalEnvironment.put("java.naming.topic.jms.systemMessageTopic", "jms/systemMessageTopic");
originalEnvironment.put(Context.PROVIDER_URL, "tcp://localhost:61616;tcp://localhost:61617"); originalEnvironment.put(Context.PROVIDER_URL, "tcp://localhost:61616;tcp://localhost:61617");
originalEnvironment.put("non-string", Integer.valueOf(43)); originalEnvironment.put("non-string", 43);
originalEnvironment.put("java.naming.queue", "jms/systemMessageQueue"); originalEnvironment.put("java.naming.queue", "jms/systemMessageQueue");
Hashtable<Object, Object> transformedEnvironment = new ActiveMQWASInitialContextFactory().transformEnvironment(originalEnvironment); Hashtable<Object, Object> transformedEnvironment = new ActiveMQWASInitialContextFactory().transformEnvironment(originalEnvironment);

View File

@ -39,8 +39,8 @@ public class DemandForwardingBridgeTest extends NetworkTestSupport {
private DemandForwardingBridge bridge; private DemandForwardingBridge bridge;
public void initCombosForTestSendThenAddConsumer() { public void initCombosForTestSendThenAddConsumer() {
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.PERSISTENT)}); addCombinationValues("deliveryMode", new Object[] {DeliveryMode.NON_PERSISTENT, DeliveryMode.PERSISTENT});
addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE)}); addCombinationValues("destinationType", new Object[] {ActiveMQDestination.QUEUE_TYPE});
} }
public void testSendThenAddConsumer() throws Exception { public void testSendThenAddConsumer() throws Exception {
@ -116,8 +116,8 @@ public class DemandForwardingBridgeTest extends NetworkTestSupport {
} }
public void initCombosForTestAddConsumerThenSend() { public void initCombosForTestAddConsumerThenSend() {
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.PERSISTENT)}); addCombinationValues("deliveryMode", new Object[] {DeliveryMode.NON_PERSISTENT, DeliveryMode.PERSISTENT});
addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE)}); addCombinationValues("destinationType", new Object[] {ActiveMQDestination.QUEUE_TYPE, ActiveMQDestination.TOPIC_TYPE});
} }
public void testAddConsumerThenSend() throws Exception { public void testAddConsumerThenSend() throws Exception {

View File

@ -37,10 +37,10 @@ public class ForwardingBridgeTest extends NetworkTestSupport {
private ForwardingBridge bridge; private ForwardingBridge bridge;
public void initCombosForTestForwardMessageCompressed() { public void initCombosForTestForwardMessageCompressed() {
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), addCombinationValues("deliveryMode", new Object[] {DeliveryMode.NON_PERSISTENT,
Integer.valueOf(DeliveryMode.PERSISTENT)}); DeliveryMode.PERSISTENT});
addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), addCombinationValues("destinationType", new Object[] {ActiveMQDestination.QUEUE_TYPE,
Byte.valueOf(ActiveMQDestination.TOPIC_TYPE)}); ActiveMQDestination.TOPIC_TYPE});
} }
public void testForwardMessageCompressed() throws Exception { public void testForwardMessageCompressed() throws Exception {
@ -87,10 +87,10 @@ public class ForwardingBridgeTest extends NetworkTestSupport {
} }
public void initCombosForTestAddConsumerThenSend() { public void initCombosForTestAddConsumerThenSend() {
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), addCombinationValues("deliveryMode", new Object[] {DeliveryMode.NON_PERSISTENT,
Integer.valueOf(DeliveryMode.PERSISTENT)}); DeliveryMode.PERSISTENT});
addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), addCombinationValues("destinationType", new Object[] {ActiveMQDestination.QUEUE_TYPE,
Byte.valueOf(ActiveMQDestination.TOPIC_TYPE)}); ActiveMQDestination.TOPIC_TYPE});
} }
public void testAddConsumerThenSend() throws Exception { public void testAddConsumerThenSend() throws Exception {

View File

@ -47,8 +47,8 @@ public class ProxyConnectorTest extends ProxyTestSupport {
} }
public void initCombosForTestSendAndConsume() { public void initCombosForTestSendAndConsume() {
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.PERSISTENT)}); addCombinationValues("deliveryMode", new Object[] {DeliveryMode.NON_PERSISTENT, DeliveryMode.PERSISTENT});
addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.TOPIC_TYPE)}); addCombinationValues("destinationType", new Object[] {ActiveMQDestination.TOPIC_TYPE});
} }
public void testSendAndConsume() throws Exception { public void testSendAndConsume() throws Exception {

View File

@ -200,7 +200,7 @@ abstract public class MessagePriorityTest extends CombinationTestSupport {
public void initCombosForTestQueues() { public void initCombosForTestQueues() {
addCombinationValues("useCache", new Object[] {Boolean.TRUE, Boolean.FALSE}); addCombinationValues("useCache", new Object[] {Boolean.TRUE, Boolean.FALSE});
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.PERSISTENT)}); addCombinationValues("deliveryMode", new Object[] {DeliveryMode.NON_PERSISTENT, DeliveryMode.PERSISTENT});
} }
public void testQueues() throws Exception { public void testQueues() throws Exception {
@ -232,7 +232,7 @@ abstract public class MessagePriorityTest extends CombinationTestSupport {
} }
public void initCombosForTestDurableSubs() { public void initCombosForTestDurableSubs() {
addCombinationValues("prefetchVal", new Object[] {Integer.valueOf(1000), Integer.valueOf(MSG_NUM/4)}); addCombinationValues("prefetchVal", new Object[] {1000, MSG_NUM / 4});
} }
public void testDurableSubs() throws Exception { public void testDurableSubs() throws Exception {
@ -281,7 +281,7 @@ abstract public class MessagePriorityTest extends CombinationTestSupport {
} }
public void initCombosForTestDurableSubsReconnect() { public void initCombosForTestDurableSubsReconnect() {
addCombinationValues("prefetchVal", new Object[] {Integer.valueOf(1000), Integer.valueOf(MSG_NUM/2)}); addCombinationValues("prefetchVal", new Object[] {1000, MSG_NUM / 2});
// REVISIT = is dispatchAsync = true a problem or is it just the test? // REVISIT = is dispatchAsync = true a problem or is it just the test?
addCombinationValues("dispatchAsync", new Object[] {Boolean.FALSE}); addCombinationValues("dispatchAsync", new Object[] {Boolean.FALSE});
addCombinationValues("useCache", new Object[] {Boolean.TRUE, Boolean.FALSE}); addCombinationValues("useCache", new Object[] {Boolean.TRUE, Boolean.FALSE});
@ -571,7 +571,7 @@ abstract public class MessagePriorityTest extends CombinationTestSupport {
addCombinationValues("useCache", new Object[] {Boolean.FALSE}); addCombinationValues("useCache", new Object[] {Boolean.FALSE});
// expiry processing can fill the cursor with a snapshot of the producer // expiry processing can fill the cursor with a snapshot of the producer
// priority, before producers are complete // priority, before producers are complete
addCombinationValues("expireMessagePeriod", new Object[] {Integer.valueOf(0)}); addCombinationValues("expireMessagePeriod", new Object[] {0});
} }
public void testQueueBacklog() throws Exception { public void testQueueBacklog() throws Exception {
@ -611,7 +611,7 @@ abstract public class MessagePriorityTest extends CombinationTestSupport {
addCombinationValues("useCache", new Object[] {Boolean.FALSE}); addCombinationValues("useCache", new Object[] {Boolean.FALSE});
// expiry processing can fill the cursor with a snapshot of the producer // expiry processing can fill the cursor with a snapshot of the producer
// priority, before producers are complete // priority, before producers are complete
addCombinationValues("expireMessagePeriod", new Object[] {Integer.valueOf(0)}); addCombinationValues("expireMessagePeriod", new Object[] {0});
} }
public void testLowThenHighBatch() throws Exception { public void testLowThenHighBatch() throws Exception {
@ -724,7 +724,7 @@ abstract public class MessagePriorityTest extends CombinationTestSupport {
addCombinationValues("useCache", new Object[] {Boolean.FALSE, Boolean.TRUE}); addCombinationValues("useCache", new Object[] {Boolean.FALSE, Boolean.TRUE});
// expiry processing can fill the cursor with a snapshot of the producer // expiry processing can fill the cursor with a snapshot of the producer
// priority, before producers are complete // priority, before producers are complete
addCombinationValues("expireMessagePeriod", new Object[] {Integer.valueOf(0)}); addCombinationValues("expireMessagePeriod", new Object[] {0});
} }
public void testEveryXHi() throws Exception { public void testEveryXHi() throws Exception {

View File

@ -168,7 +168,7 @@ public class JDBCMessagePriorityTest extends MessagePriorityTest {
} }
public void initCombosForTestConcurrentRate() { public void initCombosForTestConcurrentRate() {
addCombinationValues("prefetchVal", new Object[]{Integer.valueOf(1), Integer.valueOf(500)}); addCombinationValues("prefetchVal", new Object[]{1, 500});
} }
public void testConcurrentRate() throws Exception { public void testConcurrentRate() throws Exception {

View File

@ -45,8 +45,8 @@ public class NestedMapAndListPropertyTest extends JmsTopicSendReceiveWithTwoConn
Map map = (Map)message.getObjectProperty("mapField"); Map map = (Map)message.getObjectProperty("mapField");
assertNotNull(map); assertNotNull(map);
assertEquals("mapField.a", "foo", map.get("a")); assertEquals("mapField.a", "foo", map.get("a"));
assertEquals("mapField.b", Integer.valueOf(23), map.get("b")); assertEquals("mapField.b", 23, map.get("b"));
assertEquals("mapField.c", Long.valueOf(45), map.get("c")); assertEquals("mapField.c", 45L, map.get("c"));
value = map.get("d"); value = map.get("d");
assertTrue("mapField.d should be a Map", value instanceof Map); assertTrue("mapField.d should be a Map", value instanceof Map);
@ -82,8 +82,8 @@ public class NestedMapAndListPropertyTest extends JmsTopicSendReceiveWithTwoConn
Map<String, Object> nestedMap = new HashMap<String, Object>(); Map<String, Object> nestedMap = new HashMap<String, Object>();
nestedMap.put("a", "foo"); nestedMap.put("a", "foo");
nestedMap.put("b", Integer.valueOf(23)); nestedMap.put("b", 23);
nestedMap.put("c", Long.valueOf(45)); nestedMap.put("c", 45L);
nestedMap.put("d", grandChildMap); nestedMap.put("d", grandChildMap);
answer.setObjectProperty("mapField", nestedMap); answer.setObjectProperty("mapField", nestedMap);

View File

@ -49,8 +49,8 @@ public class NestedMapMessageTest extends JmsTopicSendReceiveWithTwoConnectionsA
Map map = (Map)mapMessage.getObject("mapField"); Map map = (Map)mapMessage.getObject("mapField");
assertNotNull(map); assertNotNull(map);
assertEquals("mapField.a", "foo", map.get("a")); assertEquals("mapField.a", "foo", map.get("a"));
assertEquals("mapField.b", Integer.valueOf(23), map.get("b")); assertEquals("mapField.b", 23, map.get("b"));
assertEquals("mapField.c", Long.valueOf(45), map.get("c")); assertEquals("mapField.c", 45L, map.get("c"));
value = map.get("d"); value = map.get("d");
assertTrue("mapField.d should be a Map", value instanceof Map); assertTrue("mapField.d should be a Map", value instanceof Map);
@ -85,8 +85,8 @@ public class NestedMapMessageTest extends JmsTopicSendReceiveWithTwoConnectionsA
Map<String, Object> nestedMap = new HashMap<String, Object>(); Map<String, Object> nestedMap = new HashMap<String, Object>();
nestedMap.put("a", "foo"); nestedMap.put("a", "foo");
nestedMap.put("b", Integer.valueOf(23)); nestedMap.put("b", 23);
nestedMap.put("c", Long.valueOf(45)); nestedMap.put("c", 45L);
nestedMap.put("d", grandChildMap); nestedMap.put("d", grandChildMap);
answer.setObject("mapField", nestedMap); answer.setObject("mapField", nestedMap);

View File

@ -49,7 +49,7 @@ public class FailoverTransportBrokerTest extends NetworkTestSupport {
public int deliveryMode; public int deliveryMode;
public void initCombosForTestPublisherFailsOver() { public void initCombosForTestPublisherFailsOver() {
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.PERSISTENT)}); addCombinationValues("deliveryMode", new Object[] {DeliveryMode.NON_PERSISTENT, DeliveryMode.PERSISTENT});
addCombinationValues("destination", new Object[] {new ActiveMQQueue("TEST"), new ActiveMQTopic("TEST")}); addCombinationValues("destination", new Object[] {new ActiveMQQueue("TEST"), new ActiveMQTopic("TEST")});
} }

View File

@ -56,7 +56,7 @@ public class FanoutTransportBrokerTest extends NetworkTestSupport {
} }
public void initCombosForTestPublisherFansout() { public void initCombosForTestPublisherFansout() {
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.PERSISTENT)}); addCombinationValues("deliveryMode", new Object[] {DeliveryMode.NON_PERSISTENT, DeliveryMode.PERSISTENT});
addCombinationValues("destination", new Object[] {new ActiveMQTopic("TEST"), new ActiveMQQueue("TEST")}); addCombinationValues("destination", new Object[] {new ActiveMQTopic("TEST"), new ActiveMQQueue("TEST")});
} }
@ -102,7 +102,7 @@ public class FanoutTransportBrokerTest extends NetworkTestSupport {
} }
public void initCombosForTestPublisherWaitsForServerToBeUp() { public void initCombosForTestPublisherWaitsForServerToBeUp() {
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.PERSISTENT)}); addCombinationValues("deliveryMode", new Object[] {DeliveryMode.NON_PERSISTENT, DeliveryMode.PERSISTENT});
addCombinationValues("destination", new Object[] {new ActiveMQTopic("TEST")}); addCombinationValues("destination", new Object[] {new ActiveMQTopic("TEST")});
} }

View File

@ -246,8 +246,8 @@ public class InactivityMonitorTest extends CombinationTestSupport implements Tra
*/ */
public void initCombosForTestNoClientHangWithServerBlock() throws Exception { public void initCombosForTestNoClientHangWithServerBlock() throws Exception {
addCombinationValues("clientInactivityLimit", new Object[] {Long.valueOf(1000)}); addCombinationValues("clientInactivityLimit", new Object[] {1000L});
addCombinationValues("serverInactivityLimit", new Object[] {Long.valueOf(1000)}); addCombinationValues("serverInactivityLimit", new Object[] {1000L});
addCombinationValues("serverRunOnCommand", new Object[] {new Runnable() { addCombinationValues("serverRunOnCommand", new Object[] {new Runnable() {
@Override @Override
public void run() { public void run() {

Some files were not shown because too many files have changed in this diff Show More