Skip to content

Commit 0ba7617

Browse files
author
Simon MacMullen
committed
Merged default into amqp_0_9_1
2 parents 60f038f + d4d1162 commit 0ba7617

22 files changed

+355
-363
lines changed

nexus-upload.sh

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,16 @@ set -e
1010

1111
NEXUS_ROOT="http://$CREDS@oss.sonatype.org/service/local/staging/deploy/maven2/com/rabbitmq/amqp-client/$VERSION"
1212

13-
for ARTIFACT_NAME in $@; do
14-
echo "Uploading $ARTIFACT_NAME"
13+
for artifact in $@; do
14+
echo "Uploading $artifact"
1515

16-
rm -f $ARTIFACT_NAME.asc
17-
gpg --homedir $GNUPG_PATH/.gnupg --local-user $SIGNING_KEY --no-tty --armor --detach-sign --output $ARTIFACT_NAME.asc $ARTIFACT_NAME
18-
md5sum $ARTIFACT_NAME | cut -f1 -d' ' >$ARTIFACT_NAME.md5
19-
md5sum $ARTIFACT_NAME.asc | cut -f1 -d' ' >$ARTIFACT_NAME.asc.md5
20-
sha1sum $ARTIFACT_NAME | cut -f1 -d' ' >$ARTIFACT_NAME.sha1
21-
sha1sum $ARTIFACT_NAME.asc | cut -f1 -d' ' >$ARTIFACT_NAME.asc.sha1
22-
curl -XPUT --data-binary @$ARTIFACT_NAME $NEXUS_ROOT/$ARTIFACT_NAME
23-
24-
for EXT in md5 sha1 asc asc.md5 asc.sha1; do
25-
curl -XPUT --data-binary @$ARTIFACT_NAME.$EXT $NEXUS_ROOT/$ARTIFACT_NAME.$EXT
16+
rm -f $artifact.asc
17+
gpg --homedir $GNUPG_PATH/.gnupg --local-user $SIGNING_KEY --no-tty --armor --detach-sign --output $artifact.asc $artifact
18+
for ext in '' .asc ; do
19+
curl -XPUT --data-binary @$artifact$ext $NEXUS_ROOT/$artifact$ext
20+
for sum in md5 sha1 ; do
21+
${sum}sum $artifact$ext | (read a rest ; echo -n "$a") >$artifact$ext.$sum
22+
curl -XPUT --data-binary @$artifact$ext.$sum $NEXUS_ROOT/$artifact$ext.$sum
23+
done
2624
done
2725
done

