Skip to content

Commit

Permalink
ARTEMIS-607 Formatting clean up.
Browse files Browse the repository at this point in the history
Also updated the maintainer's guide to clarify what is run in the PR builder.
  • Loading branch information
johnament committed Jul 4, 2016
1 parent 2a2b1dc commit ea292b2
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 29 deletions.
Expand Up @@ -16,30 +16,27 @@
*/
package org.apache.activemq.artemis.core.protocol.mqtt;

import java.util.ArrayList;
import java.util.List;

import io.netty.channel.ChannelPipeline;
import io.netty.handler.codec.mqtt.MqttDecoder;
import io.netty.handler.codec.mqtt.MqttEncoder;
import io.netty.handler.codec.mqtt.MqttMessage;
import org.apache.activemq.artemis.api.core.ActiveMQBuffer;
import org.apache.activemq.artemis.api.core.BaseInterceptor;
import org.apache.activemq.artemis.core.messagecounter.MessageCounterManager;
import org.apache.activemq.artemis.core.remoting.impl.netty.NettyServerConnection;
import org.apache.activemq.artemis.core.server.ActiveMQServer;
import org.apache.activemq.artemis.core.server.ActiveMQServerLogger;
import org.apache.activemq.artemis.core.server.management.Notification;
import org.apache.activemq.artemis.core.server.management.NotificationListener;
import org.apache.activemq.artemis.spi.core.protocol.AbstractProtocolManager;
import org.apache.activemq.artemis.spi.core.protocol.ConnectionEntry;
import org.apache.activemq.artemis.spi.core.protocol.MessageConverter;
import org.apache.activemq.artemis.spi.core.protocol.ProtocolManager;
import org.apache.activemq.artemis.spi.core.protocol.ProtocolManagerFactory;
import org.apache.activemq.artemis.spi.core.protocol.RemotingConnection;
import org.apache.activemq.artemis.spi.core.remoting.Acceptor;
import org.apache.activemq.artemis.spi.core.remoting.Connection;

import java.util.ArrayList;
import java.util.List;

/**
* MQTTProtocolManager
*/
Expand Down
Expand Up @@ -40,7 +40,6 @@
import org.apache.activemq.artemis.spi.core.protocol.AbstractProtocolManager;
import org.apache.activemq.artemis.spi.core.protocol.ConnectionEntry;
import org.apache.activemq.artemis.spi.core.protocol.MessageConverter;
import org.apache.activemq.artemis.spi.core.protocol.ProtocolManager;
import org.apache.activemq.artemis.spi.core.protocol.ProtocolManagerFactory;
import org.apache.activemq.artemis.spi.core.protocol.RemotingConnection;
import org.apache.activemq.artemis.spi.core.remoting.Acceptor;
Expand Down
Expand Up @@ -19,32 +19,28 @@

package org.apache.activemq.artemis.spi.core.protocol;

/**
* Created by johnament on 7/3/16.
*/

import org.apache.activemq.artemis.api.core.BaseInterceptor;
import org.apache.activemq.artemis.core.server.ActiveMQServerLogger;

import java.util.List;

public abstract class AbstractProtocolManager<P,I extends BaseInterceptor<P>, C extends RemotingConnection>
implements ProtocolManager<I> {
public abstract class AbstractProtocolManager<P, I extends BaseInterceptor<P>, C extends RemotingConnection>
implements ProtocolManager<I> {

protected void invokeInterceptors(final List<I> interceptors,
final P message,
final C connection) {
if (interceptors != null && !interceptors.isEmpty()) {
for (I interceptor : interceptors) {
try {
if (!interceptor.intercept(message, connection)) {
break;
}
}
catch (Exception e) {
ActiveMQServerLogger.LOGGER.error(e);
}
protected void invokeInterceptors(final List<I> interceptors,
final P message,
final C connection) {
if (interceptors != null && !interceptors.isEmpty()) {
for (I interceptor : interceptors) {
try {
if (!interceptor.intercept(message, connection)) {
break;
}
}
catch (Exception e) {
ActiveMQServerLogger.LOGGER.error(e);
}
}
}
}
}
}
}
2 changes: 1 addition & 1 deletion docs/hacking-guide/en/maintainers.md
Expand Up @@ -11,7 +11,7 @@ What does it mean to be reasonably confident? If the developer has run the same
builds are running they can be reasonably confident. Currently the [PR build](https://builds.apache.org/job/ActiveMQ-Artemis-PR-Build/)
runs this command:

mvn compile test-compile javadoc:javadoc -Pfast-tests -Pextra-tests test
mvn -Pfast-tests -Pextra-tests install

However, if the changes are significant, touches a wide area of code, or even if the developer just wants a second
opinion they are encouraged to engage other members of the community to obtain an additional review prior to pushing.
Expand Down

0 comments on commit ea292b2

Please sign in to comment.