Permalink
Browse files

Merge pull request #1542 from scop/checkstyle2

Merge throws on previous line to appease both checkstyle 5.6 and 5.7
  • Loading branch information...
2 parents 02fbf5d + 4368580 commit a74c8b25087c9b0820247431411715afde4f5d18 @clebertsuconic clebertsuconic committed Feb 15, 2014
Showing with 62 additions and 124 deletions.
  1. +4 −8 hornetq-core-client/src/main/java/org/hornetq/core/client/impl/ClientProducerImpl.java
  2. +2 −4 hornetq-jms-client/src/main/java/org/hornetq/jms/client/HornetQMessageProducer.java
  3. +1 −2 hornetq-jms-server/src/main/java/org/hornetq/jms/server/impl/JMSServerManagerImpl.java
  4. +8 −16 hornetq-journal/src/main/java/org/hornetq/core/journal/impl/FileWrapperJournal.java
  5. +7 −14 hornetq-journal/src/main/java/org/hornetq/core/journal/impl/JournalBase.java
  6. +1 −2 hornetq-journal/src/main/java/org/hornetq/core/journal/impl/NIOSequentialFile.java
  7. +2 −4 ...-protocols/hornetq-stomp-protocol/src/main/java/org/hornetq/core/protocol/stomp/StompSession.java
  8. +1 −2 hornetq-rest/src/main/java/org/hornetq/rest/queue/AcknowledgedQueueConsumer.java
  9. +2 −4 hornetq-rest/src/main/java/org/hornetq/rest/queue/ConsumersResource.java
  10. +1 −2 hornetq-rest/src/main/java/org/hornetq/rest/queue/QueueDestinationsResource.java
  11. +1 −2 hornetq-rest/src/main/java/org/hornetq/rest/queue/QueueServiceManager.java
  12. +1 −2 hornetq-rest/src/main/java/org/hornetq/rest/queue/push/FilePushStore.java
  13. +1 −2 hornetq-rest/src/main/java/org/hornetq/rest/queue/push/HornetQPushStrategy.java
  14. +1 −2 hornetq-rest/src/main/java/org/hornetq/rest/topic/AcknowledgedSubscriptionResource.java
  15. +1 −2 hornetq-rest/src/main/java/org/hornetq/rest/topic/FileTopicPushStore.java
  16. +1 −2 hornetq-rest/src/main/java/org/hornetq/rest/topic/SubscriptionResource.java
  17. +1 −2 hornetq-rest/src/main/java/org/hornetq/rest/topic/SubscriptionsResource.java
  18. +1 −2 hornetq-rest/src/test/java/org/hornetq/rest/test/PersistentPushTopicConsumerTest.java
  19. +1 −2 hornetq-rest/src/test/java/org/hornetq/rest/test/SelectorTest.java
  20. +1 −2 hornetq-server/src/main/java/org/hornetq/core/paging/impl/PagingStoreImpl.java
  21. +1 −2 hornetq-server/src/main/java/org/hornetq/core/persistence/impl/journal/DescribeJournal.java
  22. +5 −10 hornetq-server/src/main/java/org/hornetq/core/persistence/impl/journal/JournalStorageManager.java
  23. +4 −8 hornetq-server/src/main/java/org/hornetq/core/persistence/impl/nullpm/NullStorageManager.java
  24. +2 −4 hornetq-server/src/main/java/org/hornetq/core/replication/ReplicationManager.java
  25. +1 −2 hornetq-server/src/main/java/org/hornetq/core/server/cluster/ClusterManager.java
  26. +1 −2 hornetq-server/src/main/java/org/hornetq/core/server/impl/HornetQServerImpl.java
  27. +1 −2 hornetq-server/src/test/java/org/hornetq/tests/util/ServiceTestBase.java
  28. +1 −2 ...egration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/FailoverTestBase.java
  29. +1 −2 tests/integration-tests/src/test/java/org/hornetq/tests/integration/discovery/DiscoveryTest.java
  30. +2 −4 ...rc/test/java/org/hornetq/tests/integration/jms/connection/ConnectionFactorySerializationTest.java
  31. +1 −2 tests/integration-tests/src/test/java/org/hornetq/tests/util/JMSTestBase.java
  32. +1 −2 tests/integration-tests/src/test/java/org/hornetq/tests/util/NonSerializableFactory.java
  33. +1 −2 tests/unit-tests/src/test/java/org/hornetq/tests/unit/util/FakePagingManager.java
  34. +1 −2 tests/unit-tests/src/test/java/org/hornetq/tests/unit/util/NonSerializableFactory.java