src/com/rabbitmq/client/Channel.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,10 @@ public interface Channel extends ShutdownNotifier {
9292
* @throws java.io.IOException if an error is encountered
9393
*/
9494
void close(int closeCode, String closeMessage) throws IOException;
95-
95+
9696
/**
9797
* Set flow on the channel
98-
*
98+
*
9999
* @param active if true, the server is asked to start sending. If false, the server is asked to stop sending.
100100
* @throws IOException
101101
*/
@@ -227,7 +227,7 @@ Exchange.DeclareOk exchangeDeclare(String exchange, String type, boolean durable
227227
* @throws IOException the server will raise a 404 channel exception if the named exchange does not exist.
228228
*/
229229
Exchange.DeclareOk exchangeDeclarePassive(String name) throws IOException;
230-
230+
231231
/**
232232
* Delete an exchange
233233
* @see com.rabbitmq.client.AMQP.Exchange.Delete

src/com/rabbitmq/client/impl/ChannelN.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -294,21 +294,21 @@ public void close()
294294
{
295295
close(AMQP.REPLY_SUCCESS, "OK");
296296
}
297-
297+
298298
/** Public API - {@inheritDoc} */
299299
public void close(int closeCode, String closeMessage)
300300
throws IOException
301301
{
302302
close(closeCode, closeMessage, true, null, false);
303303
}
304-
304+
305305
/** Public API - {@inheritDoc} */
306306
public void abort()
307307
throws IOException
308308
{
309309
abort(AMQP.REPLY_SUCCESS, "OK");
310310
}
311-
311+
312312
/** Public API - {@inheritDoc} */
313313
public void abort(int closeCode, String closeMessage)
314314
throws IOException
@@ -340,7 +340,7 @@ public void close(int closeCode,
340340
if (cause != null) {
341341
signal.initCause(cause);
342342
}
343-
343+
344344
BlockingRpcContinuation<AMQCommand> k = new SimpleBlockingRpcContinuation();
345345
boolean notify = false;
346346
try {
@@ -350,7 +350,7 @@ public void close(int closeCode,
350350
processShutdownSignal(signal, !initiatedByApplication, true);
351351
quiescingRpc(reason, k);
352352
}
353-
353+
354354
// Now that we're in quiescing state, channel.close was sent and
355355
// we wait for the reply. We ignore the result. (It's always
356356
// close-ok.)
@@ -375,7 +375,7 @@ public void close(int closeCode,
375375
notifyListeners();
376376
}
377377
}
378-
}
378+
}
379379

380380
/** Public API - {@inheritDoc} */
381381
public void basicQos(int prefetchSize, int prefetchCount, boolean global)
@@ -499,7 +499,7 @@ public Queue.DeleteOk queueDelete(String queue, boolean ifUnused, boolean ifEmpt
499499
return (Queue.DeleteOk)
500500
exnWrappingRpc(new Queue.Delete(TICKET, queue, ifUnused, ifEmpty, false)).getMethod();
501501
}
502-
502+
503503
/** Public API - {@inheritDoc} */
504504
public Queue.DeleteOk queueDelete(String queue)
505505
throws IOException
@@ -694,7 +694,7 @@ public void basicRecoverAsync(boolean requeue)
694694
{
695695
transmit(new Basic.RecoverAsync(requeue));
696696
}
697-
697+
698698
/** Public API - {@inheritDoc} */
699699
public Tx.SelectOk txSelect()
700700
throws IOException
@@ -718,6 +718,6 @@ public Tx.RollbackOk txRollback()
718718

719719
/** Public API - {@inheritDoc} */
720720
public Channel.FlowOk flow(final boolean a) throws IOException {
721-
return (Channel.FlowOk) exnWrappingRpc(new Channel.Flow() {{active = a;}}).getMethod();
721+
return (Channel.FlowOk) exnWrappingRpc(new Channel.Flow() {{active = a;}}).getMethod();
722722
}
723723
}

