--- old/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyMapUtil.java 2014-03-04 17:55:43.000000000 +0100 +++ new/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyMapUtil.java 2014-03-04 17:55:43.000000000 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2014, 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 @@ -34,6 +34,7 @@ import java.util.Collection; import java.util.HashMap; import java.util.LinkedList; +import java.util.Map.Entry; import javax.xml.namespace.QName; /** @@ -102,17 +103,17 @@ } final PolicyMapKeyConverter converter = new PolicyMapKeyConverter(serviceName, portName); - for (WsdlBindingSubject wsdlSubject : subjectToPolicies.keySet()) { - final PolicySubject newSubject = new PolicySubject(wsdlSubject, subjectToPolicies.get(wsdlSubject)); + for (Entry> entry : subjectToPolicies.entrySet()) { + WsdlBindingSubject wsdlSubject = entry.getKey(); + Collection policySet = entry.getValue(); + final PolicySubject newSubject = new PolicySubject(wsdlSubject, policySet); PolicyMapKey mapKey = converter.getPolicyMapKey(wsdlSubject); if (wsdlSubject.isBindingSubject()) { policyMap.putSubject(ScopeType.ENDPOINT, mapKey, newSubject); - } - else if (wsdlSubject.isBindingOperationSubject()) { + } else if (wsdlSubject.isBindingOperationSubject()) { policyMap.putSubject(ScopeType.OPERATION, mapKey, newSubject); - } - else if (wsdlSubject.isBindingMessageSubject()) { + } else if (wsdlSubject.isBindingMessageSubject()) { switch (wsdlSubject.getMessageType()) { case INPUT: policyMap.putSubject(ScopeType.INPUT_MESSAGE, mapKey, newSubject); @@ -123,6 +124,8 @@ case FAULT: policyMap.putSubject(ScopeType.FAULT_MESSAGE, mapKey, newSubject); break; + default: + break; } } }