From 16ee65309c51850efef1d0b9b824484a7a05178c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Sat, 26 Mar 2016 14:45:11 +0200 Subject: [PATCH] Add missing @Override annotations --- .../core/protocol/core/impl/ActiveMQSessionContext.java | 1 + .../artemis/core/protocol/core/impl/ChannelImpl.java | 2 ++ .../artemis/jdbc/store/journal/JDBCJournalImpl.java | 2 ++ .../jdbc/store/journal/JDBCJournalLoaderCallback.java | 4 ++++ .../jdbc/store/journal/JDBCJournalReaderCallback.java | 9 +++++++++ .../artemis/jms/server/embedded/EmbeddedJMS.java | 1 + .../org/proton/plug/handler/impl/ProtonHandlerImpl.java | 1 + .../artemis/core/remoting/impl/AbstractAcceptor.java | 1 + .../example/ldap/InMemoryDirectoryServiceFactory.java | 3 +++ .../extras/byteman/LargeMessageOverReplicationTest.java | 2 ++ 10 files changed, 26 insertions(+) diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQSessionContext.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQSessionContext.java index ff61c21be1..7ec18f538a 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQSessionContext.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQSessionContext.java @@ -154,6 +154,7 @@ public class ActiveMQSessionContext extends SessionContext { } } + @Override public int getReconnectID() { return sessionChannel.getReconnectID(); } diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ChannelImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ChannelImpl.java index a7cb659d51..5dc4bc556c 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ChannelImpl.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ChannelImpl.java @@ -142,6 +142,7 @@ public final class ChannelImpl implements Channel { this.interceptors = interceptors; } + @Override public int getReconnectID() { return reconnectID.get(); } @@ -217,6 +218,7 @@ public final class ChannelImpl implements Channel { return send(packet, -1, false, false); } + @Override public boolean send(Packet packet, final int reconnectID) { return send(packet, reconnectID, false, false); } diff --git a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/journal/JDBCJournalImpl.java b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/journal/JDBCJournalImpl.java index a21b455b15..73a8602a02 100644 --- a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/journal/JDBCJournalImpl.java +++ b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/journal/JDBCJournalImpl.java @@ -700,10 +700,12 @@ public class JDBCJournalImpl implements Journal { return null; } + @Override public final void synchronizationLock() { journalLock.writeLock().lock(); } + @Override public final void synchronizationUnlock() { journalLock.writeLock().unlock(); } diff --git a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/journal/JDBCJournalLoaderCallback.java b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/journal/JDBCJournalLoaderCallback.java index 0627c54a15..13c11af797 100644 --- a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/journal/JDBCJournalLoaderCallback.java +++ b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/journal/JDBCJournalLoaderCallback.java @@ -56,10 +56,12 @@ public class JDBCJournalLoaderCallback implements LoaderCallback { } } + @Override public void addPreparedTransaction(final PreparedTransactionInfo preparedTransaction) { preparedTransactions.add(preparedTransaction); } + @Override public synchronized void addRecord(final RecordInfo info) { int index = committedRecords.size(); committedRecords.add(index, info); @@ -71,11 +73,13 @@ public class JDBCJournalLoaderCallback implements LoaderCallback { checkMaxId(info.id); } + @Override public synchronized void updateRecord(final RecordInfo info) { int index = committedRecords.size(); committedRecords.add(index, info); } + @Override public synchronized void deleteRecord(final long id) { for (Integer i : deleteReferences.get(id)) { committedRecords.remove(i); diff --git a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/journal/JDBCJournalReaderCallback.java b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/journal/JDBCJournalReaderCallback.java index 445d303f4e..4678425456 100644 --- a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/journal/JDBCJournalReaderCallback.java +++ b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/journal/JDBCJournalReaderCallback.java @@ -37,18 +37,22 @@ public class JDBCJournalReaderCallback implements JournalReaderCallback { this.loadManager = loadManager; } + @Override public void onReadAddRecord(final RecordInfo info) throws Exception { loadManager.addRecord(info); } + @Override public void onReadUpdateRecord(final RecordInfo info) throws Exception { loadManager.updateRecord(info); } + @Override public void onReadDeleteRecord(final long recordID) throws Exception { loadManager.deleteRecord(recordID); } + @Override public void onReadUpdateRecordTX(final long transactionID, final RecordInfo info) throws Exception { TransactionHolder tx = loadTransactions.get(transactionID); if (tx == null) { @@ -58,6 +62,7 @@ public class JDBCJournalReaderCallback implements JournalReaderCallback { tx.recordInfos.add(info); } + @Override public void onReadAddRecordTX(final long transactionID, final RecordInfo info) throws Exception { TransactionHolder tx = loadTransactions.get(transactionID); if (tx == null) { @@ -67,6 +72,7 @@ public class JDBCJournalReaderCallback implements JournalReaderCallback { tx.recordInfos.add(info); } + @Override public void onReadDeleteRecordTX(final long transactionID, final RecordInfo info) throws Exception { TransactionHolder tx = loadTransactions.get(transactionID); if (tx == null) { @@ -76,6 +82,7 @@ public class JDBCJournalReaderCallback implements JournalReaderCallback { tx.recordsToDelete.add(info); } + @Override public void onReadPrepareRecord(final long transactionID, final byte[] extraData, final int numberOfRecords) throws Exception { @@ -88,6 +95,7 @@ public class JDBCJournalReaderCallback implements JournalReaderCallback { tx.extraData = extraData; } + @Override public void onReadCommitRecord(final long transactionID, final int numberOfRecords) throws Exception { // It is possible that the TX could be null, since deletes could have happened in the journal. TransactionHolder tx = loadTransactions.get(transactionID); @@ -106,6 +114,7 @@ public class JDBCJournalReaderCallback implements JournalReaderCallback { } } + @Override public void onReadRollbackRecord(final long transactionID) throws Exception { TransactionHolder tx = loadTransactions.remove(transactionID); if (tx == null) { diff --git a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/embedded/EmbeddedJMS.java b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/embedded/EmbeddedJMS.java index bee15f0f03..57430b87a9 100644 --- a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/embedded/EmbeddedJMS.java +++ b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/embedded/EmbeddedJMS.java @@ -82,6 +82,7 @@ public class EmbeddedJMS extends EmbeddedActiveMQ { } + @Override public EmbeddedJMS setConfiguration(Configuration configuration) { super.setConfiguration(configuration); return this; diff --git a/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/handler/impl/ProtonHandlerImpl.java b/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/handler/impl/ProtonHandlerImpl.java index 08cdf57ef0..5fd2a23531 100644 --- a/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/handler/impl/ProtonHandlerImpl.java +++ b/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/handler/impl/ProtonHandlerImpl.java @@ -58,6 +58,7 @@ public class ProtonHandlerImpl extends ProtonInitializable implements ProtonHand private final Executor dispatchExecutor; private final Runnable dispatchRunnable = new Runnable() { + @Override public void run() { dispatch(); } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/AbstractAcceptor.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/AbstractAcceptor.java index 851f486999..4004df6cf7 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/AbstractAcceptor.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/AbstractAcceptor.java @@ -35,6 +35,7 @@ public abstract class AbstractAcceptor implements Acceptor { /** * This will update the list of interceptors for each ProtocolManager inside the acceptor. * */ + @Override public void updateInterceptors(List incomingInterceptors, List outgoingInterceptors) { for (ProtocolManager manager : protocolMap.values()) { manager.updateInterceptors(incomingInterceptors, outgoingInterceptors); diff --git a/examples/features/standard/security-ldap/src/main/java/org/apache/activemq/artemis/jms/example/ldap/InMemoryDirectoryServiceFactory.java b/examples/features/standard/security-ldap/src/main/java/org/apache/activemq/artemis/jms/example/ldap/InMemoryDirectoryServiceFactory.java index 61bf77eee5..ce48693e67 100644 --- a/examples/features/standard/security-ldap/src/main/java/org/apache/activemq/artemis/jms/example/ldap/InMemoryDirectoryServiceFactory.java +++ b/examples/features/standard/security-ldap/src/main/java/org/apache/activemq/artemis/jms/example/ldap/InMemoryDirectoryServiceFactory.java @@ -87,6 +87,7 @@ public class InMemoryDirectoryServiceFactory implements DirectoryServiceFactory /** * {@inheritDoc} */ + @Override public void init(String name) throws Exception { if ((directoryService != null) && directoryService.isStarted()) { return; @@ -154,6 +155,7 @@ public class InMemoryDirectoryServiceFactory implements DirectoryServiceFactory /** * {@inheritDoc} */ + @Override public DirectoryService getDirectoryService() throws Exception { return directoryService; } @@ -161,6 +163,7 @@ public class InMemoryDirectoryServiceFactory implements DirectoryServiceFactory /** * {@inheritDoc} */ + @Override public PartitionFactory getPartitionFactory() throws Exception { return partitionFactory; } diff --git a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/LargeMessageOverReplicationTest.java b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/LargeMessageOverReplicationTest.java index 8496fb180f..beb8b201a9 100644 --- a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/LargeMessageOverReplicationTest.java +++ b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/LargeMessageOverReplicationTest.java @@ -62,6 +62,7 @@ public class LargeMessageOverReplicationTest extends ActiveMQTestBase { MessageProducer producer; + @Override @Before public void setUp() throws Exception { super.setUp(); @@ -214,6 +215,7 @@ public class LargeMessageOverReplicationTest extends ActiveMQTestBase { if (messageChunkCount == 100) { final CountDownLatch latch = new CountDownLatch(1); new Thread() { + @Override public void run() { try { latch.countDown();