From 5754b4f1b7ce045d1f7e08757fd5e1c5e6042aa0 Mon Sep 17 00:00:00 2001 From: Keith Wall Date: Fri, 5 Sep 2014 10:31:02 +0000 Subject: QPID-6068: [Java Broker] Prevent NPE when ediiting JMX_CONNECTOR port through REST or Web Management UI * Also hidden the authentication provider field when editting an RMI port * Added the missing prompts for transports/protocols. * Remove the mandatory marker from the protocols field git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1622677 13f79535-47bb-0310-9956-ffa450edef68 --- .../qpid/server/model/port/AbstractPortWithAuthProvider.java | 9 ++------- .../main/java/org/apache/qpid/server/model/port/JmxPortImpl.java | 3 --- 2 files changed, 2 insertions(+), 10 deletions(-) (limited to 'qpid/java/broker-core/src') diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/AbstractPortWithAuthProvider.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/AbstractPortWithAuthProvider.java index a959709657..4932c02573 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/AbstractPortWithAuthProvider.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/AbstractPortWithAuthProvider.java @@ -88,18 +88,16 @@ abstract public class AbstractPortWithAuthProvider proxyForValidation, final Set changedAttributes) { super.validateChange(proxyForValidation, changedAttributes); Port updated = (Port)proxyForValidation; - boolean needClientCertificate = (Boolean) updated.getAttribute(NEED_CLIENT_AUTH); - boolean wantClientCertificate = (Boolean) updated.getAttribute(WANT_CLIENT_AUTH); + boolean needClientCertificate = updated.getAttribute(NEED_CLIENT_AUTH) == null ? false : (Boolean) updated.getAttribute(NEED_CLIENT_AUTH); + boolean wantClientCertificate = updated.getAttribute(WANT_CLIENT_AUTH) == null ? false : (Boolean) updated.getAttribute(WANT_CLIENT_AUTH); boolean requiresCertificate = needClientCertificate || wantClientCertificate; boolean usesSsl = updated.getTransports().contains(Transport.SSL); @@ -117,8 +115,5 @@ abstract public class AbstractPortWithAuthProvider implements JmxPort -- cgit v1.2.1