Class identity comparisons wherever possible

Issue: SPR-12926
This commit is contained in:
Juergen Hoeller
2015-05-20 14:34:09 +02:00
parent 57e0c789a8
commit b4095c3e1d
108 changed files with 317 additions and 322 deletions

View File

@@ -573,7 +573,7 @@ class MessageBrokerBeanDefinitionParser implements BeanDefinitionParser {
RuntimeBeanReference webSocketHandler = new RuntimeBeanReference(WEB_SOCKET_HANDLER_BEAN_NAME);
beanDef.getPropertyValues().add("subProtocolWebSocketHandler", webSocketHandler);
if (StompBrokerRelayMessageHandler.class.equals(broker.getBeanClass())) {
if (StompBrokerRelayMessageHandler.class == broker.getBeanClass()) {
beanDef.getPropertyValues().add("stompBrokerRelay", broker);
}
String name = inChannel.getBeanName() + "Executor";

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 the original author or authors.
* Copyright 2002-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -199,7 +199,7 @@ public abstract class AbstractTyrusRequestUpgradeStrategy extends AbstractStanda
private static Constructor<?> getEndpointConstructor() {
for (Constructor<?> current : TyrusEndpointWrapper.class.getConstructors()) {
Class<?>[] types = current.getParameterTypes();
if (types[0].equals(Endpoint.class) && types[1].equals(EndpointConfig.class)) {
if (Endpoint.class == types[0] && EndpointConfig.class == types[1]) {
return current;
}
}