@Override public Integer getIntProperty(final SimpleString key) throws ActiveMQPropertyConversionException { checkProperties(); return properties.getIntProperty(key); }
@Override public int getIntProperty(String name) { try { return properties.getIntProperty(new SimpleString(name)); } catch (ActiveMQPropertyConversionException ce) { throw new MessageFormatRuntimeException(ce.getMessage()); } }
@Override public int getInt(final String name) throws JMSException { try { return map.getIntProperty(new SimpleString(name)); } catch (ActiveMQPropertyConversionException e) { throw new MessageFormatException(e.getMessage()); } }
@Override public Integer getIntProperty(final SimpleString key) throws ActiveMQPropertyConversionException { checkProperties(); return properties.getIntProperty(key); }
@Override public Integer getIntProperty(final SimpleString key) throws ActiveMQPropertyConversionException { checkProperties(); return properties.getIntProperty(key); }
@Override public Integer getIntProperty(final SimpleString key) throws ActiveMQPropertyConversionException { return getProperties().getIntProperty(key); }
@Override public Integer getIntProperty(final SimpleString key) throws ActiveMQPropertyConversionException { return getProperties().getIntProperty(key); }
@Override public Integer getIntProperty(final SimpleString key) throws ActiveMQPropertyConversionException { checkProperties(); return properties.getIntProperty(key); }
@Override public Integer getIntProperty(final SimpleString key) throws ActiveMQPropertyConversionException { return getProperties().getIntProperty(key); }
@Override public int getInt(final String name) throws JMSException { try { return map.getIntProperty(new SimpleString(name)); } catch (ActiveMQPropertyConversionException e) { throw new MessageFormatException(e.getMessage()); } }
@Override public int getInt(final String name) throws JMSException { try { return map.getIntProperty(new SimpleString(name)); } catch (ActiveMQPropertyConversionException e) { throw new MessageFormatException(e.getMessage()); } }
@Override public int getInt(final String name) throws JMSException { try { return map.getIntProperty(new SimpleString(name)); } catch (ActiveMQPropertyConversionException e) { throw new MessageFormatException(e.getMessage()); } }
@Override public int getIntProperty(String name) { try { return properties.getIntProperty(new SimpleString(name)); } catch (ActiveMQPropertyConversionException ce) { throw new MessageFormatRuntimeException(ce.getMessage()); } }
@Override public int getIntProperty(String name) { try { return properties.getIntProperty(new SimpleString(name)); } catch (ActiveMQPropertyConversionException ce) { throw new MessageFormatRuntimeException(ce.getMessage()); } }
@Override public int getInt(final String name) throws JMSException { try { return map.getIntProperty(new SimpleString(name)); } catch (ActiveMQPropertyConversionException e) { throw new MessageFormatException(e.getMessage()); } }
@Override public int getIntProperty(String name) { try { return properties.getIntProperty(new SimpleString(name)); } catch (ActiveMQPropertyConversionException ce) { throw new MessageFormatRuntimeException(ce.getMessage()); } }
@Override public int getInt(final String name) throws JMSException { try { return map.getIntProperty(new SimpleString(name)); } catch (ActiveMQPropertyConversionException e) { throw new MessageFormatException(e.getMessage()); } }
@Override public int getInt(final String name) throws JMSException { try { return map.getIntProperty(new SimpleString(name)); } catch (ActiveMQPropertyConversionException e) { throw new MessageFormatException(e.getMessage()); } }
@Override public int getIntProperty(String name) { try { return properties.getIntProperty(new SimpleString(name)); } catch (ActiveMQPropertyConversionException ce) { throw new MessageFormatRuntimeException(ce.getMessage()); } }
@Test public void testShortProperty() throws Exception { Short val = RandomUtil.randomShort(); props.putShortProperty(key, val); Assert.assertEquals(val, props.getShortProperty(key)); Assert.assertEquals(Integer.valueOf(val), props.getIntProperty(key)); Assert.assertEquals(new SimpleString(Short.toString(val)), props.getSimpleStringProperty(key)); props.putSimpleStringProperty(key, new SimpleString(Short.toString(val))); Assert.assertEquals(val, props.getShortProperty(key)); Byte byteVal = RandomUtil.randomByte(); props.putByteProperty(key, byteVal); Assert.assertEquals(Short.valueOf(byteVal), props.getShortProperty(key)); try { props.putBooleanProperty(key, RandomUtil.randomBoolean()); props.getShortProperty(key); Assert.fail(); } catch (ActiveMQPropertyConversionException e) { } try { props.getShortProperty(unknownKey); Assert.fail(); } catch (NumberFormatException e) { } }