--- a/jdk/src/share/classes/com/sun/security/sasl/ntlm/NTLMServer.java Mon Aug 15 12:56:01 2011 -0700
+++ b/jdk/src/share/classes/com/sun/security/sasl/ntlm/NTLMServer.java Mon Aug 15 11:48:20 2011 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -110,7 +110,8 @@
* @throws SaslException
*/
NTLMServer(String mech, String protocol, String serverName,
- Map props, final CallbackHandler cbh) throws SaslException {
+ Map<String, ?> props, final CallbackHandler cbh)
+ throws SaslException {
this.mech = mech;
String version = null;
@@ -210,12 +211,13 @@
@Override
public Object getNegotiatedProperty(String propName) {
- if (propName.equals(Sasl.QOP)) {
- return "auth";
- } else if (propName.equals(NTLM_HOSTNAME)) {
- return hostname;
- } else {
- return null;
+ switch (propName) {
+ case Sasl.QOP:
+ return "auth";
+ case NTLM_HOSTNAME:
+ return hostname;
+ default:
+ return null;
}
}