diff options
| author | Robert Godfrey <rgodfrey@apache.org> | 2014-01-23 23:37:48 +0000 |
|---|---|---|
| committer | Robert Godfrey <rgodfrey@apache.org> | 2014-01-23 23:37:48 +0000 |
| commit | c5736507c3ccbcf08ba1ba6d8f893a1724902d98 (patch) | |
| tree | f134585fde191c064a7f8f7f6d78ef19a3d0134f /qpid/java | |
| parent | 926150bd3fa44fe5c6e7eafb7dbbd23cb19b7475 (diff) | |
| download | qpid-python-c5736507c3ccbcf08ba1ba6d8f893a1724902d98.tar.gz | |
NO-JIRA : fix typos / spelling errors
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1560853 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java')
137 files changed, 336 insertions, 424 deletions
diff --git a/qpid/java/broker-core/src/main/java/org/apache/log4j/QpidCompositeRollingAppender.java b/qpid/java/broker-core/src/main/java/org/apache/log4j/QpidCompositeRollingAppender.java index 54ca574871..1a34bd8063 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/log4j/QpidCompositeRollingAppender.java +++ b/qpid/java/broker-core/src/main/java/org/apache/log4j/QpidCompositeRollingAppender.java @@ -56,7 +56,7 @@ import java.util.zip.GZIPOutputStream; * without clearing the directory could have nasty side effects. If Date/Time based rolling is enabled, * CompositeRollingAppender will attempt to roll existing files in the directory without a date/time tag based on the * last modified date of the base log files last modification.<br> <br> <p>A maximum number of backups based on - * date/time boundries would be nice but is not yet implemented.<br> + * date/time boundaries would be nice but is not yet implemented.<br> * * @author Kevin Steppe * @author Heinz Richter @@ -223,7 +223,7 @@ public class QpidCompositeRollingAppender extends FileAppender * made. Note that this could result in very slow performance as a large number of files are rolled over unless * {@link #setCountDirection} up is used. * - * <p>The maximum applys to -each- time based group of files and -not- the total. Using a daily roll the maximum + * <p>The maximum applies to -each- time based group of files and -not- the total. Using a daily roll the maximum * total files would be (#days run) * (maxSizeRollBackups) */ public void setMaxSizeRollBackups(int maxBackups) @@ -276,7 +276,7 @@ public class QpidCompositeRollingAppender extends FileAppender qw = new CountingQuietWriter(writer, errorHandler); } - // Taken verbatum from DailyRollingFileAppender + // Taken verbatim from DailyRollingFileAppender int computeCheckPeriod() { RollingCalendar c = new RollingCalendar(); @@ -473,7 +473,7 @@ public class QpidCompositeRollingAppender extends FileAppender } /** - * Initializes based on exisiting conditions at time of <code> activateOptions</code>. The following is done:<br> + * Initializes based on existing conditions at time of <code> activateOptions</code>. The following is done:<br> * <br> A) determine curSizeRollBackups<br> B) determine curTimeRollBackups (not implemented)<br> C) initiates a * roll over if needed for crossing a date boundary since the last run. */ @@ -700,7 +700,7 @@ public class QpidCompositeRollingAppender extends FileAppender * <p>If <code>maxSizeRollBackups</code> < 0, then <code>File</code> is renamed if needed and no files are deleted. */ - // synchronization not necessary since doAppend is alreasy synched + // synchronization not necessary since doAppend is already synched protected void rollOverSize() { File file; diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/Broker.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/Broker.java index f180e4532c..66171c6fc2 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/Broker.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/Broker.java @@ -130,7 +130,7 @@ public class Broker } catch(Exception ce) { - LOGGER.debug("An error occured when closing the registry following initialization failure", ce); + LOGGER.debug("An error occurred when closing the registry following initialization failure", ce); } throw e; } @@ -253,7 +253,7 @@ public class Broker } else { - LOGGER.debug("Skipping shutdown hook removal as there either isnt one, or we are it."); + LOGGER.debug("Skipping shutdown hook removal as there either isn't one, or we are it."); } } diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/BrokerOptions.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/BrokerOptions.java index d5f344f4ed..316d9bd88e 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/BrokerOptions.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/BrokerOptions.java @@ -186,9 +186,9 @@ public class BrokerOptions * * Passing null clears previously set values and returns to the default. */ - public void setConfigurationStoreType(String cofigurationStoreType) + public void setConfigurationStoreType(String configurationStoreType) { - _configurationStoreType = cofigurationStoreType; + _configurationStoreType = configurationStoreType; } /** @@ -217,9 +217,9 @@ public class BrokerOptions * * Passing null clears any previously set value and returns to the default. */ - public void setConfigurationStoreLocation(String cofigurationStore) + public void setConfigurationStoreLocation(String configurationStore) { - _configurationStoreLocation = cofigurationStore; + _configurationStoreLocation = configurationStore; } /** diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/configuration/ExchangeConfiguration.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/configuration/ExchangeConfiguration.java index c7cf0c0892..6cbaf26480 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/configuration/ExchangeConfiguration.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/configuration/ExchangeConfiguration.java @@ -29,9 +29,9 @@ public class ExchangeConfiguration private Configuration _config; private String _name; - public ExchangeConfiguration(String exchName, Configuration subset) + public ExchangeConfiguration(String name, Configuration subset) { - _name = exchName; + _name = name; _config = subset; } diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/configuration/plugins/AbstractConfiguration.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/configuration/plugins/AbstractConfiguration.java index b87022868e..c28ea726c0 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/configuration/plugins/AbstractConfiguration.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/configuration/plugins/AbstractConfiguration.java @@ -46,7 +46,7 @@ public abstract class AbstractConfiguration * <li>queue - the queue entries * <li>the alerting values for defaults * <li>exchange - the default exchange - * <li>durable - set the default durablity + * <li>durable - set the default durability * </ul> */ abstract public String[] getElementsProcessed(); @@ -224,7 +224,7 @@ public abstract class AbstractConfiguration } /** - * Provide mechanism to validate Configuration contains a Postiive Long Value + * Provide mechanism to validate Configuration contains a Positive Long Value * * @param property * diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/configuration/store/ManagementModeStoreHandler.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/configuration/store/ManagementModeStoreHandler.java index 639f3cd5c4..ab06f1b94b 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/configuration/store/ManagementModeStoreHandler.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/configuration/store/ManagementModeStoreHandler.java @@ -59,7 +59,7 @@ public class ManagementModeStoreHandler implements ConfigurationEntryStore ConfigurationEntry storeRoot = store.getRootEntry(); _store = store; _rootId = storeRoot.getId(); - _cliEntries = createPortsFromCommadLineOptions(options); + _cliEntries = createPortsFromCommandLineOptions(options); _quiescedEntries = quiesceEntries(storeRoot, options); } @@ -183,7 +183,7 @@ public class ManagementModeStoreHandler implements ConfigurationEntryStore return _store.getType(); } - private Map<UUID, ConfigurationEntry> createPortsFromCommadLineOptions(BrokerOptions options) + private Map<UUID, ConfigurationEntry> createPortsFromCommandLineOptions(BrokerOptions options) { int managementModeRmiPortOverride = options.getManagementModeRmiPortOverride(); if (managementModeRmiPortOverride < 0) diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/configuration/store/MemoryConfigurationEntryStore.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/configuration/store/MemoryConfigurationEntryStore.java index 56b0aec7dd..a04df9efe4 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/configuration/store/MemoryConfigurationEntryStore.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/configuration/store/MemoryConfigurationEntryStore.java @@ -150,9 +150,9 @@ public class MemoryConfigurationEntryStore implements ConfigurationEntryStore { Set<UUID> children = new HashSet<UUID>(entry.getChildrenIds()); children.remove(uuid); - ConfigurationEntry referal = new ConfigurationEntry(entry.getId(), entry.getType(), + ConfigurationEntry referral = new ConfigurationEntry(entry.getId(), entry.getType(), entry.getAttributes(), children, this); - _entries.put(entry.getId(), referal); + _entries.put(entry.getId(), referral); } } removedIds.add(uuid); diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/configuration/store/StoreConfigurationChangeListener.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/configuration/store/StoreConfigurationChangeListener.java index 3022898300..6cd3447ebd 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/configuration/store/StoreConfigurationChangeListener.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/configuration/store/StoreConfigurationChangeListener.java @@ -79,7 +79,7 @@ public class StoreConfigurationChangeListener implements ConfigurationChangeList } @Override - public void attributeSet(ConfiguredObject object, String attrinuteName, Object oldAttributeValue, Object newAttributeValue) + public void attributeSet(ConfiguredObject object, String attributeName, Object oldAttributeValue, Object newAttributeValue) { _store.save(toConfigurationEntry(object)); } @@ -87,13 +87,13 @@ public class StoreConfigurationChangeListener implements ConfigurationChangeList private ConfigurationEntry toConfigurationEntry(ConfiguredObject object) { Class<? extends ConfiguredObject> objectType = getConfiguredObjectType(object); - Set<UUID> childrenIds = getChildernIds(object, objectType); + Set<UUID> childrenIds = getChildrenIds(object, objectType); ConfigurationEntry entry = new ConfigurationEntry(object.getId(), objectType.getSimpleName(), object.getActualAttributes(), childrenIds, _store); return entry; } - private Set<UUID> getChildernIds(ConfiguredObject object, Class<? extends ConfiguredObject> objectType) + private Set<UUID> getChildrenIds(ConfiguredObject object, Class<? extends ConfiguredObject> objectType) { // Virtual Host children's IDs should not be stored in broker store if (object instanceof VirtualHost) diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/configuration/updater/TaskExecutor.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/configuration/updater/TaskExecutor.java index 671104d413..22863c089e 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/configuration/updater/TaskExecutor.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/configuration/updater/TaskExecutor.java @@ -267,7 +267,7 @@ public class TaskExecutor } catch (Exception e) { - LOGGER.warn("Unxpected exception on current actor removal", e); + LOGGER.warn("Unexpected exception on current actor removal", e); } try { @@ -275,7 +275,7 @@ public class TaskExecutor } catch (Exception e) { - LOGGER.warn("Unxpected exception on nullifying of subject for a security manager", e); + LOGGER.warn("Unexpected exception on nullifying of subject for a security manager", e); } } } diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/connection/ConnectionRegistry.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/connection/ConnectionRegistry.java index b933d3f961..b23e012df6 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/connection/ConnectionRegistry.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/connection/ConnectionRegistry.java @@ -82,32 +82,32 @@ public class ConnectionRegistry implements IConnectionRegistry, Closeable } } - public void registerConnection(AMQConnectionModel connnection) + public void registerConnection(AMQConnectionModel connection) { synchronized (this) { - _registry.add(connnection); + _registry.add(connection); synchronized (_listeners) { for(RegistryChangeListener listener : _listeners) { - listener.connectionRegistered(connnection); + listener.connectionRegistered(connection); } } } } - public void deregisterConnection(AMQConnectionModel connnection) + public void deregisterConnection(AMQConnectionModel connection) { synchronized (this) { - _registry.remove(connnection); + _registry.remove(connection); synchronized (_listeners) { for(RegistryChangeListener listener : _listeners) { - listener.connectionUnregistered(connnection); + listener.connectionUnregistered(connection); } } } diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/connection/IConnectionRegistry.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/connection/IConnectionRegistry.java index 07d934027e..77febd9312 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/connection/IConnectionRegistry.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/connection/IConnectionRegistry.java @@ -39,9 +39,9 @@ public interface IConnectionRegistry public List<AMQConnectionModel> getConnections(); - public void registerConnection(AMQConnectionModel connnection); + public void registerConnection(AMQConnectionModel connection); - public void deregisterConnection(AMQConnectionModel connnection); + public void deregisterConnection(AMQConnectionModel connection); void addRegistryChangeListener(RegistryChangeListener listener); diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/ExchangeInUseException.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/ExchangeInUseException.java index c77f114428..42b58da07e 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/ExchangeInUseException.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/ExchangeInUseException.java @@ -33,7 +33,7 @@ import org.apache.qpid.AMQException; * @todo Not an AMQP exception as no status code. * * @todo This exception is not used. However, it is part of the ExchangeRegistry interface, and looks like code is - * going to need to be added to throw/deal with this. Alternatively ExchangeResitries may be able to handle the + * going to need to be added to throw/deal with this. Alternatively ExchangeRegistries may be able to handle the * issue internally. */ public class ExchangeInUseException extends AMQException diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/FanoutExchange.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/FanoutExchange.java index 22b0fed6b2..ba60d956fd 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/FanoutExchange.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/FanoutExchange.java @@ -168,7 +168,7 @@ public class FanoutExchange extends AbstractExchange } catch (AMQInvalidArgumentException e) { - _logger.warn("Cannoy bind queue " + queue + " to exchange this " + this + " beacuse selector cannot be parsed.", e); + _logger.warn("Cannot bind queue " + queue + " to exchange this " + this + " because selector cannot be parsed.", e); return; } } diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/topic/TopicMatcherDFAState.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/topic/TopicMatcherDFAState.java index 85338c0760..e526a070c8 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/topic/TopicMatcherDFAState.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/topic/TopicMatcherDFAState.java @@ -44,7 +44,7 @@ public class TopicMatcherDFAState private final Collection<TopicMatcherResult> _results; private final Map<TopicWord, TopicMatcherDFAState> _nextStateMap; - private static final String TOPIC_DELIMITTER = "\\."; + private static final String TOPIC_DELIMITER = "\\."; public TopicMatcherDFAState(Map<TopicWord, TopicMatcherDFAState> nextStateMap, @@ -69,7 +69,7 @@ public class TopicMatcherDFAState public Collection<TopicMatcherResult> parse(TopicWordDictionary dictionary, String routingKey) { - return parse(dictionary, Arrays.asList(routingKey.split(TOPIC_DELIMITTER)).iterator()); + return parse(dictionary, Arrays.asList(routingKey.split(TOPIC_DELIMITER)).iterator()); } private Collection<TopicMatcherResult> parse(final TopicWordDictionary dictionary, diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/filter/FilterManagerFactory.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/filter/FilterManagerFactory.java index dda3973ed8..dc6d5d0123 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/filter/FilterManagerFactory.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/filter/FilterManagerFactory.java @@ -41,7 +41,7 @@ public class FilterManagerFactory { } - //fixme move to a common class so it can be refered to from client code. + //TODO move to a common class so it can be referred to from client code. public static FilterManager createManager(Map<String,Object> filters) throws AMQException { diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/logging/NullRootMessageLogger.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/logging/NullRootMessageLogger.java index db8b24e90e..64e16d9ee8 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/logging/NullRootMessageLogger.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/logging/NullRootMessageLogger.java @@ -24,7 +24,7 @@ public class NullRootMessageLogger extends AbstractRootMessageLogger { @Override - public boolean isMessageEnabled(LogActor actor, LogSubject subject, String logHeirarchy) + public boolean isMessageEnabled(LogActor actor, LogSubject subject, String logHierarchy) { return false; } diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/logging/RootMessageLogger.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/logging/RootMessageLogger.java index 1431dd1da9..c31e528c55 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/logging/RootMessageLogger.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/logging/RootMessageLogger.java @@ -65,10 +65,10 @@ public interface RootMessageLogger /** * Log the raw message to the configured logger. - * Along with a formated stack trace from the Throwable. + * Along with a formatted stack trace from the Throwable. * * @param message The message to log - * @param throwable Optional Throwable that should provide stact trace + * @param throwable Optional Throwable that should provide stack trace * @param logHierarchy The log hierarchy for this request */ void rawMessage(String message, Throwable throwable, String logHierarchy); diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/logging/SystemOutMessageLogger.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/logging/SystemOutMessageLogger.java index b384b3fde3..63c1bcc712 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/logging/SystemOutMessageLogger.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/logging/SystemOutMessageLogger.java @@ -24,7 +24,7 @@ package org.apache.qpid.server.logging; public class SystemOutMessageLogger extends AbstractRootMessageLogger { @Override - public boolean isMessageEnabled(LogActor actor, LogSubject subject, String logHeirarchy) + public boolean isMessageEnabled(LogActor actor, LogSubject subject, String logHierarchy) { return true; } diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/logging/actors/AMQPChannelActor.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/logging/actors/AMQPChannelActor.java index d23122ac5d..9228a2674d 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/logging/actors/AMQPChannelActor.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/logging/actors/AMQPChannelActor.java @@ -25,7 +25,7 @@ import org.apache.qpid.server.logging.RootMessageLogger; import org.apache.qpid.server.logging.subjects.ChannelLogSubject; /** - * An AMQPChannelActor represtents a connection through the AMQP port with an + * An AMQPChannelActor represents a connection through the AMQP port with an * associated Channel. * * <p/> diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/logging/actors/AMQPConnectionActor.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/logging/actors/AMQPConnectionActor.java index 99e11bf9ae..d4213b2876 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/logging/actors/AMQPConnectionActor.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/logging/actors/AMQPConnectionActor.java @@ -26,7 +26,7 @@ import org.apache.qpid.server.protocol.AMQConnectionModel; /** - * An AMQPConnectionActor represtents a connectionthrough the AMQP port. + * An AMQPConnectionActor represents a connection through the AMQP port. * <p/> * This is responsible for correctly formatting the LogActor String in the log * <p/> diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/logging/actors/SubscriptionActor.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/logging/actors/SubscriptionActor.java index a2dbf2f6ee..906cd6db3a 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/logging/actors/SubscriptionActor.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/logging/actors/SubscriptionActor.java @@ -26,7 +26,7 @@ import org.apache.qpid.server.subscription.Subscription; /** * The subscription actor provides formatted logging for actions that are - * performed by the subsciption. Such as STATE changes. + * performed by the subscription. Such as STATE changes. */ public class SubscriptionActor extends AbstractActor { diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/logging/subjects/AbstractLogSubject.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/logging/subjects/AbstractLogSubject.java index baccf240ff..46fcc3eda2 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/logging/subjects/AbstractLogSubject.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/logging/subjects/AbstractLogSubject.java @@ -25,11 +25,11 @@ import org.apache.qpid.server.logging.LogSubject; import java.text.MessageFormat; /** - * The LogSubjects all have a similar requriement to format their output and + * The LogSubjects all have a similar requirement to format their output and * provide the String value. * * This Abstract LogSubject provides this basic functionality, allowing the - * actual LogSubjects to provide their formating and data. + * actual LogSubjects to provide their formatting and data. */ public abstract class AbstractLogSubject implements LogSubject { diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/logging/subjects/SubscriptionLogSubject.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/logging/subjects/SubscriptionLogSubject.java index 9a23b733dc..0292fe3506 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/logging/subjects/SubscriptionLogSubject.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/logging/subjects/SubscriptionLogSubject.java @@ -36,7 +36,7 @@ public class SubscriptionLogSubject extends AbstractLogSubject */ public SubscriptionLogSubject(Subscription subscription) { - // Delegate the formating of the Queue to the QueueLogSubject. So final + // Delegate the formatting of the Queue to the QueueLogSubject. So final // log string format is: // [ sub:<id>(vh(<vhost>)/qu(<queue>)) ] diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/message/AbstractServerMessageImpl.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/message/AbstractServerMessageImpl.java index e5aa6c1158..a2b7dd10e1 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/message/AbstractServerMessageImpl.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/message/AbstractServerMessageImpl.java @@ -63,7 +63,7 @@ public abstract class AbstractServerMessageImpl<X extends AbstractServerMessageI } /** - * Threadsafe. This will decrement the reference count and when it reaches zero will remove the message from the + * Thread-safe. This will decrement the reference count and when it reaches zero will remove the message from the * message store. * */ diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/AuthenticationMethod.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/AuthenticationMethod.java index 7a5927a365..cfc780541a 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/AuthenticationMethod.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/AuthenticationMethod.java @@ -24,7 +24,7 @@ import java.util.Collection; public interface AuthenticationMethod extends ConfiguredObject { - // name is the SASL mech where this is a SASL authentication + // name is the SASL mechanism where this is a SASL authentication // parents VirtualHostAlias getVirtualHostAlias(); diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/ConfiguredObject.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/ConfiguredObject.java index 45e743dbca..6762e3dd93 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/ConfiguredObject.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/ConfiguredObject.java @@ -79,12 +79,12 @@ public interface ConfiguredObject * Change the desired state of the object * * Request a change to the current state. The caller must pass in the state it believe the object to be in, if - * this differs from the current desired state when the object evalues the request, then no state change will occur. + * this differs from the current desired state when the object evaluates the request, then no state change will occur. * * @param currentState the state the caller believes the object to be in * @param desiredState the state the caller wishes the object to attain * @return the new current state - * @throws IllegalStateTransitionException the requested state tranisition is invalid + * @throws IllegalStateTransitionException the requested state transition is invalid * @throws AccessControlException the current context does not have sufficient permissions to change the state */ State setDesiredState(State currentState, State desiredState) throws IllegalStateTransitionException, diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/AbstractAdapter.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/AbstractAdapter.java index 9ac2cb00a3..7cc88f8743 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/AbstractAdapter.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/AbstractAdapter.java @@ -203,14 +203,14 @@ public abstract class AbstractAdapter implements ConfiguredObject } } - protected void attributeSet(String attrinuteName, Object oldAttributeValue, Object newAttributeValue) + protected void attributeSet(String attributeName, Object oldAttributeValue, Object newAttributeValue) { synchronized (_changeListeners) { List<ConfigurationChangeListener> copy = new ArrayList<ConfigurationChangeListener>(_changeListeners); for(ConfigurationChangeListener listener : copy) { - listener.attributeSet(this, attrinuteName, oldAttributeValue, newAttributeValue); + listener.attributeSet(this, attributeName, oldAttributeValue, newAttributeValue); } } } @@ -278,7 +278,7 @@ public abstract class AbstractAdapter implements ConfiguredObject if((currentValue == null && expected == null) || (currentValue != null && currentValue.equals(expected))) { - //TODO: dont put nulls + //TODO: don't put nulls _attributes.put(name, desired); return true; } diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/AccessControlProviderFactory.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/AccessControlProviderFactory.java index 6cdf2f2c1a..5e203532c6 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/AccessControlProviderFactory.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/AccessControlProviderFactory.java @@ -36,7 +36,7 @@ import org.apache.qpid.server.security.AccessControl; public class AccessControlProviderFactory { private final Iterable<AccessControlFactory> _factories; - private Collection<String> _supportedAcessControlProviders; + private Collection<String> _supportedAccessControlProviders; public AccessControlProviderFactory(QpidServiceLoader<AccessControlFactory> accessControlFactoryServiceLoader) { @@ -46,7 +46,7 @@ public class AccessControlProviderFactory { supportedAccessControlProviders.add(factory.getType()); } - _supportedAcessControlProviders = Collections.unmodifiableCollection(supportedAccessControlProviders); + _supportedAccessControlProviders = Collections.unmodifiableCollection(supportedAccessControlProviders); } /** @@ -85,6 +85,6 @@ public class AccessControlProviderFactory public Collection<String> getSupportedAuthenticationProviders() { - return _supportedAcessControlProviders; + return _supportedAccessControlProviders; } } diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/AuthenticationProviderAdapter.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/AuthenticationProviderAdapter.java index 656bdc9acf..033429980f 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/AuthenticationProviderAdapter.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/AuthenticationProviderAdapter.java @@ -549,8 +549,8 @@ public abstract class AuthenticationProviderAdapter<T extends AuthenticationMana if(createUser(username, password,null)) { @SuppressWarnings("unchecked") - C pricipalAdapter = (C) new PrincipalAdapter(p); - return pricipalAdapter; + C principalAdapter = (C) new PrincipalAdapter(p); + return principalAdapter; } else { diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/VirtualHostAdapter.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/VirtualHostAdapter.java index 859a7c784c..300b6e6618 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/VirtualHostAdapter.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/VirtualHostAdapter.java @@ -1100,7 +1100,7 @@ public final class VirtualHostAdapter extends AbstractAdapter implements Virtual } catch(Exception e) { - LOGGER.warn("Exception occured on store deletion", e); + LOGGER.warn("Exception occurred on store deletion", e); } } diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/AMQQueue.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/AMQQueue.java index c00881ca94..0cddd1ed3b 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/AMQQueue.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/AMQQueue.java @@ -143,7 +143,7 @@ public interface AMQQueue extends Comparable<AMQQueue>, ExchangeReferrer, Transa List<Long> getMessagesOnTheQueue(int num); - List<Long> getMessagesOnTheQueue(int num, int offest); + List<Long> getMessagesOnTheQueue(int num, int offset); QueueEntry getMessageOnTheQueue(long messageId); diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/AMQQueueFactory.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/AMQQueueFactory.java index 029c7e4f86..38c205bc00 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/AMQQueueFactory.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/AMQQueueFactory.java @@ -117,7 +117,7 @@ public class AMQQueueFactory implements QueueFactory abstract void setPropertyValue(AMQQueue queue, int value); } - private static final QueueProperty[] DECLAREABLE_PROPERTIES = { + private static final QueueProperty[] DECLARABLE_PROPERTIES = { new QueueLongProperty(Queue.ALERT_THRESHOLD_MESSAGE_AGE) { public void setPropertyValue(AMQQueue queue, long value) @@ -304,7 +304,7 @@ public class AMQQueueFactory implements QueueFactory if(arguments != null) { - for(QueueProperty p : DECLAREABLE_PROPERTIES) + for(QueueProperty p : DECLARABLE_PROPERTIES) { if(arguments.containsKey(p.getArgumentName())) { @@ -348,7 +348,7 @@ public class AMQQueueFactory implements QueueFactory if(dlQueue == null) { - //set args to disable DLQ'ing/MDC from the DLQ itself, preventing loops etc + //set args to disable DLQ-ing/MDC from the DLQ itself, preventing loops etc final Map<String, Object> args = new HashMap<String, Object>(); args.put(Queue.CREATE_DLQ_ON_CREATION, false); args.put(Queue.MAXIMUM_DELIVERY_ATTEMPTS, 0); diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/QueueEntryImpl.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/QueueEntryImpl.java index e7270e2028..ed61f1acf6 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/QueueEntryImpl.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/QueueEntryImpl.java @@ -305,7 +305,7 @@ public abstract class QueueEntryImpl implements QueueEntry { return _rejectedBy.contains(subscriptionId); } - else // This messasge hasn't been rejected yet. + else // This message hasn't been rejected yet. { return false; } diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java index 4101437711..d63d1946d3 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java @@ -120,7 +120,7 @@ public class SimpleAMQQueue implements AMQQueue, Subscription.StateListener, Mes private final AtomicLong _persistentMessageDequeueSize = new AtomicLong(); private final AtomicLong _persistentMessageEnqueueCount = new AtomicLong(); private final AtomicLong _persistentMessageDequeueCount = new AtomicLong(); - private final AtomicInteger _counsumerCountHigh = new AtomicInteger(0); + private final AtomicInteger _consumerCountHigh = new AtomicInteger(0); private final AtomicLong _msgTxnEnqueues = new AtomicLong(0); private final AtomicLong _byteTxnEnqueues = new AtomicLong(0); private final AtomicLong _msgTxnDequeues = new AtomicLong(0); @@ -444,9 +444,9 @@ public class SimpleAMQQueue implements AMQQueue, Subscription.StateListener, Mes //Increment consumerCountHigh if necessary. (un)registerSubscription are both //synchronized methods so we don't need additional synchronization here - if(_counsumerCountHigh.get() < getConsumerCount()) + if(_consumerCountHigh.get() < getConsumerCount()) { - _counsumerCountHigh.incrementAndGet(); + _consumerCountHigh.incrementAndGet(); } if (isDeleted()) @@ -498,7 +498,7 @@ public class SimpleAMQQueue implements AMQQueue, Subscription.StateListener, Mes { if (_logger.isInfoEnabled()) { - _logger.info("Auto-deleteing queue:" + this); + _logger.info("Auto-deleting queue:" + this); } getVirtualHost().removeQueue(this); @@ -961,7 +961,7 @@ public class SimpleAMQQueue implements AMQQueue, Subscription.StateListener, Mes public int getConsumerCountHigh() { - return _counsumerCountHigh.get(); + return _consumerCountHigh.get(); } public int getActiveConsumerCount() @@ -1909,7 +1909,7 @@ public class SimpleAMQQueue implements AMQQueue, Subscription.StateListener, Mes // Only process nodes that are not currently deleted and not dequeued if (!node.isDeleted()) { - // If the node has exired then acquire it + // If the node has expired then acquire it if (node.expired() && node.acquire()) { if (_logger.isDebugEnabled()) diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/registry/ApplicationRegistry.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/registry/ApplicationRegistry.java index 8e7916e4b2..cc1b22d8e1 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/registry/ApplicationRegistry.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/registry/ApplicationRegistry.java @@ -206,7 +206,7 @@ public class ApplicationRegistry implements IApplicationRegistry } catch(Exception e) { - ApplicationRegistry._logger.warn("Unexpected exception occured while reporting the statistics", e); + ApplicationRegistry._logger.warn("Unexpected exception occurred while reporting the statistics", e); } finally { diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/database/Base64MD5PasswordFilePrincipalDatabase.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/database/Base64MD5PasswordFilePrincipalDatabase.java index 4f3892c2c6..a11f11e3fb 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/database/Base64MD5PasswordFilePrincipalDatabase.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/database/Base64MD5PasswordFilePrincipalDatabase.java @@ -78,7 +78,7 @@ public class Base64MD5PasswordFilePrincipalDatabase extends AbstractPasswordFile if (pwd == null) { - throw new AccountNotFoundException("Unable to lookup the specfied users password"); + throw new AccountNotFoundException("Unable to lookup the specified users password"); } byte[] byteArray = new byte[password.length]; diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/database/PlainPasswordFilePrincipalDatabase.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/database/PlainPasswordFilePrincipalDatabase.java index 34d2710472..d983fe6418 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/database/PlainPasswordFilePrincipalDatabase.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/database/PlainPasswordFilePrincipalDatabase.java @@ -86,7 +86,7 @@ public class PlainPasswordFilePrincipalDatabase extends AbstractPasswordFilePrin if (pwd == null) { - throw new AccountNotFoundException("Unable to lookup the specfied users password"); + throw new AccountNotFoundException("Unable to lookup the specified users password"); } return compareCharArray(pwd, password); diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/manager/SimpleLDAPAuthenticationManager.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/manager/SimpleLDAPAuthenticationManager.java index 3ac185d78b..726284fcce 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/manager/SimpleLDAPAuthenticationManager.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/manager/SimpleLDAPAuthenticationManager.java @@ -225,7 +225,7 @@ public class SimpleLDAPAuthenticationManager implements AuthenticationManager private InitialDirContext createInitialDirContext(Hashtable<String, Object> env) throws NamingException { - ClassLoader existingContextClassloader = null; + ClassLoader existingContextClassLoader = null; boolean isLdaps = String.valueOf(env.get(Context.PROVIDER_URL)).trim().toLowerCase().startsWith("ldaps:"); @@ -234,7 +234,7 @@ public class SimpleLDAPAuthenticationManager implements AuthenticationManager { if (isLdaps && _sslSocketFactoryOverrideClass != null) { - existingContextClassloader = Thread.currentThread().getContextClassLoader(); + existingContextClassLoader = Thread.currentThread().getContextClassLoader(); env.put(JAVA_NAMING_LDAP_FACTORY_SOCKET, _sslSocketFactoryOverrideClass.getName()); Thread.currentThread().setContextClassLoader(_sslSocketFactoryOverrideClass.getClassLoader()); revertContentClassLoader = true; @@ -245,7 +245,7 @@ public class SimpleLDAPAuthenticationManager implements AuthenticationManager { if (revertContentClassLoader) { - Thread.currentThread().setContextClassLoader(existingContextClassloader); + Thread.currentThread().setContextClassLoader(existingContextClassLoader); } } } diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/sasl/crammd5/CRAMMD5HexInitialiser.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/sasl/crammd5/CRAMMD5HexInitialiser.java index c4c4b4e0cf..7d41ed44cc 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/sasl/crammd5/CRAMMD5HexInitialiser.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/sasl/crammd5/CRAMMD5HexInitialiser.java @@ -48,11 +48,11 @@ public class CRAMMD5HexInitialiser extends UsernamePasswordInitialiser private static class HexifyPrincipalDatabase implements PrincipalDatabase { - private PrincipalDatabase _realPricipalDatabase; + private PrincipalDatabase _realPrincipalDatabase; HexifyPrincipalDatabase(PrincipalDatabase db) { - _realPricipalDatabase = db; + _realPrincipalDatabase = db; } private char[] toHex(char[] password) @@ -80,7 +80,7 @@ public class CRAMMD5HexInitialiser extends UsernamePasswordInitialiser public void setPassword(Principal principal, PasswordCallback callback) throws IOException, AccountNotFoundException { //Let the read DB set the password - _realPricipalDatabase.setPassword(principal, callback); + _realPrincipalDatabase.setPassword(principal, callback); //Retrieve the setpassword char[] plainPassword = callback.getPassword(); @@ -93,37 +93,37 @@ public class CRAMMD5HexInitialiser extends UsernamePasswordInitialiser // Simply delegate to the real PrincipalDB public boolean verifyPassword(String principal, char[] password) throws AccountNotFoundException { - return _realPricipalDatabase.verifyPassword(principal, password); + return _realPrincipalDatabase.verifyPassword(principal, password); } public boolean updatePassword(Principal principal, char[] password) throws AccountNotFoundException { - return _realPricipalDatabase.updatePassword(principal, password); + return _realPrincipalDatabase.updatePassword(principal, password); } public boolean createPrincipal(Principal principal, char[] password) { - return _realPricipalDatabase.createPrincipal(principal, password); + return _realPrincipalDatabase.createPrincipal(principal, password); } public boolean deletePrincipal(Principal principal) throws AccountNotFoundException { - return _realPricipalDatabase.deletePrincipal(principal); + return _realPrincipalDatabase.deletePrincipal(principal); } public Principal getUser(String username) { - return _realPricipalDatabase.getUser(username); + return _realPrincipalDatabase.getUser(username); } public List<Principal> getUsers() { - return _realPricipalDatabase.getUsers(); + return _realPrincipalDatabase.getUsers(); } public void reload() throws IOException { - _realPricipalDatabase.reload(); + _realPrincipalDatabase.reload(); } @Override @@ -135,14 +135,14 @@ public class CRAMMD5HexInitialiser extends UsernamePasswordInitialiser @Override public String getMechanisms() { - return _realPricipalDatabase.getMechanisms(); + return _realPrincipalDatabase.getMechanisms(); } @Override public SaslServer createSaslServer(String mechanism, String localFQDN, Principal externalPrincipal) throws SaslException { - return _realPricipalDatabase.createSaslServer(mechanism, localFQDN, externalPrincipal); + return _realPrincipalDatabase.createSaslServer(mechanism, localFQDN, externalPrincipal); } } diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/stats/StatisticsGatherer.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/stats/StatisticsGatherer.java index 37d87bb628..306191d528 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/stats/StatisticsGatherer.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/stats/StatisticsGatherer.java @@ -28,7 +28,7 @@ package org.apache.qpid.server.stats; * parts of the broker to set up and configure statistics generation. * <p> * When creating these objects, there should be a parent/child relationship - * between them, such that the lowest level gatherer can record staticics if + * between them, such that the lowest level gatherer can record statistics if * enabled, and pass on the notification to the parent object to allow higher * level aggregation. When resetting statistics, this works in the opposite * direction, with higher level gatherers also resetting all of their children. diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/DurableConfigurationRecoverer.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/DurableConfigurationRecoverer.java index 7fb80bde96..1caaedf6dc 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/DurableConfigurationRecoverer.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/DurableConfigurationRecoverer.java @@ -85,7 +85,7 @@ public class DurableConfigurationRecoverer implements ConfigurationRecoveryHandl DurableConfiguredObjectRecoverer recoverer = getRecoverer(type); if(recoverer == null) { - throw new IllegalConfigurationException("Unkown type for configured object: " + type); + throw new IllegalConfigurationException("Unknown type for configured object: " + type); } recoverer.load(this, id, attributes); } diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/StateManager.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/StateManager.java index 613b329beb..e4efc26477 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/StateManager.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/StateManager.java @@ -73,7 +73,7 @@ public class StateManager } public static final Transition INITIALISE = new Transition(State.INITIAL, State.INITIALISING, Event.BEFORE_INIT); - public static final Transition INITALISE_COMPLETE = new Transition(State.INITIALISING, State.INITIALISED, Event.AFTER_INIT); + public static final Transition INITIALISE_COMPLETE = new Transition(State.INITIALISING, State.INITIALISED, Event.AFTER_INIT); public static final Transition ACTIVATE = new Transition(State.INITIALISED, State.ACTIVATING, Event.BEFORE_ACTIVATE); public static final Transition ACTIVATE_COMPLETE = new Transition(State.ACTIVATING, State.ACTIVE, Event.AFTER_ACTIVATE); diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/subscription/SubscriptionList.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/subscription/SubscriptionList.java index bf5ce31bd9..23d4fb241f 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/subscription/SubscriptionList.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/subscription/SubscriptionList.java @@ -173,7 +173,7 @@ public class SubscriptionList insert(new SubscriptionNode(), false); } - //advance the next node reference in the 'prevNode' to scavange + //advance the next node reference in the 'prevNode' to scavenge //the newly 'deleted' node for the Subscription. prevNode.findNext(); diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/txn/AsyncAutoCommitTransaction.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/txn/AsyncAutoCommitTransaction.java index 8eb794c102..1f5a4907ed 100755 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/txn/AsyncAutoCommitTransaction.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/txn/AsyncAutoCommitTransaction.java @@ -51,7 +51,7 @@ public class AsyncAutoCommitTransaction implements ServerTransaction private final MessageStore _messageStore; private final FutureRecorder _futureRecorder; - //Set true to ensure strict ordering when enqueing messages with mixed delivery mode, i.e. disable async persistence + //Set true to ensure strict ordering when enqueuing messages with mixed delivery mode, i.e. disable async persistence private boolean _strictOrderWithMixedDeliveryMode = Boolean.getBoolean(QPID_STRICT_ORDER_WITH_MIXED_DELIVERY_MODE); public static interface FutureRecorder diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/DefaultUpgraderProvider.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/DefaultUpgraderProvider.java index 6474e00c24..12f8c7dae8 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/DefaultUpgraderProvider.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/DefaultUpgraderProvider.java @@ -173,7 +173,7 @@ public class DefaultUpgraderProvider implements UpgraderProvider /* * Change the type string from org.apache.qpid.server.model.Foo to Foo (in line with the practice in the broker - * configuration store). Also remove bindings which reference non-existant queues or exchanges. + * configuration store). Also remove bindings which reference nonexistent queues or exchanges. */ private class Version1Upgrader extends NonNullUpgrader { diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/BrokerOptionsTest.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/BrokerOptionsTest.java index c22fcf4a14..d60b852e55 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/BrokerOptionsTest.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/BrokerOptionsTest.java @@ -94,7 +94,7 @@ public class BrokerOptionsTest extends QpidTestCase assertEquals(expectedPath, _options.getLogConfigFileLocation()); } - public void testDefaultLogConfigFileWithoutQpiddHome() + public void testDefaultLogConfigFileWithoutQpidHome() { setTestSystemProperty(BrokerProperties.PROPERTY_QPID_HOME, null); @@ -271,7 +271,7 @@ public class BrokerOptionsTest extends QpidTestCase assertEquals("unexpected number of entries", 6, _options.getConfigProperties().keySet().size()); } - public void testDefaultomeDirWithoutQpidHome() + public void testDefaultHomeDirWithoutQpidHome() { setTestSystemProperty("QPID_HOME", null); diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/TransactionTimeoutHelperTest.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/TransactionTimeoutHelperTest.java index 96078d766c..7a7954c8f9 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/TransactionTimeoutHelperTest.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/TransactionTimeoutHelperTest.java @@ -95,9 +95,9 @@ public class TransactionTimeoutHelperTest extends QpidTestCase public void testIdleTransactionProducesWarningOnly() throws Exception { final long sixtyOneSecondsAgo = _now - SECONDS.toMillis(61); - final long thrityOneSecondsAgo = _now - SECONDS.toMillis(31); + final long thirtyOneSecondsAgo = _now - SECONDS.toMillis(31); - configureMockTransaction(sixtyOneSecondsAgo, thrityOneSecondsAgo); + configureMockTransaction(sixtyOneSecondsAgo, thirtyOneSecondsAgo); _transactionTimeoutHelper.checkIdleOrOpenTimes(_transaction, 0, 0, SECONDS.toMillis(30), 0); @@ -108,9 +108,9 @@ public class TransactionTimeoutHelperTest extends QpidTestCase public void testIdleTransactionProducesTimeoutActionOnly() throws Exception { final long sixtyOneSecondsAgo = _now - SECONDS.toMillis(61); - final long thrityOneSecondsAgo = _now - SECONDS.toMillis(31); + final long thirtyOneSecondsAgo = _now - SECONDS.toMillis(31); - configureMockTransaction(sixtyOneSecondsAgo, thrityOneSecondsAgo); + configureMockTransaction(sixtyOneSecondsAgo, thirtyOneSecondsAgo); _transactionTimeoutHelper.checkIdleOrOpenTimes(_transaction, 0, 0, 0, SECONDS.toMillis(30)); @@ -121,9 +121,9 @@ public class TransactionTimeoutHelperTest extends QpidTestCase public void testIdleTransactionProducesWarningAndTimeoutAction() throws Exception { final long sixtyOneSecondsAgo = _now - SECONDS.toMillis(61); - final long thrityOneSecondsAgo = _now - SECONDS.toMillis(31); + final long thirtyOneSecondsAgo = _now - SECONDS.toMillis(31); - configureMockTransaction(sixtyOneSecondsAgo, thrityOneSecondsAgo); + configureMockTransaction(sixtyOneSecondsAgo, thirtyOneSecondsAgo); _transactionTimeoutHelper.checkIdleOrOpenTimes(_transaction, 0, 0, SECONDS.toMillis(15), SECONDS.toMillis(30)); @@ -176,9 +176,9 @@ public class TransactionTimeoutHelperTest extends QpidTestCase when(_transaction.getTransactionUpdateTime()).thenReturn(updateTime); } - private LogMessage isLogMessage(String expectedlogHierarchy, String expectedText) + private LogMessage isLogMessage(String expectedLogHierarchy, String expectedText) { - return argThat(new IsLogMessage(expectedlogHierarchy, expectedText)); + return argThat(new IsLogMessage(expectedLogHierarchy, expectedText)); } class IsLogMessage extends ArgumentMatcher<LogMessage> @@ -188,9 +188,9 @@ public class TransactionTimeoutHelperTest extends QpidTestCase private String _hierarchyMatchesFailure; private String _logMessageMatchesFailure; - public IsLogMessage(String expectedlogHierarchy, String expectedLogMessageMatches) + public IsLogMessage(String expectedLogHierarchy, String expectedLogMessageMatches) { - _expectedLogHierarchy = expectedlogHierarchy; + _expectedLogHierarchy = expectedLogHierarchy; _expectedLogMessageMatches = expectedLogMessageMatches; } diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/configuration/plugins/AbstractConfigurationTest.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/configuration/plugins/AbstractConfigurationTest.java index 0e57b60a6f..79abae85cd 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/configuration/plugins/AbstractConfigurationTest.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/configuration/plugins/AbstractConfigurationTest.java @@ -55,7 +55,7 @@ public class AbstractConfigurationTest extends QpidTestCase @Override public void validateConfiguration() throws ConfigurationException { - // no validation requried + // no validation required } public String getName() @@ -79,22 +79,22 @@ public class AbstractConfigurationTest extends QpidTestCase // Test does not directly use the AppRegistry but the configured broker // is required for the correct ConfigurationPlugin processing super.setUp(); - XMLConfiguration xmlconfig = new XMLConfiguration(); - xmlconfig.addProperty("base.element[@property]", "property"); - xmlconfig.addProperty("base.element.name", "name"); + XMLConfiguration xmlConfig = new XMLConfiguration(); + xmlConfig.addProperty("base.element[@property]", "property"); + xmlConfig.addProperty("base.element.name", "name"); // We make these strings as that is how they will be read from the file. - xmlconfig.addProperty("base.element.positiveLong", String.valueOf(POSITIVE_LONG)); - xmlconfig.addProperty("base.element.negativeLong", String.valueOf(NEGATIVE_LONG)); - xmlconfig.addProperty("base.element.boolean", String.valueOf(true)); - xmlconfig.addProperty("base.element.double", String.valueOf(DOUBLE)); + xmlConfig.addProperty("base.element.positiveLong", String.valueOf(POSITIVE_LONG)); + xmlConfig.addProperty("base.element.negativeLong", String.valueOf(NEGATIVE_LONG)); + xmlConfig.addProperty("base.element.boolean", String.valueOf(true)); + xmlConfig.addProperty("base.element.double", String.valueOf(DOUBLE)); for (int i = 0; i < LIST_SIZE; i++) { - xmlconfig.addProperty("base.element.list", i); + xmlConfig.addProperty("base.element.list", i); } //Use a composite configuration as this is what our broker code uses. CompositeConfiguration composite = new CompositeConfiguration(); - composite.addConfiguration(xmlconfig); + composite.addConfiguration(xmlConfig); _plugin = new TestConfigPlugin(); @@ -117,7 +117,7 @@ public class AbstractConfigurationTest extends QpidTestCase assertFalse("Plugins has configuration", _plugin.hasConfiguration()); } - public void testValuesRetreived() + public void testValuesRetrieved() { assertEquals("Name not correct", "name", _plugin.getName()); assertEquals("Property not correct", "property", _plugin.getProperty()); diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/configuration/startup/BrokerRecovererTest.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/configuration/startup/BrokerRecovererTest.java index c45f4f72a8..c9f17f8443 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/configuration/startup/BrokerRecovererTest.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/configuration/startup/BrokerRecovererTest.java @@ -367,7 +367,7 @@ public class BrokerRecovererTest extends TestCase public ConfiguredObjectRecoverer<? extends ConfiguredObject> getRecoverer(String type) { @SuppressWarnings({ "unchecked", "rawtypes" }) - final ConfiguredObjectRecoverer<? extends ConfiguredObject> recovever = new ConfiguredObjectRecoverer() + final ConfiguredObjectRecoverer<? extends ConfiguredObject> recoverer = new ConfiguredObjectRecoverer() { @Override public ConfiguredObject create(RecovererProvider recovererProvider, ConfigurationEntry entry, ConfiguredObject... parents) @@ -384,7 +384,7 @@ public class BrokerRecovererTest extends TestCase } }; - return recovever; + return recoverer; } }; return recovererProvider; diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/configuration/startup/DefaultRecovererProviderTest.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/configuration/startup/DefaultRecovererProviderTest.java index 9e2f2fcf32..8f3afe3468 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/configuration/startup/DefaultRecovererProviderTest.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/configuration/startup/DefaultRecovererProviderTest.java @@ -61,8 +61,8 @@ public class DefaultRecovererProviderTest extends TestCase mock(StoreConfigurationChangeListener.class)); for (String configuredObjectType : supportedTypes) { - ConfiguredObjectRecoverer<?> recovever = provider.getRecoverer(configuredObjectType); - assertNotNull("Null recoverer for type: " + configuredObjectType, recovever); + ConfiguredObjectRecoverer<?> recoverer = provider.getRecoverer(configuredObjectType); + assertNotNull("Null recoverer for type: " + configuredObjectType, recoverer); } } diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/configuration/startup/KeyStoreRecovererTest.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/configuration/startup/KeyStoreRecovererTest.java index e0a736df89..b372b44e42 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/configuration/startup/KeyStoreRecovererTest.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/configuration/startup/KeyStoreRecovererTest.java @@ -51,9 +51,9 @@ public class KeyStoreRecovererTest extends TestCase when(entry.getAttributes()).thenReturn(attributes); when(entry.getId()).thenReturn(id); - KeyStoreRecoverer recovever = new KeyStoreRecoverer(); + KeyStoreRecoverer recoverer = new KeyStoreRecoverer(); - KeyStore keyStore = recovever.create(null, entry, broker); + KeyStore keyStore = recoverer.create(null, entry, broker); assertNotNull("Key store configured object is not created", keyStore); assertEquals(id, keyStore.getId()); @@ -61,7 +61,7 @@ public class KeyStoreRecovererTest extends TestCase assertEquals(TestSSLConstants.BROKER_TRUSTSTORE_PASSWORD, keyStore.getPassword()); assertNotNull(keyStore.getPassword()); - //verify that we havent configured the key store with the actual dummy password value + //verify that we haven't configured the key store with the actual dummy password value assertFalse(AbstractKeyStoreAdapter.DUMMY_PASSWORD_MASK.equals(keyStore.getPassword())); // Verify the remaining attributes, including that the password value returned @@ -83,7 +83,7 @@ public class KeyStoreRecovererTest extends TestCase ConfigurationEntry entry = mock(ConfigurationEntry.class); when(entry.getId()).thenReturn(id); - KeyStoreRecoverer recovever = new KeyStoreRecoverer(); + KeyStoreRecoverer recoverer = new KeyStoreRecoverer(); String[] mandatoryProperties = {KeyStore.NAME, KeyStore.PATH, KeyStore.PASSWORD}; for (int i = 0; i < mandatoryProperties.length; i++) @@ -93,7 +93,7 @@ public class KeyStoreRecovererTest extends TestCase when(entry.getAttributes()).thenReturn(properties); try { - recovever.create(null, entry, broker); + recoverer.create(null, entry, broker); fail("Cannot create key store without a " + mandatoryProperties[i]); } catch(IllegalArgumentException e) diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/configuration/startup/TrustStoreRecovererTest.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/configuration/startup/TrustStoreRecovererTest.java index 4d92f99306..3ffa5e496f 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/configuration/startup/TrustStoreRecovererTest.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/configuration/startup/TrustStoreRecovererTest.java @@ -59,7 +59,7 @@ public class TrustStoreRecovererTest extends QpidTestCase assertEquals(TestSSLConstants.BROKER_TRUSTSTORE_PASSWORD, trustStore.getPassword()); assertNotNull(trustStore.getPassword()); - //verify that we havent configured the trust store with the actual dummy password value + //verify that we haven't configured the trust store with the actual dummy password value assertFalse(AbstractKeyStoreAdapter.DUMMY_PASSWORD_MASK.equals(trustStore.getPassword())); // Verify the remaining attributes, including that the password value returned @@ -82,7 +82,7 @@ public class TrustStoreRecovererTest extends QpidTestCase when(entry.getAttributes()).thenReturn(attributes); when(entry.getId()).thenReturn(id); - TrustStoreRecoverer recovever = new TrustStoreRecoverer(); + TrustStoreRecoverer recoverer = new TrustStoreRecoverer(); String[] mandatoryProperties = {TrustStore.NAME, TrustStore.PATH, TrustStore.PASSWORD}; for (int i = 0; i < mandatoryProperties.length; i++) @@ -92,7 +92,7 @@ public class TrustStoreRecovererTest extends QpidTestCase when(entry.getAttributes()).thenReturn(properties); try { - recovever.create(null, entry, broker); + recoverer.create(null, entry, broker); fail("Cannot create key store without a " + mandatoryProperties[i]); } catch(IllegalArgumentException e) diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/configuration/startup/VirtualHostRecovererTest.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/configuration/startup/VirtualHostRecovererTest.java index f00d12b77d..422a266efb 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/configuration/startup/VirtualHostRecovererTest.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/configuration/startup/VirtualHostRecovererTest.java @@ -64,7 +64,7 @@ public class VirtualHostRecovererTest extends TestCase assertEquals("Unexpected name", getName(), host.getName()); } - public void testCreateVirtualHostFromStoreConfigAtrributes() + public void testCreateVirtualHostFromStoreConfigAttributes() { StatisticsGatherer statisticsGatherer = mock(StatisticsGatherer.class); SecurityManager securityManager = mock(SecurityManager.class); @@ -121,7 +121,7 @@ public class VirtualHostRecovererTest extends TestCase try { recoverer.create(null, entry, parent); - fail("Cannot create a virtual host without a manadatory attribute " + name); + fail("Cannot create a virtual host without a mandatory attribute " + name); } catch(IllegalConfigurationException e) { diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/configuration/store/ConfigurationEntryStoreTestCase.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/configuration/store/ConfigurationEntryStoreTestCase.java index df7e06e2e6..d419030c1d 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/configuration/store/ConfigurationEntryStoreTestCase.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/configuration/store/ConfigurationEntryStoreTestCase.java @@ -199,9 +199,9 @@ public abstract class ConfigurationEntryStoreTestCase extends QpidTestCase assertNotNull("Root entry does not exist", newBrokerConfigEntry); assertEquals("Unexpected id", _brokerId, newBrokerConfigEntry.getId()); assertEquals("Unexpected type ", Broker.class.getSimpleName(), newBrokerConfigEntry.getType()); - Map<String, Object> newBrokerattributes = newBrokerConfigEntry.getAttributes(); - assertNotNull("Attributes cannot be null", newBrokerattributes); - assertEquals("Unexpected attributes", attributes, newBrokerattributes); + Map<String, Object> newBrokerAttributes = newBrokerConfigEntry.getAttributes(); + assertNotNull("Attributes cannot be null", newBrokerAttributes); + assertEquals("Unexpected attributes", attributes, newBrokerAttributes); } public void testSaveNewVirtualHost() @@ -407,8 +407,8 @@ public abstract class ConfigurationEntryStoreTestCase extends QpidTestCase assertEquals("Unexpected preference provider ID in authentication provider children set", preferencesProviderId, _store .getEntry(_authenticationProviderId).getChildrenIds().iterator().next()); ConfigurationEntry preferencesProviderEntry = _store.getEntry(preferencesProviderId); - assertNotNull("Preferences providert is not found", preferencesProviderEntry); - assertEquals("Unexpected preferences providert id", preferencesProviderId, preferencesProviderEntry.getId()); + assertNotNull("Preferences provider is not found", preferencesProviderEntry); + assertEquals("Unexpected preferences provider id", preferencesProviderId, preferencesProviderEntry.getId()); Map<String, Object> attributes = preferencesProviderEntry.getAttributes(); assertEquals("Unexpected preferences provider name", name, attributes.get(PreferencesProvider.NAME)); assertEquals("Unexpected preferences provider path", path, attributes.get(FileSystemPreferencesProvider.PATH)); diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/configuration/store/JsonConfigurationEntryStoreTest.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/configuration/store/JsonConfigurationEntryStoreTest.java index 54c8592c2b..2c59bfd453 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/configuration/store/JsonConfigurationEntryStoreTest.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/configuration/store/JsonConfigurationEntryStoreTest.java @@ -153,7 +153,7 @@ public class JsonConfigurationEntryStoreTest extends ConfigurationEntryStoreTest assertEquals("Unexpected root entry", brokerId, root.getId()); Map<String, Object> attributes = root.getAttributes(); assertNotNull("Attributes not found", attributes); - assertEquals("Unexpected number of attriburtes", 2, attributes.size()); + assertEquals("Unexpected number of attributes", 2, attributes.size()); assertEquals("Unexpected name attribute", getTestName(), attributes.get(Broker.NAME)); assertEquals("Unexpected version attribute", 1, attributes.get(Broker.STORE_VERSION)); } @@ -174,7 +174,7 @@ public class JsonConfigurationEntryStoreTest extends ConfigurationEntryStoreTest assertEquals("Unexpected root entry", brokerId, root.getId()); Map<String, Object> attributes = root.getAttributes(); assertNotNull("Attributes not found", attributes); - assertEquals("Unexpected number of attriburtes", 2, attributes.size()); + assertEquals("Unexpected number of attributes", 2, attributes.size()); assertEquals("Unexpected name attribute", getTestName(), attributes.get(Broker.NAME)); assertEquals("Unexpected version attribute", 1, attributes.get(Broker.STORE_VERSION)); } @@ -257,8 +257,8 @@ public class JsonConfigurationEntryStoreTest extends ConfigurationEntryStoreTest ConfigurationEntry authenticationProviderEntry = newStore.getEntry(_authenticationProviderId); assertEquals("Unexpected preference provider ID in authentication provider children set", preferencesProviderId, authenticationProviderEntry.getChildrenIds().iterator().next()); ConfigurationEntry preferencesProviderEntry = newStore.getEntry(preferencesProviderId); - assertNotNull("Preferences providert is not found", preferencesProviderEntry); - assertEquals("Unexpected preferences providert id", preferencesProviderId, preferencesProviderEntry.getId()); + assertNotNull("Preferences provider is not found", preferencesProviderEntry); + assertEquals("Unexpected preferences provider id", preferencesProviderId, preferencesProviderEntry.getId()); Map<String, Object> attributes = preferencesProviderEntry.getAttributes(); assertEquals("Unexpected preferences provider name", name, attributes.get(PreferencesProvider.NAME)); assertEquals("Unexpected preferences provider path", path, attributes.get(FileSystemPreferencesProvider.PATH)); diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/configuration/store/MemoryConfigurationEntryStoreTest.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/configuration/store/MemoryConfigurationEntryStoreTest.java index ffb084f767..508cd2b321 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/configuration/store/MemoryConfigurationEntryStoreTest.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/configuration/store/MemoryConfigurationEntryStoreTest.java @@ -94,7 +94,7 @@ public class MemoryConfigurationEntryStoreTest extends ConfigurationEntryStoreTe assertEquals("Unexpected root entry", brokerId, root.getId()); Map<String, Object> attributes = root.getAttributes(); assertNotNull("Attributes not found", attributes); - assertEquals("Unexpected number of attriburtes", 1, attributes.size()); + assertEquals("Unexpected number of attributes", 1, attributes.size()); assertEquals("Unexpected name attribute", getTestName(), attributes.get(Broker.NAME)); } diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/configuration/updater/TaskExecutorTest.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/configuration/updater/TaskExecutorTest.java index cd6302d55b..27d7dd1241 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/configuration/updater/TaskExecutorTest.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/configuration/updater/TaskExecutorTest.java @@ -67,13 +67,13 @@ public class TaskExecutorTest extends TestCase public void testGetState() { - assertEquals("Unxpected initial state", State.INITIALISING, _executor.getState()); + assertEquals("Unexpected initial state", State.INITIALISING, _executor.getState()); } public void testStart() { _executor.start(); - assertEquals("Unxpected started state", State.ACTIVE, _executor.getState()); + assertEquals("Unexpected started state", State.ACTIVE, _executor.getState()); } public void testStopImmediately() throws Exception @@ -110,7 +110,7 @@ public class TaskExecutorTest extends TestCase assertTrue("The first task has not been triggered", waitForCallLatch.await(1000, TimeUnit.MILLISECONDS)); _executor.stopImmediately(); - assertEquals("Unxpected stopped state", State.STOPPED, _executor.getState()); + assertEquals("Unexpected stopped state", State.STOPPED, _executor.getState()); Exception e = submitExceptions.poll(1000l, TimeUnit.MILLISECONDS); assertNotNull("The task execution was not interrupted or cancelled", e); @@ -127,7 +127,7 @@ public class TaskExecutorTest extends TestCase { _executor.start(); _executor.stop(); - assertEquals("Unxpected stopped state", State.STOPPED, _executor.getState()); + assertEquals("Unexpected stopped state", State.STOPPED, _executor.getState()); } public void testSubmitAndWait() throws Exception diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/exchange/DefaultExchangeFactoryTest.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/exchange/DefaultExchangeFactoryTest.java index 16d3e44bb5..f57ef037b3 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/exchange/DefaultExchangeFactoryTest.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/exchange/DefaultExchangeFactoryTest.java @@ -81,7 +81,7 @@ public class DefaultExchangeFactoryTest extends QpidTestCase } } - public void testCreateDefaultExchangeFactoryWithoutDireactExchangeType() + public void testCreateDefaultExchangeFactoryWithoutDirectExchangeType() { _stubbedExchangeTypes.add(_topicExchangeType); _stubbedExchangeTypes.add(_fanoutExchangeType); diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/exchange/TopicExchangeTest.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/exchange/TopicExchangeTest.java index 4296ebd68f..7bd525c90f 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/exchange/TopicExchangeTest.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/exchange/TopicExchangeTest.java @@ -214,7 +214,7 @@ public class TopicExchangeTest extends QpidTestCase } - public void testMatchafterHash() throws AMQException + public void testMatchAfterHash() throws AMQException { AMQQueue queue = _vhost.createQueue(UUIDGenerator.generateRandomUUID(), "a#", false, null, false, false, false, null); diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/filter/JMSSelectorFilterTest.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/filter/JMSSelectorFilterTest.java index 91002edfc6..a13b82baad 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/filter/JMSSelectorFilterTest.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/filter/JMSSelectorFilterTest.java @@ -31,20 +31,20 @@ public class JMSSelectorFilterTest extends TestCase assertEquals(filter1 + " should equal itself", filter1, filter1); assertFalse(filter1 + " should not equal null", filter1.equals(null)); - assertEqualsAndHashcodeMatch(filter1, filter2); + assertEqualsAndHashCodeMatch(filter1, filter2); JMSSelectorFilter differentFilter = new JMSSelectorFilter("2 = 2"); assertNotEqual(filter1, differentFilter); } - private void assertEqualsAndHashcodeMatch(JMSSelectorFilter filter1, JMSSelectorFilter filter2) + private void assertEqualsAndHashCodeMatch(JMSSelectorFilter filter1, JMSSelectorFilter filter2) { String message = filter1 + " and " + filter2 + " should be equal"; assertEquals(message, filter1, filter2); assertEquals(message, filter2, filter1); - assertEquals("Hashcodes of " + filter1 + " and " + filter2 + " should be equal", + assertEquals("HashCodes of " + filter1 + " and " + filter2 + " should be equal", filter1.hashCode(), filter2.hashCode()); } diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/logging/Log4jMessageLoggerTest.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/logging/Log4jMessageLoggerTest.java index e2a6a56ee2..f6e301ec07 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/logging/Log4jMessageLoggerTest.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/logging/Log4jMessageLoggerTest.java @@ -255,7 +255,7 @@ public class Log4jMessageLoggerTest extends TestCase } /** - * @return the list of LoggingEvents that have occured in this Appender + * @return the list of LoggingEvents that have occurred in this Appender */ public List<LoggingEvent> getLog() { diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/logging/UnitTestMessageLoggerTest.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/logging/UnitTestMessageLoggerTest.java index e2e112be8f..bd2016d7b4 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/logging/UnitTestMessageLoggerTest.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/logging/UnitTestMessageLoggerTest.java @@ -96,7 +96,7 @@ public class UnitTestMessageLoggerTest extends TestCase logger.clearLogMessages(); - assertEquals("Expected to have no messagse after a clear", + assertEquals("Expected to have no messages after a clear", 0, logger.getLogMessages().size()); } diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/logging/actors/AMQPChannelActorTest.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/logging/actors/AMQPChannelActorTest.java index 41b42fac78..6ef319bcdf 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/logging/actors/AMQPChannelActorTest.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/logging/actors/AMQPChannelActorTest.java @@ -55,7 +55,7 @@ public class AMQPChannelActorTest extends BaseConnectionActorTestCase * Test that when logging on behalf of the channel * The test sends a message then verifies that it entered the logs. * - * The log message should be fully repalaced (no '{n}' values) and should + * The log message should be fully replaced (no '{n}' values) and should * contain the channel id ('/ch:1') identification. */ public void testChannel() throws Exception diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/logging/actors/AMQPConnectionActorTest.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/logging/actors/AMQPConnectionActorTest.java index d1cf256563..8b7f9ec5ca 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/logging/actors/AMQPConnectionActorTest.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/logging/actors/AMQPConnectionActorTest.java @@ -48,7 +48,7 @@ public class AMQPConnectionActorTest extends BaseConnectionActorTestCase * * The test sends a message then verifies that it entered the logs. * - * The log message should be fully repalaced (no '{n}' values) and should + * The log message should be fully replaced (no '{n}' values) and should * not contain any channel identification. */ public void testConnection() throws Exception @@ -113,7 +113,7 @@ public class AMQPConnectionActorTest extends BaseConnectionActorTestCase public String getLogHierarchy() { - return "test.hieracrchy"; + return "test.hierarchy"; } }); return message; diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/logging/actors/CurrentActorTest.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/logging/actors/CurrentActorTest.java index 701ccaab47..1fc42fe636 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/logging/actors/CurrentActorTest.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/logging/actors/CurrentActorTest.java @@ -45,7 +45,7 @@ import org.apache.qpid.server.util.BrokerTestHelper; * successfully removed. * * By having a higher number of threads than would normally be used in the - * Poolling filter we aim to catch the race condition where a ThreadLocal remove + * Pooling filter we aim to catch the race condition where a ThreadLocal remove * is called before one or more threads call get(). This way we can ensure that * the remove does not affect more than the Thread it was called in. */ @@ -188,7 +188,7 @@ public class CurrentActorTest extends BaseConnectionActorTestCase if (threads[count].getException() != null) { threads[count].getException().printStackTrace(); - fail("Error occured in thread:" + count + "("+threads[count].getException()+")"); + fail("Error occurred in thread:" + count + "("+threads[count].getException()+")"); } } } @@ -210,7 +210,7 @@ public class CurrentActorTest extends BaseConnectionActorTestCase // Create a new actor using retrieving the rootMessageLogger from // the default ApplicationRegistry. - //fixme reminder that we need a better approach for broker testing. + //TODO reminder that we need a better approach for broker testing. try { LogActor defaultActor = CurrentActor.get(); diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/logging/actors/QueueActorTest.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/logging/actors/QueueActorTest.java index 55153b7389..b371bf6e2f 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/logging/actors/QueueActorTest.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/logging/actors/QueueActorTest.java @@ -39,7 +39,7 @@ public class QueueActorTest extends BaseConnectionActorTestCase * * The test logs a message then verifies that it entered the logs correctly * - * The log message should be fully repalaced (no '{n}' values) and should + * The log message should be fully replaced (no '{n}' values) and should * contain the correct queue identification. */ public void testQueueActor() @@ -67,7 +67,7 @@ public class QueueActorTest extends BaseConnectionActorTestCase // Verify that the logged message contains the 'qu(' marker String expected = "qu(" + getName() + ")"; - assertTrue("Message was not logged with a queue identifer '"+expected+"' actual:" + log, + assertTrue("Message was not logged with a queue identifier '"+expected+"' actual:" + log, log.contains(expected)); } diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/logging/actors/SubscriptionActorTest.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/logging/actors/SubscriptionActorTest.java index 92915e7092..a0a2a7b648 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/logging/actors/SubscriptionActorTest.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/logging/actors/SubscriptionActorTest.java @@ -54,7 +54,7 @@ public class SubscriptionActorTest extends BaseConnectionActorTestCase * * The test sends a message then verifies that it entered the logs. * - * The log message should be fully repalaced (no '{n}' values) and should + * The log message should be fully replaced (no '{n}' values) and should * contain subscription identification. */ public void testSubscription() diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/logging/subjects/AbstractTestLogSubject.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/logging/subjects/AbstractTestLogSubject.java index cd8f13d52e..258ee1ba85 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/logging/subjects/AbstractTestLogSubject.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/logging/subjects/AbstractTestLogSubject.java @@ -115,7 +115,7 @@ public abstract class AbstractTestLogSubject extends QpidTestCase assertNotNull("Unable to find connection 'con:" + connectionID + "' in '"+message+"'", connectionSlice); - // Exract the userName + // Extract the userName String[] userNameParts = connectionSlice.split("@"); assertEquals("Unable to split Username from rest of Connection:" @@ -180,11 +180,11 @@ public abstract class AbstractTestLogSubject extends QpidTestCase */ protected void verifyExchange(String message, Exchange exchange) { - String exchangeSilce = getSlice("ex", message); + String exchangeSlice = getSlice("ex", message); - assertNotNull("Exchange not found:" + message, exchangeSilce); + assertNotNull("Exchange not found:" + message, exchangeSlice); - String[] exchangeParts = exchangeSilce.split("/"); + String[] exchangeParts = exchangeSlice.split("/"); assertEquals("Exchange should be in two parts ex(type/name)", 2, exchangeParts.length); @@ -265,10 +265,10 @@ public abstract class AbstractTestLogSubject extends QpidTestCase } /** - * Call to the individiual tests to validate the message is formatted as + * Call to the individual tests to validate the message is formatted as * expected * - * @param message the message whos format needs validation + * @param message the message whose format needs validation */ protected abstract void validateLogStatement(String message); diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/logging/subjects/BindingLogSubjectTest.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/logging/subjects/BindingLogSubjectTest.java index d9ecfc91b1..9acaadf9e1 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/logging/subjects/BindingLogSubjectTest.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/logging/subjects/BindingLogSubjectTest.java @@ -64,7 +64,7 @@ public class BindingLogSubjectTest extends AbstractTestLogSubject /** * Validate that the logged Subject message is as expected: * MESSAGE [Blank][vh(/test)/ex(direct/<<default>>)/qu(BindingLogSubjectTest)/rk(RoutingKey)] <Log Message> - * @param message the message whos format needs validation + * @param message the message whose format needs validation */ @Override protected void validateLogStatement(String message) diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/logging/subjects/ChannelLogSubjectTest.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/logging/subjects/ChannelLogSubjectTest.java index a3d96c6d12..6216214efb 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/logging/subjects/ChannelLogSubjectTest.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/logging/subjects/ChannelLogSubjectTest.java @@ -46,11 +46,11 @@ public class ChannelLogSubjectTest extends ConnectionLogSubjectTest /** * MESSAGE [Blank][con:0(MockProtocolSessionUser@null/test)/ch:1] <Log Message> * - * @param message the message whos format needs validation + * @param message the message whose format needs validation */ protected void validateLogStatement(String message) { - // Use the ConnectionLogSubjectTest to vaildate that the connection + // Use the ConnectionLogSubjectTest to validate that the connection // section is ok super.validateLogStatement(message); diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/logging/subjects/ConnectionLogSubjectTest.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/logging/subjects/ConnectionLogSubjectTest.java index e9a9317102..13e637542b 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/logging/subjects/ConnectionLogSubjectTest.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/logging/subjects/ConnectionLogSubjectTest.java @@ -54,7 +54,7 @@ public class ConnectionLogSubjectTest extends AbstractTestLogSubject /** * MESSAGE [Blank][con:0(MockProtocolSessionUser@null/test)] <Log Message> * - * @param message the message whos format needs validation + * @param message the message whose format needs validation */ protected void validateLogStatement(String message) { diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/logging/subjects/ExchangeLogSubjectTest.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/logging/subjects/ExchangeLogSubjectTest.java index b327738797..40188f9354 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/logging/subjects/ExchangeLogSubjectTest.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/logging/subjects/ExchangeLogSubjectTest.java @@ -57,7 +57,7 @@ public class ExchangeLogSubjectTest extends AbstractTestLogSubject /** * Validate that the logged Subject message is as expected: * MESSAGE [Blank][vh(/test)/ex(direct/<<default>>)] <Log Message> - * @param message the message whos format needs validation + * @param message the message whose format needs validation */ @Override protected void validateLogStatement(String message) diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/logging/subjects/QueueLogSubjectTest.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/logging/subjects/QueueLogSubjectTest.java index e2765f338b..f89959febb 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/logging/subjects/QueueLogSubjectTest.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/logging/subjects/QueueLogSubjectTest.java @@ -61,7 +61,7 @@ public class QueueLogSubjectTest extends AbstractTestLogSubject * Validate that the logged Subject message is as expected: * MESSAGE [Blank][vh(/test)/qu(QueueLogSubjectTest)] <Log Message> * - * @param message the message whos format needs validation + * @param message the message whose format needs validation */ @Override protected void validateLogStatement(String message) diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/logging/subjects/SubscriptionLogSubjectTest.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/logging/subjects/SubscriptionLogSubjectTest.java index b9efac1ae8..3afba28cd6 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/logging/subjects/SubscriptionLogSubjectTest.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/logging/subjects/SubscriptionLogSubjectTest.java @@ -71,7 +71,7 @@ public class SubscriptionLogSubjectTest extends AbstractTestLogSubject * Validate that the logged Subject message is as expected: * MESSAGE [Blank][sub:0(vh(/test)/qu(SubscriptionLogSubjectTest))] <Log Message> * - * @param message the message whos format needs validation + * @param message the message whose format needs validation */ @Override protected void validateLogStatement(String message) diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/ConfiguredObjectStateTransitionTest.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/ConfiguredObjectStateTransitionTest.java index 72cf09585c..1b7ef39b89 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/ConfiguredObjectStateTransitionTest.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/ConfiguredObjectStateTransitionTest.java @@ -180,7 +180,7 @@ public class ConfiguredObjectStateTransitionTest extends QpidTestCase private void assertInvalidStateTransition(ConfiguredObject object, State initialState, State... invalidStates) { - assertEquals("Unepxceted state", initialState, object.getActualState()); + assertEquals("Unexpected state", initialState, object.getActualState()); for (State state : invalidStates) { try diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/VirtualHostTest.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/VirtualHostTest.java index 7d8dd67f93..05ac4a1ec3 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/VirtualHostTest.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/VirtualHostTest.java @@ -57,9 +57,9 @@ public class VirtualHostTest extends QpidTestCase CurrentActor.set(new TestLogActor(new SystemOutMessageLogger())); _broker = BrokerTestHelper.createBrokerMock(); - TaskExecutor taslExecutor = mock(TaskExecutor.class); - when(taslExecutor.isTaskExecutorThread()).thenReturn(true); - when(_broker.getTaskExecutor()).thenReturn(taslExecutor); + TaskExecutor taskExecutor = mock(TaskExecutor.class); + when(taskExecutor.isTaskExecutorThread()).thenReturn(true); + when(_broker.getTaskExecutor()).thenReturn(taskExecutor); _recovererProvider = mock(RecovererProvider.class); _statisticsGatherer = mock(StatisticsGatherer.class); @@ -126,7 +126,7 @@ public class VirtualHostTest extends QpidTestCase assertEquals("Unexpected state", State.DELETED, host.getAttribute(VirtualHost.STATE)); } - public void testCreateQueueChildHavingMessageGrouppingAttributes() + public void testCreateQueueChildHavingMessageGroupingAttributes() { VirtualHost host = createHost(); host.setDesiredState(State.INITIALISING, State.ACTIVE); diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/adapter/FileSystemPreferencesProviderTest.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/adapter/FileSystemPreferencesProviderTest.java index 8b0847e0d2..11c16cd9aa 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/adapter/FileSystemPreferencesProviderTest.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/adapter/FileSystemPreferencesProviderTest.java @@ -59,9 +59,9 @@ public class FileSystemPreferencesProviderTest extends QpidTestCase _preferencesFile = TestFileUtils.createTempFile(this, ".prefs.json", TEST_PREFERENCES); _broker = BrokerTestHelper.createBrokerMock(); - TaskExecutor taslExecutor = mock(TaskExecutor.class); - when(taslExecutor.isTaskExecutorThread()).thenReturn(true); - when(_broker.getTaskExecutor()).thenReturn(taslExecutor); + TaskExecutor taskExecutor = mock(TaskExecutor.class); + when(taskExecutor.isTaskExecutorThread()).thenReturn(true); + when(_broker.getTaskExecutor()).thenReturn(taskExecutor); when(_authenticationProvider.getParent(Broker.class)).thenReturn(_broker); } @@ -111,7 +111,7 @@ public class FileSystemPreferencesProviderTest extends QpidTestCase { File emptyPrefsFile = new File(TMP_FOLDER, "preferences-" + getTestName() + ".json"); emptyPrefsFile.createNewFile(); - assertTrue("Preferences file does notexists", emptyPrefsFile.exists()); + assertTrue("Preferences file does not exist", emptyPrefsFile.exists()); try { Map<String, Object> attributes = new HashMap<String, Object>(); @@ -130,7 +130,7 @@ public class FileSystemPreferencesProviderTest extends QpidTestCase _preferencesProvider = createPreferencesProvider(); _preferencesProvider.setDesiredState(State.INITIALISING, State.ACTIVE); - assertEquals("Unexpexpected state", State.ACTIVE, _preferencesProvider.getActualState()); + assertEquals("Unexpected state", State.ACTIVE, _preferencesProvider.getActualState()); } public void testChangeAttributes() @@ -178,7 +178,7 @@ public class FileSystemPreferencesProviderTest extends QpidTestCase assertTrue("No preference found for user3", preferences3.isEmpty()); } - public void testSetPrefernces() + public void testSetPreferences() { _preferencesProvider = createPreferencesProvider(); _preferencesProvider.setDesiredState(State.INITIALISING, State.ACTIVE); @@ -213,7 +213,7 @@ public class FileSystemPreferencesProviderTest extends QpidTestCase assertTrue("Unexpected preferences found for user3", preferences3.isEmpty()); } - public void testDeletePrefernces() + public void testDeletePreferences() { _preferencesProvider = createPreferencesProvider(); _preferencesProvider.setDesiredState(State.INITIALISING, State.ACTIVE); @@ -237,7 +237,7 @@ public class FileSystemPreferencesProviderTest extends QpidTestCase assertTrue("Unexpected preferences found for user3", preferences3.isEmpty()); } - public void testDeleteMultipleUsersPrefernces() + public void testDeleteMultipleUsersPreferences() { _preferencesProvider = createPreferencesProvider(); _preferencesProvider.setDesiredState(State.INITIALISING, State.ACTIVE); diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/adapter/PortFactoryTest.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/adapter/PortFactoryTest.java index 8b67db2de9..c4b0134ab1 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/adapter/PortFactoryTest.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/adapter/PortFactoryTest.java @@ -354,7 +354,7 @@ public class PortFactoryTest extends QpidTestCase try { _portFactory.createPort(_portId, _broker, attributes); - fail("RMI port creation should fail as another one olready exist"); + fail("RMI port creation should fail as another one already exist"); } catch(IllegalConfigurationException e) { diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/configuration/ConfigurationEntryTest.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/configuration/ConfigurationEntryTest.java index dd48d7b56d..e2f2dff298 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/configuration/ConfigurationEntryTest.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/configuration/ConfigurationEntryTest.java @@ -112,18 +112,18 @@ public class ConfigurationEntryTest extends TestCase VirtualHost.class.getSimpleName(), attributes1, childrenIds, store); assertTrue(entry1.equals(entry2)); - assertFalse("Entries should be diferrent because of diferrent IDs", entry1.equals(entryWithDifferentId)); + assertFalse("Entries should be different because of different IDs", entry1.equals(entryWithDifferentId)); ConfigurationEntry entryWithDifferentChildId = new ConfigurationEntry(id, VirtualHost.class.getSimpleName(), attributes1, Collections.singleton(UUID.randomUUID()), store); - assertFalse("Entries should be diferrent because of diferrent children", entry1.equals(entryWithDifferentChildId)); + assertFalse("Entries should be different because of different children", entry1.equals(entryWithDifferentChildId)); ConfigurationEntry entryWithDifferentName = new ConfigurationEntry(id, VirtualHost.class.getSimpleName(), attributes2, childrenIds, store); - assertFalse("Entries should be diferrent because of diferrent attributes", entry1.equals(entryWithDifferentName)); + assertFalse("Entries should be different because of different attributes", entry1.equals(entryWithDifferentName)); ConfigurationEntry entryWithDifferentType = new ConfigurationEntry(id, Broker.class.getSimpleName(), attributes1, childrenIds, store); - assertFalse("Entries should be diferrent because of diferrent types", entry1.equals(entryWithDifferentType)); + assertFalse("Entries should be different because of different types", entry1.equals(entryWithDifferentType)); } } diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/queue/AMQQueueFactoryTest.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/queue/AMQQueueFactoryTest.java index 29a03b2ee7..bcf54c97a4 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/queue/AMQQueueFactoryTest.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/queue/AMQQueueFactoryTest.java @@ -231,7 +231,7 @@ public class AMQQueueFactoryTest extends QpidTestCase false, attributes); - assertEquals("Queue not a priorty queue", AMQPriorityQueue.class, queue.getClass()); + assertEquals("Queue not a priority queue", AMQPriorityQueue.class, queue.getClass()); verifyQueueRegistered("testPriorityQueue"); verifyRegisteredQueueCount(1); } @@ -251,7 +251,7 @@ public class AMQQueueFactoryTest extends QpidTestCase //verify that no alternate exchange or DLQ were produced - assertNull("Queue should not have an alternate exchange as DLQ wasnt enabled", queue.getAlternateExchange()); + assertNull("Queue should not have an alternate exchange as DLQ wasn't enabled", queue.getAlternateExchange()); assertNull("The DLQ should not exist", _virtualHost.getQueue(dlQueueName)); verifyRegisteredQueueCount(1); diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/queue/MockAMQQueue.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/queue/MockAMQQueue.java index d7ef240ef4..ea2e29d40d 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/queue/MockAMQQueue.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/queue/MockAMQQueue.java @@ -346,7 +346,7 @@ public class MockAMQQueue implements AMQQueue return null; } - public List<Long> getMessagesOnTheQueue(int num, int offest) + public List<Long> getMessagesOnTheQueue(int num, int offset) { return null; } diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/queue/NotificationCheckTest.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/queue/NotificationCheckTest.java index df2de7f0e0..3834fac2d0 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/queue/NotificationCheckTest.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/queue/NotificationCheckTest.java @@ -85,7 +85,7 @@ public class NotificationCheckTest extends TestCase verifyZeroInteractions(_listener); MESSAGE_AGE_ALERT.notifyIfNecessary(_message, _queue, _listener); - // Uses contains as first part of message is nondeterministic + // Uses contains as first part of message is non-deterministic verify(_listener).notifyClients(eq(MESSAGE_AGE_ALERT), eq(_queue), contains("s : Maximum age on queue threshold (1s) breached.")); } diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/queue/QueueEntryImplTestBase.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/queue/QueueEntryImplTestBase.java index 1c75c1ac6a..2b1e7f5e1f 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/queue/QueueEntryImplTestBase.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/queue/QueueEntryImplTestBase.java @@ -42,7 +42,7 @@ public abstract class QueueEntryImplTestBase extends TestCase protected QueueEntryImpl _queueEntry2; protected QueueEntryImpl _queueEntry3; - public abstract QueueEntryImpl getQueueEntryImpl(int msgid) throws AMQException; + public abstract QueueEntryImpl getQueueEntryImpl(int msgId) throws AMQException; public abstract void testCompareTo(); @@ -57,7 +57,7 @@ public abstract class QueueEntryImplTestBase extends TestCase _queueEntry3 = getQueueEntryImpl(3); } - public void testAquire() + public void testAcquire() { assertTrue("Queue entry should be in AVAILABLE state before invoking of acquire method", _queueEntry.isAvailable()); @@ -173,7 +173,7 @@ public abstract class QueueEntryImplTestBase extends TestCase } /** - * Tests if entries in DEQUQUED or DELETED state are not returned by getNext method. + * Tests if entries in DEQUEUED or DELETED state are not returned by getNext method. */ public void testGetNext() { diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/queue/QueueEntryListTestBase.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/queue/QueueEntryListTestBase.java index 99e32855c7..a1bc9e50c7 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/queue/QueueEntryListTestBase.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/queue/QueueEntryListTestBase.java @@ -117,7 +117,7 @@ public abstract class QueueEntryListTestBase extends TestCase entry = entryList.next(entry); count++; } - assertEquals("Get next didnt get all the list entries", getExpectedListLength(), count); + assertEquals("Get next didn't get all the list entries", getExpectedListLength(), count); } /** @@ -142,7 +142,7 @@ public abstract class QueueEntryListTestBase extends TestCase * @see QueueEntryListTestBase#getTestList() * @see QueueEntryListTestBase#getExpectedListLength() */ - public void testDequedMessagedNotPresentInIterator() throws Exception + public void testDequeuedMessagedNotPresentInIterator() throws Exception { final int numberOfMessages = getExpectedListLength(); final QueueEntryList<QueueEntry> entryList = getTestList(); diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/queue/SimpleAMQQueueTest.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/queue/SimpleAMQQueueTest.java index 0d6cddb842..b0e5a510b8 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/queue/SimpleAMQQueueTest.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/queue/SimpleAMQQueueTest.java @@ -674,15 +674,15 @@ public class SimpleAMQQueueTest extends QpidTestCase @Override public void run() { - // we dont actually want/need this runner to do any work + // we don't actually want/need this runner to do any work // because we we are already doing it! } }); // check expected messages delivered to correct consumers - verifyRecievedMessages(msgListSub1, sub1.getMessages()); - verifyRecievedMessages(msgListSub2, sub2.getMessages()); - verifyRecievedMessages(msgListSub3, sub3.getMessages()); + verifyReceivedMessages(msgListSub1, sub1.getMessages()); + verifyReceivedMessages(msgListSub2, sub2.getMessages()); + verifyReceivedMessages(msgListSub3, sub3.getMessages()); } /** @@ -791,7 +791,7 @@ public class SimpleAMQQueueTest extends QpidTestCase //delete message from top _queue.deleteMessageFromTop(); - //get queue netries + //get queue entries List<QueueEntry> entries = _queue.getMessagesOnTheQueue(); // assert queue entries @@ -908,7 +908,7 @@ public class SimpleAMQQueueTest extends QpidTestCase Thread.currentThread().interrupt(); } List<QueueEntry> expected = createEntriesList(entries.get(0), entries.get(2), entries.get(3)); - verifyRecievedMessages(expected, subscription.getMessages()); + verifyReceivedMessages(expected, subscription.getMessages()); } /** @@ -1177,15 +1177,15 @@ public class SimpleAMQQueueTest extends QpidTestCase return entriesList; } - private void verifyRecievedMessages(List<QueueEntry> expected, - List<QueueEntry> delivered) + private void verifyReceivedMessages(List<QueueEntry> expected, + List<QueueEntry> delivered) { assertEquals("Consumer did not receive the expected number of messages", expected.size(), delivered.size()); for (QueueEntry msg : expected) { - assertTrue("Consumer did not recieve msg: " + assertTrue("Consumer did not receive msg: " + msg.getMessage().getMessageNumber(), delivered.contains(msg)); } } diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/security/auth/AuthenticatedPrincipalTest.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/security/auth/AuthenticatedPrincipalTest.java index cd5791952f..30da9eb582 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/security/auth/AuthenticatedPrincipalTest.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/security/auth/AuthenticatedPrincipalTest.java @@ -136,7 +136,7 @@ public class AuthenticatedPrincipalTest extends TestCase assertFalse(user1principal2.equals(user1principal1)); } - public void testEqualsWithDisimilarObjects() + public void testEqualsWithDissimilarObjects() { UsernamePrincipal wrappedPrincipal = new UsernamePrincipal("user1"); AuthenticatedPrincipal authenticatedPrincipal = new AuthenticatedPrincipal(wrappedPrincipal); diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/security/auth/database/Base64MD5PasswordFilePrincipalDatabaseTest.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/security/auth/database/Base64MD5PasswordFilePrincipalDatabaseTest.java index 4102a1fc68..8cb77ef18a 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/security/auth/database/Base64MD5PasswordFilePrincipalDatabaseTest.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/security/auth/database/Base64MD5PasswordFilePrincipalDatabaseTest.java @@ -253,7 +253,7 @@ public class Base64MD5PasswordFilePrincipalDatabaseTest extends TestCase } catch (IOException e) { - fail("Unable to valdate file contents due to:" + e.getMessage()); + fail("Unable to validate file contents due to:" + e.getMessage()); } } @@ -384,7 +384,7 @@ public class Base64MD5PasswordFilePrincipalDatabaseTest extends TestCase } catch (IOException e) { - fail("Unable to valdate file contents due to:" + e.getMessage()); + fail("Unable to validate file contents due to:" + e.getMessage()); } } @@ -445,7 +445,7 @@ public class Base64MD5PasswordFilePrincipalDatabaseTest extends TestCase try { _database.verifyPassword("made.up.username", PASSWORD.toCharArray()); - fail("Should not have been able to verify this non-existant users password."); + fail("Should not have been able to verify this nonexistent users password."); } catch (AccountNotFoundException e) { diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/security/auth/database/PlainPasswordFilePrincipalDatabaseTest.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/security/auth/database/PlainPasswordFilePrincipalDatabaseTest.java index eecbcdf38d..4c7c175d7b 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/security/auth/database/PlainPasswordFilePrincipalDatabaseTest.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/security/auth/database/PlainPasswordFilePrincipalDatabaseTest.java @@ -141,7 +141,7 @@ public class PlainPasswordFilePrincipalDatabaseTest extends TestCase } catch (IOException e) { - fail("Unable to valdate file contents due to:" + e.getMessage()); + fail("Unable to validate file contents due to:" + e.getMessage()); } testFile.delete(); } @@ -275,7 +275,7 @@ public class PlainPasswordFilePrincipalDatabaseTest extends TestCase } catch (IOException e) { - fail("Unable to valdate file contents due to:" + e.getMessage()); + fail("Unable to validate file contents due to:" + e.getMessage()); } testFile.delete(); } diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/security/auth/jmx/JMXPasswordAuthenticatorTest.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/security/auth/jmx/JMXPasswordAuthenticatorTest.java index a4dd97e6a1..1aaa580ea3 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/security/auth/jmx/JMXPasswordAuthenticatorTest.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/security/auth/jmx/JMXPasswordAuthenticatorTest.java @@ -38,7 +38,6 @@ import org.apache.qpid.server.model.Broker; import org.apache.qpid.server.security.SubjectCreator; import org.apache.qpid.server.security.auth.AuthenticationResult; import org.apache.qpid.server.security.auth.AuthenticationResult.AuthenticationStatus; -import org.apache.qpid.server.security.auth.jmx.JMXPasswordAuthenticator; import org.apache.qpid.server.security.auth.SubjectAuthenticationResult; import org.apache.qpid.server.security.SecurityManager; @@ -58,7 +57,7 @@ public class JMXPasswordAuthenticatorTest extends TestCase private JMXPasswordAuthenticator _rmipa; - private SubjectCreator _usernamePasswordOkaySuvjectCreator = createMockSubjectCreator(true, null); + private SubjectCreator _usernamePasswordOkaySubjectCreator = createMockSubjectCreator(true, null); private SubjectCreator _badPasswordSubjectCreator = createMockSubjectCreator(false, null); protected void setUp() throws Exception @@ -72,7 +71,7 @@ public class JMXPasswordAuthenticatorTest extends TestCase */ public void testAuthenticationSuccess() { - when(_broker.getSubjectCreator(any(SocketAddress.class))).thenReturn(_usernamePasswordOkaySuvjectCreator); + when(_broker.getSubjectCreator(any(SocketAddress.class))).thenReturn(_usernamePasswordOkaySubjectCreator); when(_securityManager.accessManagement()).thenReturn(true); Subject newSubject = _rmipa.authenticate(_credentials); @@ -100,7 +99,7 @@ public class JMXPasswordAuthenticatorTest extends TestCase public void testAuthorisationFailure() { - when(_broker.getSubjectCreator(any(SocketAddress.class))).thenReturn(_usernamePasswordOkaySuvjectCreator); + when(_broker.getSubjectCreator(any(SocketAddress.class))).thenReturn(_usernamePasswordOkaySubjectCreator); when(_securityManager.accessManagement()).thenReturn(false); try diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/security/auth/manager/ExternalAuthenticationManagerTest.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/security/auth/manager/ExternalAuthenticationManagerTest.java index 586bff5683..99a24c0150 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/security/auth/manager/ExternalAuthenticationManagerTest.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/security/auth/manager/ExternalAuthenticationManagerTest.java @@ -96,7 +96,7 @@ public class ExternalAuthenticationManagerTest extends QpidTestCase assertEquals("person", saslServer.getAuthorizationID()); } - public void testAuthenticatePrinicpalCnAndDc() throws Exception + public void testAuthenticatePrincipalCnAndDc() throws Exception { X500Principal principal = new X500Principal("CN=person, DC=example, DC=com"); UsernamePrincipal expectedPrincipal = new UsernamePrincipal("person@example.com"); @@ -111,7 +111,7 @@ public class ExternalAuthenticationManagerTest extends QpidTestCase assertEquals("person@example.com", saslServer.getAuthorizationID()); } - public void testAuthenticatePrinicpalCnDc_OtherComponentsIgnored() throws Exception + public void testAuthenticatePrincipalCnDc_OtherComponentsIgnored() throws Exception { X500Principal principal = new X500Principal("CN=person, DC=example, DC=com, O=My Company Ltd, L=Newbury, ST=Berkshire, C=GB"); UsernamePrincipal expectedPrincipal = new UsernamePrincipal("person@example.com"); diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/security/auth/sasl/SaslServerTestCase.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/security/auth/sasl/SaslServerTestCase.java index f5247634ac..07a5315ec9 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/security/auth/sasl/SaslServerTestCase.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/security/auth/sasl/SaslServerTestCase.java @@ -33,15 +33,15 @@ public abstract class SaslServerTestCase extends TestCase protected SaslServer server; protected String username = "u"; protected String password = "p"; - protected String notpassword = "a"; + protected String notPassword = "a"; protected PrincipalDatabase db = new TestPrincipalDatabase(); - protected byte[] correctresponse; - protected byte[] wrongresponse; + protected byte[] correctResponse; + protected byte[] wrongResponse; - public void testSucessfulAuth() throws SaslException + public void testSuccessfulAuth() throws SaslException { - byte[] resp = this.server.evaluateResponse(correctresponse); + byte[] resp = this.server.evaluateResponse(correctResponse); assertNull(resp); } @@ -50,7 +50,7 @@ public abstract class SaslServerTestCase extends TestCase boolean exceptionCaught = false; try { - byte[] resp = this.server.evaluateResponse(wrongresponse); + byte[] resp = this.server.evaluateResponse(wrongResponse); } catch (SaslException e) { diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/security/auth/sasl/amqplain/AMQPlainSaslServerTest.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/security/auth/sasl/amqplain/AMQPlainSaslServerTest.java index 6245064bf7..37580e69a2 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/security/auth/sasl/amqplain/AMQPlainSaslServerTest.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/security/auth/sasl/amqplain/AMQPlainSaslServerTest.java @@ -36,8 +36,8 @@ public class AMQPlainSaslServerTest extends SaslServerTestCase FieldTable table = FieldTableFactory.newFieldTable(); table.setString("LOGIN", username); table.setString("PASSWORD", password); - correctresponse = table.getDataAsBytes(); - table.setString("PASSWORD", notpassword); - wrongresponse = table.getDataAsBytes(); + correctResponse = table.getDataAsBytes(); + table.setString("PASSWORD", notPassword); + wrongResponse = table.getDataAsBytes(); } } diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/security/auth/sasl/plain/PlainSaslServerTest.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/security/auth/sasl/plain/PlainSaslServerTest.java index 5dd51250dc..659b0ec4a7 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/security/auth/sasl/plain/PlainSaslServerTest.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/security/auth/sasl/plain/PlainSaslServerTest.java @@ -32,8 +32,8 @@ public class PlainSaslServerTest extends SaslServerTestCase UsernamePasswordInitialiser handler = new PlainInitialiser(); handler.initialise(db); this.server = new PlainSaslServer(handler.getCallbackHandler()); - correctresponse = new byte[]{0x0, (byte) username.charAt(0), 0x0, (byte) password.charAt(0)}; - wrongresponse = new byte[]{0x0,(byte) username.charAt(0), 0x0, (byte) notpassword.charAt(0)}; + correctResponse = new byte[]{0x0, (byte) username.charAt(0), 0x0, (byte) password.charAt(0)}; + wrongResponse = new byte[]{0x0,(byte) username.charAt(0), 0x0, (byte) notPassword.charAt(0)}; } } diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/security/group/FileGroupDatabaseTest.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/security/group/FileGroupDatabaseTest.java index b020c1655a..a44f1a4473 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/security/group/FileGroupDatabaseTest.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/security/group/FileGroupDatabaseTest.java @@ -187,7 +187,7 @@ public class FileGroupDatabaseTest extends TestCase assertTrue(groups.contains(MY_GROUP1)); } - public void testGetGroupPrincipalsForUserWhenUserAdddedToGroupTheyAreAlreadyIn() throws Exception + public void testGetGroupPrincipalsForUserWhenUserAddedToGroupTheyAreAlreadyIn() throws Exception { writeAndSetGroupFile("myGroup.users", USER1); _groupDatabase.addUserToGroup(USER1, MY_GROUP); diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/store/EventManagerTest.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/store/EventManagerTest.java index 2be79c5839..702874fb88 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/store/EventManagerTest.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/store/EventManagerTest.java @@ -45,7 +45,7 @@ public class EventManagerTest extends TestCase verifyZeroInteractions(_mockListener); } - public void testEventListenerFiresMulitpleTimes() + public void testEventListenerFiresMultipleTimes() { _eventManager.addEventListener(_mockListener, BEFORE_ACTIVATE); _eventManager.addEventListener(_mockListener, AFTER_ACTIVATE); diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/store/StateManagerTest.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/store/StateManagerTest.java index 18efb976eb..3ee98f9a21 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/store/StateManagerTest.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/store/StateManagerTest.java @@ -99,7 +99,7 @@ public class StateManagerTest extends TestCase implements EventListener { assertEquals(State.INITIAL, _manager.getState()); performValidTransition(StateManager.INITIALISE); - performValidTransition(StateManager.INITALISE_COMPLETE); + performValidTransition(StateManager.INITIALISE_COMPLETE); performValidTransition(StateManager.ACTIVATE); performValidTransition(StateManager.ACTIVATE_COMPLETE); performValidTransition(StateManager.QUIESCE); @@ -112,13 +112,13 @@ public class StateManagerTest extends TestCase implements EventListener _manager = new StateManager(this); assertEquals(State.INITIAL, _manager.getState()); performValidTransition(StateManager.INITIALISE); - performValidTransition(StateManager.INITALISE_COMPLETE); + performValidTransition(StateManager.INITIALISE_COMPLETE); performValidTransition(StateManager.CLOSE_INITIALISED); performValidTransition(StateManager.CLOSE_COMPLETE); _manager = new StateManager(this); performValidTransition(StateManager.INITIALISE); - performValidTransition(StateManager.INITALISE_COMPLETE); + performValidTransition(StateManager.INITIALISE_COMPLETE); performValidTransition(StateManager.ACTIVATE); performValidTransition(StateManager.ACTIVATE_COMPLETE); performValidTransition(StateManager.QUIESCE); @@ -140,7 +140,7 @@ public class StateManagerTest extends TestCase implements EventListener assertEquals(State.INITIAL, _manager.getState()); performInvalidTransitions(StateManager.INITIALISE, State.INITIALISED); - performInvalidTransitions(StateManager.INITALISE_COMPLETE, State.ACTIVATING, State.CLOSING); + performInvalidTransitions(StateManager.INITIALISE_COMPLETE, State.ACTIVATING, State.CLOSING); performInvalidTransitions(StateManager.ACTIVATE, State.ACTIVE); performInvalidTransitions(StateManager.ACTIVATE_COMPLETE, State.QUIESCING, State.CLOSING, State.INITIALISED); performInvalidTransitions(StateManager.QUIESCE, State.QUIESCED); diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/subscription/SubscriptionListTest.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/subscription/SubscriptionListTest.java index c4d1a1e614..cd5b178464 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/subscription/SubscriptionListTest.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/subscription/SubscriptionListTest.java @@ -251,7 +251,7 @@ public class SubscriptionListTest extends QpidTestCase * Test that if the subscription not contained in the list is requested to be removed * that the removal fails */ - public void testRemoveNonExistantNode() + public void testRemoveNonexistentNode() { Subscription sub4 = new MockSubscription(); assertNull("Should not have been a node present for the subscription", getNodeForSubscription(_subList, sub4)); @@ -360,7 +360,7 @@ public class SubscriptionListTest extends QpidTestCase */ public void testIteratorSkipsFirstDeletedNode() { - //'delete' but dont remove the node for the 1st subscription + //'delete' but don't remove the node for the 1st subscription assertTrue("Deleting subscription node should have succeeded", getNodeForSubscription(_subList, _sub1).delete()); assertNotNull("Should still have been a node present for the deleted subscription", @@ -383,7 +383,7 @@ public class SubscriptionListTest extends QpidTestCase */ public void testIteratorSkipsCentralDeletedNode() { - //'delete' but dont remove the node for the 2nd subscription + //'delete' but don't remove the node for the 2nd subscription assertTrue("Deleting subscription node should have succeeded", getNodeForSubscription(_subList, _sub2).delete()); assertNotNull("Should still have been a node present for the deleted subscription", @@ -406,7 +406,7 @@ public class SubscriptionListTest extends QpidTestCase */ public void testIteratorSkipsDeletedFinalNode() { - //'delete' but dont remove the node for the 3rd subscription + //'delete' but don't remove the node for the 3rd subscription assertTrue("Deleting subscription node should have succeeded", getNodeForSubscription(_subList, _sub3).delete()); assertNotNull("Should still have been a node present for the deleted 3rd subscription", diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/txn/AsyncAutoCommitTransactionTest.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/txn/AsyncAutoCommitTransactionTest.java index 693a1210e2..8285bdba4c 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/txn/AsyncAutoCommitTransactionTest.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/txn/AsyncAutoCommitTransactionTest.java @@ -72,7 +72,7 @@ public class AsyncAutoCommitTransactionTest extends QpidTestCase verifyZeroInteractions(_postTransactionAction); } - public void testEnqueuePersistentMessageOnMultiplQueuesPostCommitNotCalled() throws Exception + public void testEnqueuePersistentMessageOnMultipleQueuesPostCommitNotCalled() throws Exception { setTestSystemProperty(STRICT_ORDER_SYSTEM_PROPERTY, "false"); diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/txn/AutoCommitTransactionTest.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/txn/AutoCommitTransactionTest.java index 06b8539eb1..3c66a4c94b 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/txn/AutoCommitTransactionTest.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/txn/AutoCommitTransactionTest.java @@ -361,7 +361,7 @@ public class AutoCommitTransactionTest extends QpidTestCase } /** - * Tests the add of a post-commit action. Since AutoCommitTranctions + * Tests the add of a post-commit action. Since AutoCommitTransactions * have no long lived transactions, the post commit action is fired immediately. */ public void testPostCommitActionFiredImmediately() throws Exception diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/txn/LocalTransactionTest.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/txn/LocalTransactionTest.java index 4904cbc6fb..f3f5e00346 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/txn/LocalTransactionTest.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/txn/LocalTransactionTest.java @@ -347,7 +347,7 @@ public class LocalTransactionTest extends QpidTestCase } /** - * Tests the add of a post-commit action. Unlike AutoCommitTranctions, the post transaction actions + * Tests the add of a post-commit action. Unlike AutoCommitTransactions, the post transaction actions * is added to a list to be fired on commit or rollback. */ public void testAddingPostCommitActionNotFiredImmediately() throws Exception diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/txn/MockAction.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/txn/MockAction.java index 15c135ea2c..8fba28e200 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/txn/MockAction.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/txn/MockAction.java @@ -23,7 +23,7 @@ package org.apache.qpid.server.txn; import org.apache.qpid.server.txn.ServerTransaction.Action; /** - * Mock implementation of a ServerTranaction Action + * Mock implementation of a ServerTransaction Action * allowing its state to be observed. * */ diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/virtualhost/DurableConfigurationRecovererTest.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/virtualhost/DurableConfigurationRecovererTest.java index 987a541d05..b71c6a92e6 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/virtualhost/DurableConfigurationRecovererTest.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/virtualhost/DurableConfigurationRecovererTest.java @@ -369,7 +369,7 @@ public class DurableConfigurationRecovererTest extends QpidTestCase } catch(IllegalConfigurationException e) { - assertEquals("Unkown type for configured object: Wibble", e.getMessage()); + assertEquals("Unknown type for configured object: Wibble", e.getMessage()); } diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/virtualhost/StandardVirtualHostTest.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/virtualhost/StandardVirtualHostTest.java index 03cb483e40..f46349daa4 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/virtualhost/StandardVirtualHostTest.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/virtualhost/StandardVirtualHostTest.java @@ -279,7 +279,7 @@ public class StandardVirtualHostTest extends QpidTestCase * @param vhostName name of the virtualhost * @param queueName name of the queue * @param exchangeName name of a direct exchange to declare (unless dontDeclare = true) and bind the queue to (null = none) - * @param dontDeclare if true then dont declare the exchange, even if its name is non-null + * @param dontDeclare if true then don't declare the exchange, even if its name is non-null * @param routingKeys routingKeys to bind the queue with (empty array = none) * @return */ diff --git a/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/PlainConfiguration.java b/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/PlainConfiguration.java index ab309c54ce..31c345f718 100644 --- a/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/PlainConfiguration.java +++ b/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/PlainConfiguration.java @@ -182,7 +182,7 @@ public class PlainConfiguration extends AbstractConfiguration break; // continue reading next line } - // invalid location for continuation character (add one to line beacuse we ate the EOL) + // invalid location for continuation character (add one to line because we ate the EOL) throw new IllegalConfigurationException(String.format(PREMATURE_CONTINUATION_MSG, getLine() + 1)); } else if (_st.ttype == '\'' || _st.ttype == '"') diff --git a/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/Rule.java b/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/Rule.java index cef9a8696b..9e9b33194e 100644 --- a/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/Rule.java +++ b/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/Rule.java @@ -35,7 +35,7 @@ import org.apache.qpid.server.security.access.Permission; */ public class Rule implements Comparable<Rule> { - /** String indicating all identitied. */ + /** String indicating all identified. */ public static final String ALL = "all"; private Integer _number; diff --git a/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/RuleSet.java b/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/RuleSet.java index e321e0e8f0..2e2b6b2041 100644 --- a/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/RuleSet.java +++ b/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/RuleSet.java @@ -242,7 +242,7 @@ public class RuleSet /** Returns true if a username has the name[@domain][/realm] format */ protected boolean isvalidUserName(String name) { - // check for '@' and '/' in namne + // check for '@' and '/' in name int atPos = name.indexOf(AT); int slashPos = name.indexOf(SLASH); boolean atFound = atPos != StringUtils.INDEX_NOT_FOUND && atPos == name.lastIndexOf(AT); diff --git a/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/config/PlainConfigurationTest.java b/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/config/PlainConfigurationTest.java index 3a324bc571..e22f4af895 100644 --- a/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/config/PlainConfigurationTest.java +++ b/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/config/PlainConfigurationTest.java @@ -323,7 +323,7 @@ public class PlainConfigurationTest extends TestCase * be introduced anywhere in the ACL, whereas the C++ supports only whitespace at the beginning of * of line. */ - public void testCommentsSuppported() throws Exception + public void testCommentsSupported() throws Exception { final PlainConfiguration config = writeACLConfig("#Comment", "ACL DENY-LOG user1 ACCESS VIRTUALHOST # another comment", @@ -362,7 +362,7 @@ public class PlainConfigurationTest extends TestCase /** * Tests interpretation of an acl utilising line continuation. */ - public void testLineContination() throws Exception + public void testLineContinuation() throws Exception { final PlainConfiguration config = writeACLConfig("ACL DENY-LOG user1 \\", "ACCESS VIRTUALHOST"); diff --git a/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/firewall/HostnameFirewallRuleTest.java b/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/firewall/HostnameFirewallRuleTest.java index be82cb294a..d2beebfb0f 100644 --- a/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/firewall/HostnameFirewallRuleTest.java +++ b/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/firewall/HostnameFirewallRuleTest.java @@ -51,7 +51,7 @@ public class HostnameFirewallRuleTest extends TestCase assertTrue(_HostnameFirewallRule.matches(addressWithMatchingHostname)); } - public void testSingleHostnameWilcard() throws Exception + public void testSingleHostnameWildcard() throws Exception { String hostnameInRule = ".*FOO.*"; InetAddress addressWithMatchingHostname = mock(InetAddress.class); diff --git a/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/DefaultAccessControlTest.java b/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/DefaultAccessControlTest.java index a8406308c0..ea8e469edb 100644 --- a/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/DefaultAccessControlTest.java +++ b/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/DefaultAccessControlTest.java @@ -329,7 +329,7 @@ public class DefaultAccessControlTest extends TestCase /** * Tests that granting of access method rights with mask allows matching operations to be performed on the specified component */ - public void testAuthoriseAccessMethodWhenMatchingAcessOperationsAllowedOnSpecifiedComponent() throws ConfigurationException + public void testAuthoriseAccessMethodWhenMatchingAccessOperationsAllowedOnSpecifiedComponent() throws ConfigurationException { final RuleSet rs = new RuleSet(); diff --git a/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerSession.java b/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerSession.java index 261c937836..fe82f65115 100644 --- a/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerSession.java +++ b/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerSession.java @@ -89,7 +89,7 @@ public class ServerSession extends Session { private static final Logger _logger = LoggerFactory.getLogger(ServerSession.class); - private static final String NULL_DESTINTATION = UUID.randomUUID().toString(); + private static final String NULL_DESTINATION = UUID.randomUUID().toString(); private static final int PRODUCER_CREDIT_TOPUP_THRESHOLD = 1 << 30; private static final int UNFINISHED_COMMAND_QUEUE_THRESHOLD = 500; @@ -421,12 +421,12 @@ public class ServerSession extends Session public void register(String destination, Subscription_0_10 sub) { - _subscriptions.put(destination == null ? NULL_DESTINTATION : destination, sub); + _subscriptions.put(destination == null ? NULL_DESTINATION : destination, sub); } public Subscription_0_10 getSubscription(String destination) { - return _subscriptions.get(destination == null ? NULL_DESTINTATION : destination); + return _subscriptions.get(destination == null ? NULL_DESTINATION : destination); } public void unregister(Subscription_0_10 sub) diff --git a/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerSessionDelegate.java b/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerSessionDelegate.java index 8756beb690..973f706e0a 100644 --- a/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerSessionDelegate.java +++ b/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerSessionDelegate.java @@ -968,7 +968,7 @@ public class ServerSessionDelegate extends SessionDelegate } else { - //TODO - here because of non-compiant python tests + //TODO - here because of non-compliant python tests // should raise exception ILLEGAL_ARGUMENT "binding-key not set" if (!method.hasBindingKey()) { diff --git a/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQChannel.java b/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQChannel.java index 5c674ef27e..b7dc105cb7 100644 --- a/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQChannel.java +++ b/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQChannel.java @@ -393,7 +393,7 @@ public class AMQChannel implements AMQSessionModel, AsyncAutoCommitTransaction.F * * Pre-requisite: the current message is judged to have no destination queues. * - * @throws AMQConnectionException if the message is mandatoryclose-on-no-route + * @throws AMQConnectionException if the message is mandatory close-on-no-route * @see AMQProtocolSession#isCloseWhenNoRoute() */ private void handleUnroutableMessage(AMQMessage message) throws AMQConnectionException @@ -969,7 +969,7 @@ public class AMQChannel implements AMQSessionModel, AsyncAutoCommitTransaction.F // perform an Async delivery for each of the subscriptions in this // Channel. The alternative would be to ensure that the subscription // had received the change in suspension state. That way the logic - // behind decieding to start an async delivery was located with the + // behind deciding to start an async delivery was located with the // Subscription. if (wasSuspended) { diff --git a/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQProtocolEngine.java b/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQProtocolEngine.java index c3489d8c82..c7a84fa3b6 100644 --- a/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQProtocolEngine.java +++ b/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQProtocolEngine.java @@ -387,7 +387,7 @@ public class AMQProtocolEngine implements ServerProtocolEngine, AMQProtocolSessi AMQChannel amqChannel = _channelMap.get(channelId); if(amqChannel != null) { - // The _receivedLock is already aquired in the caller + // The _receivedLock is already acquired in the caller // It is safe to add channel _channelsForCurrentMessage.add(amqChannel); } @@ -477,7 +477,7 @@ public class AMQProtocolEngine implements ServerProtocolEngine, AMQProtocolSessi (_codecFactory.getDecoder()).setExpectProtocolInitiation(false); try { - // Log incomming protocol negotiation request + // Log incoming protocol negotiation request _actor.message(ConnectionMessages.OPEN(null, pi.getProtocolMajor() + "-" + pi.getProtocolMinor(), null, null, false, true, false, false)); ProtocolVersion pv = pi.checkVersion(); // Fails if not correct @@ -608,7 +608,7 @@ public class AMQProtocolEngine implements ServerProtocolEngine, AMQProtocolSessi { if (_logger.isDebugEnabled()) { - _logger.debug("ChannelException occured on non-existent channel:" + e.getMessage()); + _logger.debug("ChannelException occurred on non-existent channel:" + e.getMessage()); } if (_logger.isInfoEnabled()) @@ -851,14 +851,14 @@ public class AMQProtocolEngine implements ServerProtocolEngine, AMQProtocolSessi public void closeChannelOk(int channelId) { - // todo QPID-847 - This is called from two lcoations ChannelCloseHandler and ChannelCloseOkHandler. - // When it is the CC_OK_Handler then it makes sence to remove the channel else we will leak memory. + // todo QPID-847 - This is called from two locations ChannelCloseHandler and ChannelCloseOkHandler. + // When it is the CC_OK_Handler then it makes sense to remove the channel else we will leak memory. // We do it from the Close Handler as we are sending the OK back to the client. // While this is AMQP spec compliant. The Java client in the event of an IllegalArgumentException // will send a close-ok.. Where we should call removeChannel. // However, due to the poor exception handling on the client. The client-user will be notified of the // InvalidArgument and if they then decide to close the session/connection then the there will be time - // for that to occur i.e. a new close method be sent before the exeption handling can mark the session closed. + // for that to occur i.e. a new close method be sent before the exception handling can mark the session closed. _closingChannelsList.remove(channelId); } diff --git a/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQProtocolSession.java b/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQProtocolSession.java index 559ab3468e..85d995518a 100644 --- a/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQProtocolSession.java +++ b/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQProtocolSession.java @@ -123,7 +123,7 @@ public interface AMQProtocolSession extends AMQVersionAwareProtocolSession, Auth void closeChannel(int channelId, AMQConstant cause, String message) throws AMQException; /** - * Markes the specific channel as closed. This will release the lock for that channel id so a new channel can be + * Marks the specific channel as closed. This will release the lock for that channel id so a new channel can be * created on that id. * * @param channelId id of the channel to close diff --git a/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/ExtractResendAndRequeue.java b/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/ExtractResendAndRequeue.java index ce0ef6cf50..060aebdd65 100644 --- a/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/ExtractResendAndRequeue.java +++ b/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/ExtractResendAndRequeue.java @@ -37,20 +37,20 @@ public class ExtractResendAndRequeue implements UnacknowledgedMessageMap.Visitor private final Map<Long, QueueEntry> _msgToRequeue; private final Map<Long, QueueEntry> _msgToResend; - private final boolean _requeueIfUnabletoResend; + private final boolean _requeueIfUnableToResend; private final UnacknowledgedMessageMap _unacknowledgedMessageMap; private final MessageStore _transactionLog; public ExtractResendAndRequeue(UnacknowledgedMessageMap unacknowledgedMessageMap, Map<Long, QueueEntry> msgToRequeue, Map<Long, QueueEntry> msgToResend, - boolean requeueIfUnabletoResend, + boolean requeueIfUnableToResend, MessageStore txnLog) { _unacknowledgedMessageMap = unacknowledgedMessageMap; _msgToRequeue = msgToRequeue; _msgToResend = msgToResend; - _requeueIfUnabletoResend = requeueIfUnabletoResend; + _requeueIfUnableToResend = requeueIfUnableToResend; _transactionLog = txnLog; } @@ -78,7 +78,7 @@ public class ExtractResendAndRequeue implements UnacknowledgedMessageMap.Visitor // cannot resend, so re-queue. if (!message.isQueueDeleted()) { - if (_requeueIfUnabletoResend) + if (_requeueIfUnableToResend) { _msgToRequeue.put(deliveryTag, message); } diff --git a/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/SubscriptionImpl.java b/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/SubscriptionImpl.java index 3b087d263a..7c52fbe3b0 100644 --- a/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/SubscriptionImpl.java +++ b/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/SubscriptionImpl.java @@ -58,7 +58,7 @@ import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; /** - * Encapsulation of a supscription to a queue. <p/> Ties together the protocol session of a subscriber, the consumer tag + * Encapsulation of a subscription to a queue. <p/> Ties together the protocol session of a subscriber, the consumer tag * that was given out by the broker and the channel id. <p/> */ public abstract class SubscriptionImpl implements Subscription, FlowCreditManager.FlowCreditManagerListener diff --git a/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/handler/UnexpectedMethodException.java b/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/handler/UnexpectedMethodException.java index 32a9f768ec..cb14254494 100644 --- a/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/handler/UnexpectedMethodException.java +++ b/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/handler/UnexpectedMethodException.java @@ -31,6 +31,6 @@ public class UnexpectedMethodException extends AMQException public UnexpectedMethodException(AMQMethodBody body)
{
- super("Unexpected method recevied: " + body.getClass().getName());
+ super("Unexpected method received: " + body.getClass().getName());
}
}
diff --git a/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/AckTest.java b/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/AckTest.java index 176d1858f1..2243cbff11 100644 --- a/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/AckTest.java +++ b/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/AckTest.java @@ -182,7 +182,7 @@ public class AckTest extends QpidTestCase final int msgCount = 10; publishMessages(msgCount, true); UnacknowledgedMessageMap map = _channel.getUnacknowledgedMessageMap(); - assertEquals("Unextpected size for unacknowledge message map",msgCount,map.size()); + assertEquals("Unexpected size for unacknowledged message map",msgCount,map.size()); Set<Long> deliveryTagSet = map.getDeliveryTags(); int i = 1; @@ -333,93 +333,6 @@ public class AckTest extends QpidTestCase } - -/* - public void testPrefetchHighLow() throws AMQException - { - int lowMark = 5; - int highMark = 10; - - _subscription = SubscriptionFactoryImpl.INSTANCE.createSubscription(5, _protocolSession, DEFAULT_CONSUMER_TAG, true,null,false, new LimitlessCreditManager()); - _channel.setPrefetchLowMarkCount(lowMark); - _channel.setPrefetchHighMarkCount(highMark); - - assertTrue(_channel.getPrefetchLowMarkCount() == lowMark); - assertTrue(_channel.getPrefetchHighMarkCount() == highMark); - - publishMessages(highMark); - - // at this point we should have sent out only highMark messages - // which have not bee received so will be queued up in the channel - // which should be suspended - assertTrue(_subscription.isSuspended()); - UnacknowledgedMessageMap map = _channel.getUnacknowledgedMessageMap(); - assertTrue(map.size() == highMark); - - //acknowledge messages so we are just above lowMark - _channel.acknowledgeMessage(lowMark - 1, true); - - //we should still be suspended - assertTrue(_subscription.isSuspended()); - assertTrue(map.size() == lowMark + 1); - - //acknowledge one more message - _channel.acknowledgeMessage(lowMark, true); - - //and suspension should be lifted - assertTrue(!_subscription.isSuspended()); - - //pubilsh more msgs so we are just below the limit - publishMessages(lowMark - 1); - - //we should not be suspended - assertTrue(!_subscription.isSuspended()); - - //acknowledge all messages - _channel.acknowledgeMessage(0, true); - try - { - Thread.sleep(3000); - } - catch (InterruptedException e) - { - _log.error("Error: " + e, e); - } - //map will be empty - assertTrue(map.size() == 0); - } - -*/ -/* - public void testPrefetch() throws AMQException - { - _subscription = SubscriptionFactoryImpl.INSTANCE.createSubscription(5, _protocolSession, DEFAULT_CONSUMER_TAG, true,null,false, new LimitlessCreditManager()); - _channel.setMessageCredit(5); - - assertTrue(_channel.getPrefetchCount() == 5); - - final int msgCount = 5; - publishMessages(msgCount); - - // at this point we should have sent out only 5 messages with a further 5 queued - // up in the channel which should now be suspended - assertTrue(_subscription.isSuspended()); - UnacknowledgedMessageMap map = _channel.getUnacknowledgedMessageMap(); - assertTrue(map.size() == 5); - _channel.acknowledgeMessage(5, true); - assertTrue(!_subscription.isSuspended()); - try - { - Thread.sleep(3000); - } - catch (InterruptedException e) - { - _log.error("Error: " + e, e); - } - assertTrue(map.size() == 0); - } - -*/ public static junit.framework.Test suite() { return new junit.framework.TestSuite(AckTest.class); diff --git a/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/AcknowledgeTest.java b/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/AcknowledgeTest.java index 43f88ca2a3..bb5fecdfb4 100644 --- a/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/AcknowledgeTest.java +++ b/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/AcknowledgeTest.java @@ -117,12 +117,12 @@ public class AcknowledgeTest extends QpidTestCase runMessageAck(10, 1, 0, true, 0); } - protected void runMessageAck(int sendMessageCount, long firstDeliveryTag, long acknowledgeDeliveryTag, boolean acknowldegeMultiple, int remainingUnackedMessages) throws AMQException + protected void runMessageAck(int sendMessageCount, long firstDeliveryTag, long acknowledgeDeliveryTag, boolean acknowledgeMultiple, int remainingUnackedMessages) throws AMQException { //Check store is empty checkStoreContents(0); - //Send required messsages to the queue + //Send required messages to the queue BrokerTestHelper_0_8.publishMessages(getChannel(), sendMessageCount, _queueName, @@ -147,7 +147,7 @@ public class AcknowledgeTest extends QpidTestCase //Wait for the messages to be delivered getSession().awaitDelivery(sendMessageCount); - //Check that they are all waiting to be acknoledged + //Check that they are all waiting to be acknowledged assertEquals("Channel should have unacked msgs", sendMessageCount, getChannel().getUnacknowledgedMessageMap().size()); List<InternalTestProtocolSession.DeliveryPair> messages = getSession().getDelivers(getChannel().getChannelId(), subscriber, sendMessageCount); @@ -159,7 +159,7 @@ public class AcknowledgeTest extends QpidTestCase assertEquals("First message does not have expected deliveryTag", firstDeliveryTag, messages.get(0).getDeliveryTag()); //Send required Acknowledgement - getChannel().acknowledgeMessage(acknowledgeDeliveryTag, acknowldegeMultiple); + getChannel().acknowledgeMessage(acknowledgeDeliveryTag, acknowledgeMultiple); if (getChannel().isTransactional()) { diff --git a/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/BrokerTestHelper_0_8.java b/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/BrokerTestHelper_0_8.java index 0919607bd7..991a0272d4 100644 --- a/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/BrokerTestHelper_0_8.java +++ b/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/BrokerTestHelper_0_8.java @@ -66,11 +66,11 @@ public class BrokerTestHelper_0_8 extends BrokerTestHelper public static void publishMessages(AMQChannel channel, int numberOfMessages, String queueName, String exchangeName) throws AMQException { - AMQShortString rouningKey = new AMQShortString(queueName); + AMQShortString routingKey = new AMQShortString(queueName); AMQShortString exchangeNameAsShortString = new AMQShortString(exchangeName); MessagePublishInfo info = mock(MessagePublishInfo.class); when(info.getExchange()).thenReturn(exchangeNameAsShortString); - when(info.getRoutingKey()).thenReturn(rouningKey); + when(info.getRoutingKey()).thenReturn(routingKey); Exchange exchange = channel.getVirtualHost().getExchange(exchangeName); for (int count = 0; count < numberOfMessages; count++) diff --git a/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/ExtractResendAndRequeueTest.java b/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/ExtractResendAndRequeueTest.java index 7f36b4a081..36a57fa05f 100644 --- a/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/ExtractResendAndRequeueTest.java +++ b/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/ExtractResendAndRequeueTest.java @@ -45,12 +45,12 @@ import java.util.Map; * * This clearing/prep for resend was done as a result of the rollback call. HOWEVER, the delivery thread was still * in the process of sending messages to the client. It is therefore possible that a message could block on the - * _unackedMap lock waiting for the visit to compelete so that it can add the new message to the unackedMap.... + * _unackedMap lock waiting for the visit to complete so that it can add the new message to the unackedMap.... * which is then cleared by the resend/rollback thread. * * This problem was encountered by the testSend2ThenRollback test. * - * To try and increase the chance of the race condition occuring this test will send multiple messages so that the + * To try and increase the chance of the race condition occurring this test will send multiple messages so that the * delivery thread will be in progress while the rollback method is called. Hopefully this will cause the * deliveryTag to be lost */ @@ -82,7 +82,7 @@ public class ExtractResendAndRequeueTest extends TestCase id++; } - // Iterate through the QueueEntryList and add entries to unacknowledgeMessageMap and referecenList + // Iterate through the QueueEntryList and add entries to unacknowledgedMessageMap and referenceList QueueEntryIterator queueEntries = list.iterator(); while(queueEntries.advance()) { @@ -97,13 +97,13 @@ public class ExtractResendAndRequeueTest extends TestCase } /** - * Helper method to create a new subscription and aquire the given messages. + * Helper method to create a new subscription and acquire the given messages. * - * @param messageList The messages to aquire + * @param messageList The messages to acquire * - * @return Subscription that performed the aquire + * @return Subscription that performed the acquire */ - private Subscription createSubscriptionAndAquireMessages(LinkedList<QueueEntry> messageList) + private Subscription createSubscriptionAndAcquireMessages(LinkedList<QueueEntry> messageList) { Subscription subscription = new MockSubscription(); @@ -119,7 +119,7 @@ public class ExtractResendAndRequeueTest extends TestCase /** * This is the normal consumer rollback method. * - * An active consumer that has aquired messages expects those messasges to be reset when rollback is requested. + * An active consumer that has acquired messages expects those messages to be reset when rollback is requested. * * This test validates that the msgToResend map includes all the messages and none are left behind. * @@ -128,12 +128,12 @@ public class ExtractResendAndRequeueTest extends TestCase public void testResend() throws AMQException { //We don't need the subscription object here. - createSubscriptionAndAquireMessages(_referenceList); + createSubscriptionAndAcquireMessages(_referenceList); final Map<Long, QueueEntry> msgToRequeue = new LinkedHashMap<Long, QueueEntry>(); final Map<Long, QueueEntry> msgToResend = new LinkedHashMap<Long, QueueEntry>(); - // requeueIfUnabletoResend doesn't matter here. + // requeueIfUnableToResend doesn't matter here. _unacknowledgedMessageMap.visit(new ExtractResendAndRequeue(_unacknowledgedMessageMap, msgToRequeue, msgToResend, true, _messageStore)); @@ -145,8 +145,8 @@ public class ExtractResendAndRequeueTest extends TestCase /** * This is the normal consumer close method. * - * When a consumer that has aquired messages expects closes the messages that it has aquired should be removed from - * the unacknowledgeMap and placed in msgToRequeue + * When a consumer that has acquired messages expects closes the messages that it has acquired should be removed from + * the unacknowledgedMap and placed in msgToRequeue * * This test validates that the msgToRequeue map includes all the messages and none are left behind. * @@ -154,7 +154,7 @@ public class ExtractResendAndRequeueTest extends TestCase */ public void testRequeueDueToSubscriptionClosure() throws AMQException { - Subscription subscription = createSubscriptionAndAquireMessages(_referenceList); + Subscription subscription = createSubscriptionAndAcquireMessages(_referenceList); // Close subscription subscription.close(); @@ -162,7 +162,7 @@ public class ExtractResendAndRequeueTest extends TestCase final Map<Long, QueueEntry> msgToRequeue = new LinkedHashMap<Long, QueueEntry>(); final Map<Long, QueueEntry> msgToResend = new LinkedHashMap<Long, QueueEntry>(); - // requeueIfUnabletoResend doesn't matter here. + // requeueIfUnableToResend doesn't matter here. _unacknowledgedMessageMap.visit(new ExtractResendAndRequeue(_unacknowledgedMessageMap, msgToRequeue, msgToResend, true, _messageStore)); @@ -173,7 +173,7 @@ public class ExtractResendAndRequeueTest extends TestCase /** * If the subscription is null, due to message being retrieved via a GET, And we request that messages are requeued - * requeueIfUnabletoResend(set to true) then all messages should be sent to the msgToRequeue map. + * requeueIfUnableToResend(set to true) then all messages should be sent to the msgToRequeue map. * * @throws AMQException the visit interface throws this */ @@ -183,7 +183,7 @@ public class ExtractResendAndRequeueTest extends TestCase final Map<Long, QueueEntry> msgToRequeue = new LinkedHashMap<Long, QueueEntry>(); final Map<Long, QueueEntry> msgToResend = new LinkedHashMap<Long, QueueEntry>(); - // requeueIfUnabletoResend = true so all messages should go to msgToRequeue + // requeueIfUnableToResend = true so all messages should go to msgToRequeue _unacknowledgedMessageMap.visit(new ExtractResendAndRequeue(_unacknowledgedMessageMap, msgToRequeue, msgToResend, true, _messageStore)); @@ -194,7 +194,7 @@ public class ExtractResendAndRequeueTest extends TestCase /** * If the subscription is null, due to message being retrieved via a GET, And we request that we don't - * requeueIfUnabletoResend(set to false) then all messages should be dropped as we do not have a dead letter queue. + * requeueIfUnableToResend(set to false) then all messages should be dropped as we do not have a dead letter queue. * * @throws AMQException the visit interface throws this */ @@ -204,7 +204,7 @@ public class ExtractResendAndRequeueTest extends TestCase final Map<Long, QueueEntry> msgToRequeue = new LinkedHashMap<Long, QueueEntry>(); final Map<Long, QueueEntry> msgToResend = new LinkedHashMap<Long, QueueEntry>(); - // requeueIfUnabletoResend = false so all messages should be dropped all maps should be empty + // requeueIfUnableToResend = false so all messages should be dropped all maps should be empty _unacknowledgedMessageMap.visit(new ExtractResendAndRequeue(_unacknowledgedMessageMap, msgToRequeue, msgToResend, false, _messageStore)); @@ -222,7 +222,7 @@ public class ExtractResendAndRequeueTest extends TestCase /** * If the subscription is null, due to message being retrieved via a GET, AND the queue upon which the message was - * delivered has been deleted then it is not possible to requeue. Currently we simply discar the message but in the + * delivered has been deleted then it is not possible to requeue. Currently we simply discard the message but in the * future we may wish to dead letter the message. * * Validate that at the end of the visit all Maps are empty and all messages are marked as deleted @@ -236,7 +236,7 @@ public class ExtractResendAndRequeueTest extends TestCase _queue.delete(); - // requeueIfUnabletoResend : value doesn't matter here as queue has been deleted + // requeueIfUnableToResend : value doesn't matter here as queue has been deleted _unacknowledgedMessageMap.visit(new ExtractResendAndRequeue(_unacknowledgedMessageMap, msgToRequeue, msgToResend, false, _messageStore)); diff --git a/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/InternalTestProtocolSession.java b/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/InternalTestProtocolSession.java index 4a5ada89c2..ef0837b3c6 100644 --- a/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/InternalTestProtocolSession.java +++ b/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/InternalTestProtocolSession.java @@ -191,7 +191,7 @@ public class InternalTestProtocolSession extends AMQProtocolEngine implements Pr } catch (InterruptedException e) { - _logger.error("Thread interupted", e); + _logger.error("Thread interrupted", e); } } } diff --git a/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/MaxChannelsTest.java b/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/MaxChannelsTest.java index a77475c05f..16c890eaea 100644 --- a/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/MaxChannelsTest.java +++ b/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/MaxChannelsTest.java @@ -60,7 +60,7 @@ public class MaxChannelsTest extends QpidTestCase } catch (AMQException e) { - assertEquals("Wrong exception recevied.", e.getErrorCode(), AMQConstant.NOT_ALLOWED); + assertEquals("Wrong exception received.", e.getErrorCode(), AMQConstant.NOT_ALLOWED); } assertEquals("Maximum number of channels not set.", new Long(maxChannels), new Long(_session.getChannels().size())); } diff --git a/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/QueueBrowserUsesNoAckTest.java b/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/QueueBrowserUsesNoAckTest.java index 4f9df3b38d..8c716a0b56 100644 --- a/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/QueueBrowserUsesNoAckTest.java +++ b/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/QueueBrowserUsesNoAckTest.java @@ -95,7 +95,7 @@ public class QueueBrowserUsesNoAckTest extends QpidTestCase //Check store is empty checkStoreContents(0); - //Send required messsages to the queue + //Send required messages to the queue BrokerTestHelper_0_8.publishMessages(getChannel(), sendMessageCount, _queueName, @@ -124,7 +124,7 @@ public class QueueBrowserUsesNoAckTest extends QpidTestCase getSession().getDelivers(getChannel().getChannelId(), browser, prefetch); - //Ensure we recevied the prefetched messages + //Ensure we received the prefetched messages assertEquals(prefetch, messages.size()); //Check the process didn't suspend the subscription as this would diff --git a/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/SubscriptionFactoryImplTest.java b/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/SubscriptionFactoryImplTest.java index e98dd63450..e0d1b28007 100644 --- a/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/SubscriptionFactoryImplTest.java +++ b/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/SubscriptionFactoryImplTest.java @@ -81,9 +81,9 @@ public class SubscriptionFactoryImplTest extends QpidTestCase //create a browser subscription FieldTable filters = new FieldTable(); filters.put(AMQPFilterTypes.NO_CONSUME.getValue(), true); - Subscription browerSub = SubscriptionFactoryImpl.INSTANCE.createSubscription(1, _session, new AMQShortString("1"), true, null, false, _channel.getCreditManager()); - assertEquals("Unexpected Subscription ID allocated", previousId + 1, browerSub.getSubscriptionID()); - previousId = browerSub.getSubscriptionID(); + Subscription browserSub = SubscriptionFactoryImpl.INSTANCE.createSubscription(1, _session, new AMQShortString("1"), true, null, false, _channel.getCreditManager()); + assertEquals("Unexpected Subscription ID allocated", previousId + 1, browserSub.getSubscriptionID()); + previousId = browserSub.getSubscriptionID(); //create an BasicGet NoAck subscription Subscription getNoAckSub = SubscriptionFactoryImpl.INSTANCE.createBasicGetNoAckSubscription(_channel, _session, new AMQShortString("1"), null, false, diff --git a/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageMetaData_1_0.java b/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageMetaData_1_0.java index 8db6c86fc4..5026007360 100755 --- a/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageMetaData_1_0.java +++ b/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageMetaData_1_0.java @@ -88,9 +88,9 @@ public class MessageMetaData_1_0 implements StorableMessageMetaData this(fragments, decoder, new ArrayList<ByteBuffer>(3)); } - public MessageMetaData_1_0(ByteBuffer[] fragments, SectionDecoder decoder, List<ByteBuffer> immuatableSections) + public MessageMetaData_1_0(ByteBuffer[] fragments, SectionDecoder decoder, List<ByteBuffer> immutableSections) { - this(constructSections(fragments, decoder,immuatableSections), immuatableSections); + this(constructSections(fragments, decoder,immutableSections), immutableSections); } private MessageMetaData_1_0(List<Section> sections, List<ByteBuffer> encodedSections) diff --git a/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/TxnCoordinatorLink_1_0.java b/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/TxnCoordinatorLink_1_0.java index 10d4811916..3dd9b565ad 100644 --- a/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/TxnCoordinatorLink_1_0.java +++ b/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/TxnCoordinatorLink_1_0.java @@ -104,7 +104,7 @@ public class TxnCoordinatorLink_1_0 implements ReceivingLinkListener, Link_1_0 } - // Only interested int he amqp-value section that holds the message to the co-ordinator + // Only interested int he amqp-value section that holds the message to the coordinator try { List<Section> sections = _sectionDecoder.parseAll(payload); @@ -182,7 +182,7 @@ public class TxnCoordinatorLink_1_0 implements ReceivingLinkListener, Link_1_0 { error = new Error(); error.setCondition(AmqpError.NOT_FOUND); - error.setDescription("Unkown transactionId" + transactionId); + error.setDescription("Unknown transactionId" + transactionId); } return error; } diff --git a/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/filter/RedirectingAuthorisationFilter.java b/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/filter/RedirectingAuthorisationFilter.java index c5e9890620..184a653fa8 100644 --- a/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/filter/RedirectingAuthorisationFilter.java +++ b/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/filter/RedirectingAuthorisationFilter.java @@ -53,10 +53,10 @@ public class RedirectingAuthorisationFilter implements Filter @Override public void init(FilterConfig config) throws ServletException { - String loginlUrl = config.getInitParameter(INIT_PARAM_LOGIN_URL); - if (loginlUrl != null) + String loginUrl = config.getInitParameter(INIT_PARAM_LOGIN_URL); + if (loginUrl != null) { - _loginUrl = loginlUrl; + _loginUrl = loginUrl; } ServletContext servletContext = config.getServletContext(); _broker = HttpManagementUtil.getBroker(servletContext); diff --git a/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/log/LogFileHelper.java b/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/log/LogFileHelper.java index 4104661017..51256ab5fa 100644 --- a/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/log/LogFileHelper.java +++ b/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/log/LogFileHelper.java @@ -202,12 +202,12 @@ public class LogFileHelper String name = file.getName(); if (name.startsWith(baseFileName)) { - String diplayPath = name; + String displayPath = name; if (!relativePath.equals("")) { - diplayPath = relativePath + name; + displayPath = relativePath + name; } - files.add(new LogFileDetails(diplayPath, appenderName, includeLogFileLocation ? file : null, getMimeType(name), file.length(), + files.add(new LogFileDetails(displayPath, appenderName, includeLogFileLocation ? file : null, getMimeType(name), file.length(), file.lastModified())); } } diff --git a/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/MessageServlet.java b/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/MessageServlet.java index ac0d369402..a71d833fc3 100644 --- a/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/MessageServlet.java +++ b/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/MessageServlet.java @@ -445,7 +445,7 @@ public class MessageServlet extends AbstractServlet } catch(RuntimeException e) { - LOGGER.error("Failure to perform message opertion", e); + LOGGER.error("Failure to perform message operation", e); response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); } } diff --git a/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/RestServlet.java b/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/RestServlet.java index 08a8676601..ca11bd9465 100644 --- a/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/RestServlet.java +++ b/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/RestServlet.java @@ -104,8 +104,8 @@ public class RestServlet extends AbstractServlet Class<? extends ConfiguredObject> clazz = (Class<? extends ConfiguredObject>)itemClass; classes.add(clazz); } - Class<? extends ConfiguredObject>[] hierachyClasses = (Class<? extends ConfiguredObject>[])new Class[classes.size()]; - _hierarchy = classes.toArray(hierachyClasses); + Class<? extends ConfiguredObject>[] hierarchyClasses = (Class<? extends ConfiguredObject>[])new Class[classes.size()]; + _hierarchy = classes.toArray(hierarchyClasses); } else { diff --git a/qpid/java/broker-plugins/management-http/src/test/java/org/apache/qpid/server/management/plugin/log/LogFileHelperTest.java b/qpid/java/broker-plugins/management-http/src/test/java/org/apache/qpid/server/management/plugin/log/LogFileHelperTest.java index 608ef28f02..26e6cddc82 100644 --- a/qpid/java/broker-plugins/management-http/src/test/java/org/apache/qpid/server/management/plugin/log/LogFileHelperTest.java +++ b/qpid/java/broker-plugins/management-http/src/test/java/org/apache/qpid/server/management/plugin/log/LogFileHelperTest.java @@ -214,9 +214,9 @@ public class LogFileHelperTest extends QpidTestCase { assertEquals("Unexpected mime type", LogFileHelper.TEXT_MIME_TYPE, d.getMimeType()); } - assertEquals("Unexpecte file location", files[j], d.getLocation()); - assertEquals("Unexpecte file size", files[j].length(), d.getSize()); - assertEquals("Unexpecte file last modified date", files[j].lastModified(), d.getLastModified()); + assertEquals("Unexpected file location", files[j], d.getLocation()); + assertEquals("Unexpected file size", files[j].length(), d.getSize()); + assertEquals("Unexpected file last modified date", files[j].lastModified(), d.getLastModified()); } assertTrue("Gzip log file is not found", gzipFileFound); } @@ -235,13 +235,13 @@ public class LogFileHelperTest extends QpidTestCase assertTrue("No details should be created for non-existing file", details.isEmpty()); } - public void testFindLogFileDetailsForIncorectlySpecifiedLogFilePath() + public void testFindLogFileDetailsForIncorrectlySpecifiedLogFilePath() { String[] logFileDisplayedPaths = { "FileAppender\\" + _appendersFiles.get("FileAppender").get(0).getName() }; try { _helper.findLogFileDetails(logFileDisplayedPaths); - fail("Exception is expected for incorectly set path to log file"); + fail("Exception is expected for incorrectly set path to log file"); } catch (IllegalArgumentException e) { diff --git a/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/MBeanIntrospector.java b/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/MBeanIntrospector.java index 79ddc8cfc0..d227b3a02e 100644 --- a/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/MBeanIntrospector.java +++ b/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/MBeanIntrospector.java @@ -47,7 +47,7 @@ class MBeanIntrospector { private static final String _defaultAttributeDescription = "Management attribute"; - private static final String _defaultOerationDescription = "Management operation"; + private static final String _defaultOperationDescription = "Management operation"; private static final String _defaultConstructorDescription = "MBean constructor"; private static final String _defaultMbeanDescription = "Management interface of the MBean"; @@ -221,7 +221,7 @@ class MBeanIntrospector * Helper method to retrieve the attribute index from the list of attributes. * @param attribute * @param list - * @return attribute index no. -1 if attribtue doesn't exist + * @return attribute index no. -1 if attribute doesn't exist * @throws javax.management.NotCompliantMBeanException */ private static int getIndexIfAlreadyExists(MBeanAttributeInfo attribute, @@ -281,7 +281,7 @@ class MBeanIntrospector MBeanParameterInfo[] paramsInfo = getParametersInfo(operation.getParameterAnnotations(), operation.getParameterTypes()); - String operationDesc = _defaultOerationDescription; + String operationDesc = _defaultOperationDescription; int impact = MBeanOperationInfo.UNKNOWN; if (operation.getAnnotation(MBeanOperation.class) != null) diff --git a/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/MBeanInvocationHandlerImpl.java b/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/MBeanInvocationHandlerImpl.java index 8bc2afb176..0f963df66f 100644 --- a/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/MBeanInvocationHandlerImpl.java +++ b/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/MBeanInvocationHandlerImpl.java @@ -198,7 +198,7 @@ public class MBeanInvocationHandlerImpl implements InvocationHandler } else { - _logger.error("Unexpected error occured on invoking of " + method + " with arguments " + Arrays.toString(args), targetException); + _logger.error("Unexpected error occurred on invoking of " + method + " with arguments " + Arrays.toString(args), targetException); } } diff --git a/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/ManagedObjectRegistry.java b/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/ManagedObjectRegistry.java index 2ae0ac7052..d8aea03b36 100644 --- a/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/ManagedObjectRegistry.java +++ b/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/ManagedObjectRegistry.java @@ -29,12 +29,12 @@ import java.io.IOException; /** * Handles the registration (and unregistration and so on) of managed objects. * - * Managed objects are responsible for exposting attributes, operations and notifications. They will expose + * Managed objects are responsible for exporting attributes, operations and notifications. They will expose * these outside the JVM therefore it is important not to use implementation objects directly as managed objects. * Instead, creating inner classes and exposing those is an effective way of exposing internal state in a * controlled way. * - * Although we do not explictly use them while targetting Java 5, the enhanced MXBean approach in Java 6 will + * Although we do not explicitly use them while targeting Java 5, the enhanced MXBean approach in Java 6 will * be the obvious choice for managed objects. * */ diff --git a/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/mbeans/QueueMBean.java b/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/mbeans/QueueMBean.java index cda32cc3f8..49cb6aa8cb 100644 --- a/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/mbeans/QueueMBean.java +++ b/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/mbeans/QueueMBean.java @@ -69,7 +69,7 @@ public class QueueMBean extends AMQManagedObject implements ManagedQueue, QueueN private static final CompositeType MSG_DATA_TYPE; private static final TabularType MSG_LIST_DATA_TYPE; private static final CompositeType MSG_CONTENT_TYPE; - private static final String[] VIEW_MSG_COMPOSIT_ITEM_NAMES_ARRAY = VIEW_MSG_CONTENT_COMPOSITE_ITEM_NAMES_DESC.toArray( + private static final String[] VIEW_MSG_COMPOSITE_ITEM_NAMES_ARRAY = VIEW_MSG_CONTENT_COMPOSITE_ITEM_NAMES_DESC.toArray( new String[VIEW_MSG_CONTENT_COMPOSITE_ITEM_NAMES_DESC.size()]); static @@ -396,7 +396,7 @@ public class QueueMBean extends AMQManagedObject implements ManagedQueue, QueueN Object[] itemValues = { messageId, mimeType, encoding, msgContent }; - return new CompositeDataSupport(MSG_CONTENT_TYPE, VIEW_MSG_COMPOSIT_ITEM_NAMES_ARRAY, itemValues); + return new CompositeDataSupport(MSG_CONTENT_TYPE, VIEW_MSG_COMPOSITE_ITEM_NAMES_ARRAY, itemValues); } diff --git a/qpid/java/broker-plugins/management-jmx/src/test/java/org/apache/qpid/server/jmx/mbeans/UserManagementMBeanTest.java b/qpid/java/broker-plugins/management-jmx/src/test/java/org/apache/qpid/server/jmx/mbeans/UserManagementMBeanTest.java index 8ca6c521eb..5a21bdab7d 100644 --- a/qpid/java/broker-plugins/management-jmx/src/test/java/org/apache/qpid/server/jmx/mbeans/UserManagementMBeanTest.java +++ b/qpid/java/broker-plugins/management-jmx/src/test/java/org/apache/qpid/server/jmx/mbeans/UserManagementMBeanTest.java @@ -120,7 +120,7 @@ public class UserManagementMBeanTest extends TestCase { boolean reloadSuccess = _userManagement.reloadData(); - assertTrue("Reload should return true to flag succesful update", reloadSuccess); + assertTrue("Reload should return true to flag successful update", reloadSuccess); verify(_mockProvider).reload(); } |