test/src/com/rabbitmq/client/test/CloseInMainLoop.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ public boolean hadValidShutdown(){
1616
if(isOpen()) throw new IllegalStateException("hadValidShutdown called while connection is still open");
1717
return validShutdown.get();
1818
}
19-
19+
2020
public SpecialConnection() throws Exception{
2121
super(
22-
new ConnectionFactory(),
22+
new ConnectionFactory(),
2323
new SocketFrameHandler(SocketFactory.getDefault().createSocket("localhost", 5672)),
2424
new DefaultExceptionHandler(){
2525
@Override public void handleConsumerException(Channel channel,
@@ -48,7 +48,7 @@ public boolean processControlCommand(Command c) throws IOException{
4848
if(c.getMethod() instanceof AMQP.Connection.CloseOk) validShutdown.set(true);
4949
return super.processControlCommand(c);
5050
}
51-
51+
5252
}
5353

5454

@@ -57,7 +57,7 @@ public void testCloseOKNormallyReceived() throws Exception{
5757
connection.close();
5858
assertTrue(connection.hadValidShutdown());
5959
}
60-
60+
6161
// The thrown runtime exception should get intercepted by the
6262
// consumer exception handler, and result in a clean shut down.
6363
public void testCloseWithFaultyConsumer() throws Exception{
@@ -67,7 +67,7 @@ public void testCloseWithFaultyConsumer() throws Exception{
6767
channel.queueDeclare("q", false, false, false, null);
6868
channel.queueBind("q", "x", "k");
6969

70-
final CountDownLatch latch = new CountDownLatch(1);
70+
final CountDownLatch latch = new CountDownLatch(1);
7171

7272
channel.basicConsume("q", true, new DefaultConsumer(channel){
7373
public void handleDelivery(String consumerTag,
@@ -85,5 +85,5 @@ public void handleDelivery(String consumerTag,
8585
Thread.sleep(200);
8686
assertTrue(connection.hadValidShutdown());
8787
}
88-
88+
8989
}

test/src/com/rabbitmq/client/test/QueueingConsumerShutdownTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@
1818
// are Copyright (C) 2007-2008 LShift Ltd, Cohesive Financial
1919
// Technologies LLC, and Rabbit Technologies Ltd.
2020
//
21-
// Portions created by LShift Ltd are Copyright (C) 2007-2009 LShift
21+
// Portions created by LShift Ltd are Copyright (C) 2007-2010 LShift
2222
// Ltd. Portions created by Cohesive Financial Technologies LLC are
23-
// Copyright (C) 2007-2009 Cohesive Financial Technologies
23+
// Copyright (C) 2007-2010 Cohesive Financial Technologies
2424
// LLC. Portions created by Rabbit Technologies Ltd are Copyright
25-
// (C) 2007-2009 Rabbit Technologies Ltd.
25+
// (C) 2007-2010 Rabbit Technologies Ltd.
2626
//
2727
// All Rights Reserved.
2828
//

test/src/com/rabbitmq/client/test/functional/BindingLifecycle.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public void testExchangeIfUnused() throws IOException {
114114
}
115115

116116
/**
117-
*
117+
*
118118
*/
119119
public void testExchangePassiveDeclare() throws IOException {
120120
channel.exchangeDeclare("testPassive", "direct");
@@ -138,7 +138,7 @@ public void testExchangePassiveDeclare() throws IOException {
138138
return;
139139
}
140140
}
141-
141+
142142
/**
143143
* Test the behaviour of queue.unbind
144144
*/

test/src/com/rabbitmq/client/test/functional/BindingLifecycleBase.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ protected void deleteExchangeAndQueue(Binding binding) throws IOException {
120120
channel.exchangeDelete(binding.x);
121121
}
122122

123+
123124
protected void restart() throws IOException {
124125
}
125126

@@ -146,7 +147,7 @@ protected Binding setupExchangeBindings(boolean durable) throws IOException {
146147
createQueueAndBindToExchange(binding, durable);
147148
return binding;
148149
}
149-
150+
150151
protected void subscribeSendUnsubscribe(Binding binding) throws IOException {
151152
String tag = channel.basicConsume(binding.q, new QueueingConsumer(channel));
152153
sendUnroutable(binding);
@@ -170,4 +171,5 @@ protected Binding(String q, String x, String k) {
170171
}
171172
}
172173

174+
173175
}

test/src/com/rabbitmq/client/test/functional/FunctionalTests.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
package com.rabbitmq.client.test.functional;
3333

3434
import com.rabbitmq.client.test.Bug20004Test;
35-
import com.rabbitmq.client.test.server.Permissions;
3635
import junit.framework.TestCase;
3736
import junit.framework.TestSuite;
3837

test/src/com/rabbitmq/client/test/functional/QosTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ public void testFairness()
206206
AMQP.Queue.DeclareOk ok = channel.queueDeclare(q, false, false, false, null);
207207
assertTrue(ok.getMessageCount() < messageCount);
208208
}
209-
209+
210210
}
211211

212212
public void testSingleChannelAndQueueFairness()
@@ -358,7 +358,7 @@ public void testLimitInheritsUnackedCount()
358358
fill(2);
359359
drain(c, 1);
360360
}
361-
361+
362362
public void testFlow() throws IOException
363363
{
364364
QueueingConsumer c = new QueueingConsumer(channel);
@@ -371,7 +371,7 @@ public void testFlow() throws IOException
371371
channel.flow(true);
372372
drain(c, 1);
373373
}
374-
374+
375375
protected void runLimitTests(int limit,
376376
boolean multiAck,
377377
boolean txMode,

0 commit comments

Comments
 (0)