src/share/jaxws_classes/com/sun/xml/internal/ws/server/EndpointMessageContextImpl.java

changeset 368
0989ad8c0860
parent 286
f50545b5e2f1
child 637
9c07ef4934dd
equal deleted inserted replaced
366:8c0b6bccfe47 368:0989ad8c0860
1 /* 1 /*
2 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this 7 * published by the Free Software Foundation. Oracle designates this
49 * try to avoid that as much as possible. 49 * try to avoid that as much as possible.
50 * 50 *
51 * 51 *
52 * @author Jitendra Kotamraju 52 * @author Jitendra Kotamraju
53 */ 53 */
54 @SuppressWarnings({"SuspiciousMethodCalls"})
55 public final class EndpointMessageContextImpl extends AbstractMap<String,Object> implements MessageContext { 54 public final class EndpointMessageContextImpl extends AbstractMap<String,Object> implements MessageContext {
56 55
57 /** 56 /**
58 * Lazily computed. 57 * Lazily computed.
59 */ 58 */
67 public EndpointMessageContextImpl(Packet packet) { 66 public EndpointMessageContextImpl(Packet packet) {
68 this.packet = packet; 67 this.packet = packet;
69 } 68 }
70 69
71 @Override 70 @Override
71 @SuppressWarnings("element-type-mismatch")
72 public Object get(Object key) { 72 public Object get(Object key) {
73 if (packet.supports(key)) { 73 if (packet.supports(key)) {
74 return packet.get(key); // strongly typed 74 return packet.get(key); // strongly typed
75 } 75 }
76 if (packet.getHandlerScopePropertyNames(true).contains(key)) { 76 if (packet.getHandlerScopePropertyNames(true).contains(key)) {
111 packet.invocationProperties.put(key, value); 111 packet.invocationProperties.put(key, value);
112 return null; 112 return null;
113 } 113 }
114 114
115 @Override 115 @Override
116 @SuppressWarnings("element-type-mismatch")
116 public Object remove(Object key) { 117 public Object remove(Object key) {
117 if (packet.supports(key)) { 118 if (packet.supports(key)) {
118 return packet.remove(key); 119 return packet.remove(key);
119 } 120 }
120 Object old = packet.invocationProperties.get(key); 121 Object old = packet.invocationProperties.get(key);

mercurial