@@ -356,8 +356,7 @@ private void checkClosed() throws HornetQException
*/
private void
largeMessageSend(final boolean sendBlocking, final MessageInternal msgI,
- final ClientProducerCredits credits, SendAcknowledgementHandler handler)
- throws HornetQException
+ final ClientProducerCredits credits, SendAcknowledgementHandler handler) throws HornetQException
{
int headerSize = msgI.getHeadersAndPropertiesEncodeSize();
@@ -416,8 +415,7 @@ else if ((input = msgI.getBodyInputStream()) != null)
*/
private void
largeMessageSendServer(final boolean sendBlocking, final MessageInternal msgI,
- final ClientProducerCredits credits, SendAcknowledgementHandler handler)
- throws HornetQException
+ final ClientProducerCredits credits, SendAcknowledgementHandler handler) throws HornetQException
{
sendInitialLargeMessageHeader(msgI, credits);
@@ -482,8 +480,7 @@ else if ((input = msgI.getBodyInputStream()) != null)
*/
private void
largeMessageSendBuffered(final boolean sendBlocking, final MessageInternal msgI,
- final ClientProducerCredits credits, SendAcknowledgementHandler handler)
- throws HornetQException
+ final ClientProducerCredits credits, SendAcknowledgementHandler handler) throws HornetQException
{
msgI.getBodyBuffer().readerIndex(0);
largeMessageSendStreamed(sendBlocking, msgI, new HornetQBufferInputStream(msgI.getBodyBuffer()), credits,
@@ -499,8 +496,7 @@ else if ((input = msgI.getBodyInputStream()) != null)
*/
private void largeMessageSendStreamed(final boolean sendBlocking, final MessageInternal msgI,
final InputStream inputStreamParameter, final ClientProducerCredits credits,
- SendAcknowledgementHandler handler)
- throws HornetQException
+ SendAcknowledgementHandler handler) throws HornetQException
{
boolean lastPacket = false;
@@ -238,8 +238,7 @@ public void send(Message message, int deliveryMode, int priority, long timeToLiv
}
@Override
- public void send(Destination destination, Message message, CompletionListener completionListener)
- throws JMSException
+ public void send(Destination destination, Message message, CompletionListener completionListener) throws JMSException
{
send(destination, message, defaultDeliveryMode, defaultPriority, defaultTimeToLive, completionListener);
}
@@ -274,8 +273,7 @@ public void publish(final Topic topic, final Message message) throws JMSExceptio
send(topic, message);
}
- public void publish(final Message message, final int deliveryMode, final int priority, final long timeToLive)
- throws JMSException
+ public void publish(final Message message, final int deliveryMode, final int priority, final long timeToLive) throws JMSException
{
send(message, deliveryMode, priority, timeToLive);
}
@@ -338,8 +338,7 @@ public void deActivate()
}
}
- public void recoverJndiBindings(String name, PersistedType type)
- throws NamingException
+ public void recoverJndiBindings(String name, PersistedType type) throws NamingException
{
List<String> bindings = unRecoveredJndi.get(name);
if ((bindings != null) && (bindings.size() > 0))
@@ -87,8 +87,7 @@ public boolean isStarted()
// ------------------------
@Override
- public void appendAddRecord(long id, byte recordType, EncodingSupport record, boolean sync, IOCompletion callback)
- throws Exception
+ public void appendAddRecord(long id, byte recordType, EncodingSupport record, boolean sync, IOCompletion callback) throws Exception
{
JournalInternalRecord addRecord = new JournalAddRecord(true, id, recordType, record);
@@ -98,8 +97,7 @@ public void appendAddRecord(long id, byte recordType, EncodingSupport record, bo
/**
* Write the record to the current file.
*/
- private void writeRecord(JournalInternalRecord encoder, final boolean sync, final IOCompletion callback)
- throws Exception
+ private void writeRecord(JournalInternalRecord encoder, final boolean sync, final IOCompletion callback) throws Exception
{
lockAppend.lock();
@@ -143,8 +141,7 @@ public void appendDeleteRecordTransactional(long txID, long id, EncodingSupport
}
@Override
- public void appendAddRecordTransactional(long txID, long id, byte recordType, EncodingSupport record)
- throws Exception
+ public void appendAddRecordTransactional(long txID, long id, byte recordType, EncodingSupport record) throws Exception
{
count(txID);
JournalInternalRecord addRecord = new JournalAddRecordTX(true, txID, id, recordType, record);
@@ -153,25 +150,22 @@ public void appendAddRecordTransactional(long txID, long id, byte recordType, En
@Override
public void
- appendUpdateRecord(long id, byte recordType, EncodingSupport record, boolean sync, IOCompletion callback)
- throws Exception
+ appendUpdateRecord(long id, byte recordType, EncodingSupport record, boolean sync, IOCompletion callback) throws Exception
{
JournalInternalRecord updateRecord = new JournalAddRecord(false, id, recordType, record);
writeRecord(updateRecord, sync, callback);
}
@Override
- public void appendUpdateRecordTransactional(long txID, long id, byte recordType, EncodingSupport record)
- throws Exception
+ public void appendUpdateRecordTransactional(long txID, long id, byte recordType, EncodingSupport record) throws Exception
{
count(txID);
JournalInternalRecord updateRecordTX = new JournalAddRecordTX(false, txID, id, recordType, record);
writeRecord(updateRecordTX, false, null);
}
@Override
- public void appendCommitRecord(long txID, boolean sync, IOCompletion callback, boolean lineUpContext)
- throws Exception
+ public void appendCommitRecord(long txID, boolean sync, IOCompletion callback, boolean lineUpContext) throws Exception
{
JournalInternalRecord commitRecord = new JournalCompleteRecordTX(TX_RECORD_TYPE.COMMIT, txID, null);
AtomicInteger value = transactions.remove(Long.valueOf(txID));
@@ -184,8 +178,7 @@ public void appendCommitRecord(long txID, boolean sync, IOCompletion callback, b
}
@Override
- public void appendPrepareRecord(long txID, EncodingSupport transactionData, boolean sync, IOCompletion callback)
- throws Exception
+ public void appendPrepareRecord(long txID, EncodingSupport transactionData, boolean sync, IOCompletion callback) throws Exception
{
JournalInternalRecord prepareRecord = new JournalCompleteRecordTX(TX_RECORD_TYPE.PREPARE, txID, transactionData);
AtomicInteger value = transactions.get(Long.valueOf(txID));
@@ -241,8 +234,7 @@ public void lineUpContext(IOCompletion callback)
@Override
public JournalLoadInformation load(List<RecordInfo> committedRecords,
- List<PreparedTransactionInfo> preparedTransactions, TransactionFailureCallback transactionFailure)
- throws Exception
+ List<PreparedTransactionInfo> preparedTransactions, TransactionFailureCallback transactionFailure) throws Exception
{
throw new HornetQUnsupportedPacketException();
}
@@ -43,11 +43,9 @@ public abstract void appendAddRecordTransactional(final long txID, final long id
public abstract void appendCommitRecord(final long txID, final boolean sync, final IOCompletion callback,
boolean lineUpContext) throws Exception;
- public abstract void appendDeleteRecord(final long id, final boolean sync, final IOCompletion callback)
- throws Exception;
+ public abstract void appendDeleteRecord(final long id, final boolean sync, final IOCompletion callback) throws Exception;
- public abstract void appendDeleteRecordTransactional(final long txID, final long id, final EncodingSupport record)
- throws Exception;
+ public abstract void appendDeleteRecordTransactional(final long txID, final long id, final EncodingSupport record) throws Exception;
public abstract void appendPrepareRecord(final long txID, final EncodingSupport transactionData, final boolean sync,
final IOCompletion callback) throws Exception;
@@ -58,8 +56,7 @@ public abstract void appendUpdateRecord(final long id, final byte recordType, fi
public abstract void appendUpdateRecordTransactional(final long txID, final long id, final byte recordType,
final EncodingSupport record) throws Exception;
- public abstract void appendRollbackRecord(final long txID, final boolean sync, final IOCompletion callback)
- throws Exception;
+ public abstract void appendRollbackRecord(final long txID, final boolean sync, final IOCompletion callback) throws Exception;
public void appendAddRecord(long id, byte recordType, byte[] record, boolean sync) throws Exception
@@ -96,8 +93,7 @@ public void appendCommitRecord(final long txID, final boolean sync, final IOComp
appendCommitRecord(txID, sync, callback, true);
}
- public void appendUpdateRecord(final long id, final byte recordType, final byte[] record, final boolean sync)
- throws Exception
+ public void appendUpdateRecord(final long id, final byte recordType, final byte[] record, final boolean sync) throws Exception
{
appendUpdateRecord(id, recordType, new ByteArrayEncoding(record), sync);
}
@@ -108,8 +104,7 @@ public void appendUpdateRecordTransactional(final long txID, final long id, fina
appendUpdateRecordTransactional(txID, id, recordType, new ByteArrayEncoding(record));
}
- public void appendAddRecordTransactional(final long txID, final long id, final byte recordType, final byte[] record)
- throws Exception
+ public void appendAddRecordTransactional(final long txID, final long id, final byte recordType, final byte[] record) throws Exception
{
appendAddRecordTransactional(txID, id, recordType, new ByteArrayEncoding(record));
}
@@ -124,8 +119,7 @@ public void appendPrepareRecord(final long txID, final byte[] transactionData, f
appendPrepareRecord(txID, new ByteArrayEncoding(transactionData), sync);
}
- public void appendPrepareRecord(final long txID, final EncodingSupport transactionData, final boolean sync)
- throws Exception
+ public void appendPrepareRecord(final long txID, final EncodingSupport transactionData, final boolean sync) throws Exception
{
SyncIOCompletion syncCompletion = getSyncCallback(sync);
@@ -143,8 +137,7 @@ public void appendDeleteRecordTransactional(final long txID, final long id, fina
}
public void
- appendUpdateRecord(final long id, final byte recordType, final EncodingSupport record, final boolean sync)
- throws Exception
+ appendUpdateRecord(final long id, final byte recordType, final EncodingSupport record, final boolean sync) throws Exception
{
SyncIOCompletion callback = getSyncCallback(sync);
@@ -326,8 +326,7 @@ protected ByteBuffer newBuffer(int size, final int limit)
return super.newBuffer(size, limit);
}
- private void internalWrite(final ByteBuffer bytes, final boolean sync, final IOAsyncTask callback)
- throws IOException, HornetQIOErrorException, InterruptedException
+ private void internalWrite(final ByteBuffer bytes, final boolean sync, final IOAsyncTask callback) throws IOException, HornetQIOErrorException, InterruptedException
{
if (!isOpen())
{
@@ -366,14 +366,12 @@ public void setNoLocal(boolean noLocal)
this.noLocal = noLocal;
}
- public void sendInternal(ServerMessageImpl message, boolean direct)
- throws Exception
+ public void sendInternal(ServerMessageImpl message, boolean direct) throws Exception
{
session.send(message, direct);
}
- public void sendInternalLarge(ServerMessageImpl message, boolean direct)
- throws Exception
+ public void sendInternalLarge(ServerMessageImpl message, boolean direct) throws Exception
{
int headerSize = message.getHeadersAndPropertiesEncodeSize();
if (headerSize >= connection.getMinLargeMessageSize())
@@ -44,8 +44,7 @@
protected String startup = Long.toString(System.currentTimeMillis());
protected volatile Acknowledgement ack;
- public AcknowledgedQueueConsumer(ClientSessionFactory factory, String destination, String id, DestinationServiceManager serviceManager, String selector)
- throws HornetQException
+ public AcknowledgedQueueConsumer(ClientSessionFactory factory, String destination, String id, DestinationServiceManager serviceManager, String selector) throws HornetQException
{
super(factory, destination, id, serviceManager, selector);
autoAck = false;
@@ -192,17 +192,15 @@ protected void addConsumer(QueueConsumer consumer)
serviceManager.getTimeoutTask().add(this, consumer.getId());
}
- public QueueConsumer createConsumer(String selector)
- throws HornetQException
+ public QueueConsumer createConsumer(String selector) throws HornetQException
{
String genId = sessionCounter.getAndIncrement() + "-queue-" + destination + "-" + startup;
QueueConsumer consumer = new QueueConsumer(sessionFactory, destination, genId, serviceManager, selector);
addConsumer(consumer);
return consumer;
}
- public QueueConsumer createAcknowledgedConsumer(String selector)
- throws HornetQException
+ public QueueConsumer createAcknowledgedConsumer(String selector) throws HornetQException
{
String genId = sessionCounter.getAndIncrement() + "-queue-" + destination + "-" + startup;
QueueConsumer consumer = new AcknowledgedQueueConsumer(sessionFactory, destination, genId, serviceManager, selector);
@@ -153,8 +153,7 @@ public synchronized QueueResource findQueue(@PathParam("queue-name") String name
return queue;
}
- public QueueResource createQueueResource(String queueName, boolean defaultDurable, int timeoutSeconds, boolean duplicates)
- throws Exception
+ public QueueResource createQueueResource(String queueName, boolean defaultDurable, int timeoutSeconds, boolean duplicates) throws Exception
{
QueueResource queueResource = new QueueResource();
queueResource.setQueueDestinationsResource(this);
@@ -80,8 +80,7 @@ public void start() throws Exception
}
}
- public void deploy(QueueDeployment queueDeployment)
- throws Exception
+ public void deploy(QueueDeployment queueDeployment) throws Exception
{
if (!started)
{
@@ -86,8 +86,7 @@ public synchronized void update(PushRegistration reg) throws Exception
save(reg);
}
- protected void save(PushRegistration reg)
- throws JAXBException
+ protected void save(PushRegistration reg) throws JAXBException
{
Marshaller marshaller = ctx.createMarshaller();
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
@@ -34,8 +34,7 @@ public void start() throws Exception
// initialize();
}
- protected void initialize()
- throws Exception
+ protected void initialize() throws Exception
{
super.start();
initialized = true;
@@ -27,8 +27,7 @@
private long timeout;
private boolean deleteWhenIdle;
- public AcknowledgedSubscriptionResource(ClientSessionFactory factory, String destination, String id, DestinationServiceManager serviceManager, String selector, boolean durable, Long timeout)
- throws HornetQException
+ public AcknowledgedSubscriptionResource(ClientSessionFactory factory, String destination, String id, DestinationServiceManager serviceManager, String selector, boolean durable, Long timeout) throws HornetQException
{
super(factory, destination, id, serviceManager, selector);
this.timeout = timeout;
@@ -24,8 +24,7 @@
*/
public class FileTopicPushStore extends FilePushStore implements TopicPushStore
{
- public FileTopicPushStore(String dirname)
- throws Exception
+ public FileTopicPushStore(String dirname) throws Exception
{
super(dirname);
}
@@ -27,8 +27,7 @@
protected long timeout;
private boolean deleteWhenIdle;
- public SubscriptionResource(ClientSessionFactory factory, String destination, String id, DestinationServiceManager serviceManager, String selector, boolean durable, long timeout)
- throws HornetQException
+ public SubscriptionResource(ClientSessionFactory factory, String destination, String id, DestinationServiceManager serviceManager, String selector, boolean durable, long timeout) throws HornetQException
{
super(factory, destination, id, serviceManager, selector);
this.durable = durable;
@@ -264,8 +264,7 @@ public Response createSubscription(@FormParam("durable") @DefaultValue("false")
}
}
- protected QueueConsumer createConsumer(boolean durable, boolean autoAck, String subscriptionName, String selector, long timeout, boolean deleteWhenIdle)
- throws HornetQException
+ protected QueueConsumer createConsumer(boolean durable, boolean autoAck, String subscriptionName, String selector, long timeout, boolean deleteWhenIdle) throws HornetQException
{
QueueConsumer consumer;
if (autoAck)
@@ -244,8 +244,7 @@ public void postTwo(String msg)
}
}
- private void deployTopic(String topicName)
- throws Exception
+ private void deployTopic(String topicName) throws Exception
{
TopicDeployment deployment = new TopicDeployment();
deployment.setDuplicatesAllowed(true);
@@ -319,8 +319,7 @@ public void testPull() throws Exception
}
}
- private Link consumeOrder(Order order, Link consumeNext)
- throws Exception
+ private Link consumeOrder(Order order, Link consumeNext) throws Exception
{
ClientResponse<?> response = consumeNext.request().header("Accept-Wait", "4").accept("application/xml").post(String.class);
Assert.assertEquals(200, response.getStatus());
@@ -806,8 +806,7 @@ else if (addressFullMessagePolicy == AddressFullMessagePolicy.DROP || addressFul
@Override
public boolean
- page(ServerMessage message, final Transaction tx, RouteContextList listCtx, final ReadLock managerLock)
- throws Exception
+ page(ServerMessage message, final Transaction tx, RouteContextList listCtx, final ReadLock managerLock) throws Exception
{
if (!running)
@@ -152,8 +152,7 @@ public void onReadRollbackRecord(final long transactionID) throws Exception
out.println("operation@Rollback;txID=" + transactionID);
}
- public void onReadPrepareRecord(final long transactionID, final byte[] extraData, final int numberOfRecords)
- throws Exception
+ public void onReadPrepareRecord(final long transactionID, final byte[] extraData, final int numberOfRecords) throws Exception
{
out.println("operation@Prepare,txID=" + transactionID + ",numberOfRecords=" + numberOfRecords +
",extraData=" + encode(extraData) + ", xid=" + toXid(extraData));
Oops, something went wrong.

0 comments on commit a74c8b2

Please sign in to comment.