@Override public void clearBody() throws JMSException { super.clearBody(); map.clear(); invalid = true; }
@Override public JMSProducer clearProperties() { try { stringPropertyNames.clear(); properties.clear(); } catch (RuntimeException e) { throw new JMSRuntimeException(e.getMessage()); } return this; }
@Override public void clearBody() throws JMSException { super.clearBody(); map.clear(); invalid = true; }
@Override public JMSProducer clearProperties() { try { stringPropertyNames.clear(); properties.clear(); } catch (RuntimeException e) { throw new JMSRuntimeException(e.getMessage()); } return this; }
@Override public void clearBody() throws JMSException { super.clearBody(); map.clear(); }
@Override public void clearBody() throws JMSException { super.clearBody(); map.clear(); invalid = true; }
@Override public void clearBody() throws JMSException { super.clearBody(); map.clear(); invalid = true; }
@Override public void clearBody() throws JMSException { super.clearBody(); map.clear(); }
@Override public JMSProducer clearProperties() { try { stringPropertyNames.clear(); properties.clear(); } catch (RuntimeException e) { throw new JMSRuntimeException(e.getMessage()); } return this; }
@Override public void clearBody() throws JMSException { super.clearBody(); map.clear(); invalid = true; }
@Override public JMSProducer clearProperties() { try { stringPropertyNames.clear(); properties.clear(); } catch (RuntimeException e) { throw new JMSRuntimeException(e.getMessage()); } return this; }
@Override public JMSProducer clearProperties() { try { stringPropertyNames.clear(); properties.clear(); } catch (RuntimeException e) { throw new JMSRuntimeException(e.getMessage()); } return this; }
props.putSimpleStringProperty(SimpleString.toSimpleString("S" + h), SimpleString.toSimpleString("hello")); props.clear(); } catch (ConcurrentModificationException t) { hasError.set(true);
@Test public void testMemoryOffsetAfterClearIsSameAsNewTypedProperties() throws Exception { TypedProperties props = new TypedProperties(); props.putSimpleStringProperty(SimpleString.toSimpleString("helllllloooooo"), SimpleString.toSimpleString("raaaaaaaaaaaaaaaaaaaaaaaa")); props.clear(); assertEquals(new TypedProperties().getMemoryOffset(), props.getMemoryOffset()); } }
@Test public void testEncodedSizeAfterClearIsSameAsNewTypedProperties() throws Exception { TypedProperties props = new TypedProperties(); props.putSimpleStringProperty(SimpleString.toSimpleString("helllllloooooo"), SimpleString.toSimpleString("raaaaaaaaaaaaaaaaaaaaaaaa")); props.clear(); assertEquals(new TypedProperties().getEncodeSize(), props.getEncodeSize()); }
@Test public void testClear() throws Exception { props.putSimpleStringProperty(key, RandomUtil.randomSimpleString()); Assert.assertTrue(props.containsProperty(key)); Assert.assertNotNull(props.getProperty(key)); props.clear(); Assert.assertFalse(props.containsProperty(key)); Assert.assertNull(props.getProperty(key)); }