3232 */
3333public class PerQueueTTL extends BrokerTestCase {
3434
35- private static final String TTL_EXCHANGE = "ttl.exchange" ;
36- private static final String TTL_ARG = "x-message-ttl" ;
37- private static final String TTL_QUEUE_NAME = "queue.ttl" ;
35+ private static final String TTL_EXCHANGE = "ttl.exchange" ;
36+ private static final String TTL_ARG = "x-message-ttl" ;
37+ private static final String TTL_QUEUE_NAME = "queue.ttl" ;
3838 private static final String TTL_INVALID_QUEUE_NAME = "invalid.queue.ttl" ;
3939
4040 private static final String [] MSG = {"one" , "two" , "three" };
@@ -50,13 +50,13 @@ protected void releaseResources() throws IOException {
5050 }
5151
5252 public void testCreateQueueTTLTypes () throws IOException {
53- Object [] args = { (byte )200 , (short )200 , 200 , 200L };
53+ Object [] args = {(byte ) 200 , (short ) 200 , 200 , 200L };
5454 for (Object ttl : args ) {
5555 try {
5656 declareQueue (ttl );
57- } catch (IOException ex ) {
57+ } catch (IOException ex ) {
5858 fail ("Should be able to use " + ttl .getClass ().getName () +
59- " for x-message-ttl" );
59+ " for x-message-ttl" );
6060 }
6161 }
6262 }
@@ -92,15 +92,15 @@ public void testQueueRedeclareEquivalence() throws Exception {
9292 try {
9393 declareQueue (20 );
9494 fail ("Should not be able to redeclare with different x-message-ttl" );
95- } catch (IOException ex ) {
95+ } catch (IOException ex ) {
9696 checkShutdownSignal (AMQP .PRECONDITION_FAILED , ex );
9797 }
9898 }
9999
100100 public void testQueueRedeclareSemanticEquivalence () throws Exception {
101- declareQueue ((byte )10 );
101+ declareQueue ((byte ) 10 );
102102 declareQueue (10 );
103- declareQueue ((short )10 );
103+ declareQueue ((short ) 10 );
104104 declareQueue (10L );
105105 }
106106
@@ -109,7 +109,7 @@ public void testQueueRedeclareSemanticNonEquivalence() throws Exception {
109109 try {
110110 declareQueue (10.0 );
111111 fail ("Should not be able to redeclare with x-message-ttl argument of different type" );
112- } catch (IOException ex ) {
112+ } catch (IOException ex ) {
113113 checkShutdownSignal (AMQP .PRECONDITION_FAILED , ex );
114114 }
115115 }
@@ -238,7 +238,7 @@ private AMQP.Queue.DeclareOk declareQueue(String name, Object ttlValue) throws I
238238 private void expectBodyAndRemainingMessages (String body , int messagesLeft ) throws IOException {
239239 GetResponse response = channel .basicGet (TTL_QUEUE_NAME , false );
240240 assertEquals (body , new String (response .getBody ()));
241- assertEquals (messagesLeft , response .getMessageCount ());
241+ assertEquals (messagesLeft , response .getMessageCount ());
242242 }
243243
244244}
0 commit comments