- mockito-configuration
- websocket-client
- yang-common
- concepts
Change-Id: I5a418919e09ce7e423d31a64759349b9e05be5ad
Signed-off-by: Igor Foltin <igor.foltin@pantheon.sk>
}
public CompositeObjectRegistrationBuilder<T> add(final ObjectRegistration<? super T> registration) {
}
public CompositeObjectRegistrationBuilder<T> add(final ObjectRegistration<? super T> registration) {
- if (registration.getInstance() != instance) {
+ if (!registration.getInstance().equals(instance)) {
throw new IllegalArgumentException("Instance must be same.");
}
registrations.add(registration);
throw new IllegalArgumentException("Instance must be same.");
}
registrations.add(registration);
}
public CompositeObjectRegistrationBuilder<T> remove(final ObjectRegistration<? super T> registration) {
}
public CompositeObjectRegistrationBuilder<T> remove(final ObjectRegistration<? super T> registration) {
- if (registration.getInstance() != instance) {
+ if (!registration.getInstance().equals(instance)) {
throw new IllegalArgumentException("Instance must be same.");
}
registrations.remove(registration);
throw new IllegalArgumentException("Instance must be same.");
}
registrations.remove(registration);
private static final long serialVersionUID = 1L;
@Override
private static final long serialVersionUID = 1L;
@Override
- public Object answer(final InvocationOnMock invocation) throws UnstubbedMethodException {
+ public Object answer(final InvocationOnMock invocation) {
throw new UnstubbedMethodException(invocation.toString() + " was not stubbed");
}
}
throw new UnstubbedMethodException(invocation.toString() + " was not stubbed");
}
}
*/
public class WebSocketClientHandler extends SimpleChannelInboundHandler<Object> {
*/
public class WebSocketClientHandler extends SimpleChannelInboundHandler<Object> {
- private static final Logger logger = LoggerFactory
+ private static final Logger LOGGER = LoggerFactory
.getLogger(WebSocketClientHandler.class.toString());
private final WebSocketClientHandshaker handshaker;
private ChannelPromise handshakeFuture;
.getLogger(WebSocketClientHandler.class.toString());
private final WebSocketClientHandshaker handshaker;
private ChannelPromise handshakeFuture;
@Override
public void channelInactive(ChannelHandlerContext ctx) throws Exception {
@Override
public void channelInactive(ChannelHandlerContext ctx) throws Exception {
- logger.info("WebSocket Client disconnected!");
+ LOGGER.info("WebSocket Client disconnected!");
Channel ch = ctx.channel();
if (!handshaker.isHandshakeComplete()) {
handshaker.finishHandshake(ch, (FullHttpResponse) msg);
Channel ch = ctx.channel();
if (!handshaker.isHandshakeComplete()) {
handshaker.finishHandshake(ch, (FullHttpResponse) msg);
- logger.info("WebSocket Client connected!");
+ LOGGER.info("WebSocket Client connected!");
handshakeFuture.setSuccess();
return;
}
handshakeFuture.setSuccess();
return;
}
if (frame instanceof TextWebSocketFrame) {
TextWebSocketFrame textFrame = (TextWebSocketFrame) frame;
if (frame instanceof TextWebSocketFrame) {
TextWebSocketFrame textFrame = (TextWebSocketFrame) frame;
- logger.info("WebSocket Client received message: "
+ LOGGER.info("WebSocket Client received message: "
+ textFrame.text());
} else if (frame instanceof PongWebSocketFrame) {
+ textFrame.text());
} else if (frame instanceof PongWebSocketFrame) {
- logger.info("WebSocket Client received pong");
+ LOGGER.info("WebSocket Client received pong");
} else if (frame instanceof CloseWebSocketFrame) {
} else if (frame instanceof CloseWebSocketFrame) {
- logger.info("WebSocket Client received closing");
+ LOGGER.info("WebSocket Client received closing");
final QNameModule cacheMod = QNameModule.cachedReference(myMod);
final QName what;
final QNameModule cacheMod = QNameModule.cachedReference(myMod);
final QName what;
- if (cacheMod == myMod) {
+ if (cacheMod.equals(myMod)) {
what = qname;
} else {
what = QName.create(cacheMod, qname.localName);
what = qname;
} else {
what = QName.create(cacheMod, qname.localName);