@@ -155,10 +155,10 @@ public class MessageContext extends AbstractContext
155155 /**
156156 * A place to store the current MessageContext
157157 */
158- public static ThreadLocal <MessageContext > currentMessageContext = new ThreadLocal <MessageContext >();
158+ public static ThreadLocal <MessageContext > currentMessageContext = new ThreadLocal <>();
159159
160160 public static MessageContext getCurrentMessageContext () {
161- return ( MessageContext ) currentMessageContext .get ();
161+ return currentMessageContext .get ();
162162 }
163163
164164 public static void destroyCurrentMessageContext () {
@@ -655,7 +655,7 @@ public ArrayList<Handler> getExecutionChain() {
655655 */
656656 public void addExecutedPhase (Handler phase ) {
657657 if (executedPhases == null ) {
658- executedPhases = new LinkedList <Handler >();
658+ executedPhases = new LinkedList <>();
659659 }
660660 executedPhases .addFirst (phase );
661661 }
@@ -679,7 +679,7 @@ public Iterator<Handler> getExecutedPhases() {
679679 checkActivateWarning ("getExecutedPhases" );
680680 }
681681 if (executedPhases == null ) {
682- executedPhases = new LinkedList <Handler >();
682+ executedPhases = new LinkedList <>();
683683 }
684684 return executedPhases .iterator ();
685685 }
@@ -692,7 +692,7 @@ public Iterator<Handler> getExecutedPhases() {
692692 */
693693 public void resetExecutedPhases () {
694694 executedPhasesReset = true ;
695- executedPhases = new LinkedList <Handler >();
695+ executedPhases = new LinkedList <>();
696696 }
697697
698698 /**
@@ -1013,8 +1013,9 @@ public boolean isPropertyTrue(String name, boolean defaultVal) {
10131013 * @return An unmodifiable map containing the combination of all available
10141014 * properties or an empty map.
10151015 */
1016+ @ Deprecated
10161017 public Map <String , Object > getProperties () {
1017- final Map <String , Object > resultMap = new HashMap <String , Object >();
1018+ final Map <String , Object > resultMap = new HashMap <>();
10181019
10191020 // My own context hierarchy may not all be present. So look for whatever
10201021 // nearest level is present and add the properties
@@ -1610,7 +1611,7 @@ public Policy getEffectivePolicy() {
16101611 return axisMessage .getEffectivePolicy ();
16111612 } else {
16121613 if (axisService != null ){
1613- Collection <PolicyComponent > policyList = new ArrayList <PolicyComponent >();
1614+ Collection <PolicyComponent > policyList = new ArrayList <>();
16141615 policyList .addAll (axisService .getPolicySubject ().getAttachedPolicyComponents ());
16151616 AxisConfiguration axisConfiguration = axisService .getAxisConfiguration ();
16161617 policyList .addAll (axisConfiguration .getPolicySubject ().getAttachedPolicyComponents ());
@@ -1729,6 +1730,7 @@ public boolean isEngaged(String moduleName) {
17291730 * @return boolean
17301731 * @deprecated The bonus you used to get from this is now built in to SOAPEnvelope.getHeader()
17311732 */
1733+ @ Deprecated
17321734 public boolean isHeaderPresent () {
17331735 // If there's no envelope there can't be a header.
17341736 if (this .envelope == null ) {
@@ -1849,9 +1851,9 @@ public void removeAttachment(String contentID) {
18491851 * @param key The key
18501852 * @return A string key
18511853 */
1852- private String generateSelfManagedDataKey (Class clazz , Object key ) {
1854+ private String generateSelfManagedDataKey (Class <?> clazz , Object key ) {
18531855 return clazz .getName () + selfManagedDataDelimiter + key .toString () +
1854- selfManagedDataDelimiter + Integer . toString ( key .hashCode () );
1856+ selfManagedDataDelimiter + key .hashCode ();
18551857 }
18561858
18571859 /**
@@ -1865,9 +1867,9 @@ private String generateSelfManagedDataKey(Class clazz, Object key) {
18651867 * @param key The key for this data object
18661868 * @param value The data object
18671869 */
1868- public void setSelfManagedData (Class clazz , Object key , Object value ) {
1870+ public void setSelfManagedData (Class <?> clazz , Object key , Object value ) {
18691871 if (selfManagedDataMap == null ) {
1870- selfManagedDataMap = new LinkedHashMap <String , Object >();
1872+ selfManagedDataMap = new LinkedHashMap <>();
18711873 }
18721874
18731875 // make sure we have a unique key and a delimiter so we can
@@ -1882,7 +1884,7 @@ public void setSelfManagedData(Class clazz, Object key, Object value) {
18821884 * @param key The key for the data
18831885 * @return The data object associated with the key, or NULL if not found
18841886 */
1885- public Object getSelfManagedData (Class clazz , Object key ) {
1887+ public Object getSelfManagedData (Class <?> clazz , Object key ) {
18861888 if (selfManagedDataMap != null ) {
18871889 return selfManagedDataMap .get (generateSelfManagedDataKey (clazz , key ));
18881890 }
@@ -1896,7 +1898,7 @@ public Object getSelfManagedData(Class clazz, Object key) {
18961898 * @param key The key to look for
18971899 * @return TRUE if the key exists, FALSE otherwise
18981900 */
1899- public boolean containsSelfManagedDataKey (Class clazz , Object key ) {
1901+ public boolean containsSelfManagedDataKey (Class <?> clazz , Object key ) {
19001902 if (selfManagedDataMap == null ) {
19011903 return false ;
19021904 }
@@ -1910,7 +1912,7 @@ public boolean containsSelfManagedDataKey(Class clazz, Object key) {
19101912 * @param clazz The class of the caller that owns the key-value pair
19111913 * @param key The key of the object to be removed
19121914 */
1913- public void removeSelfManagedData (Class clazz , Object key ) {
1915+ public void removeSelfManagedData (Class <?> clazz , Object key ) {
19141916 if (selfManagedDataMap != null ) {
19151917 selfManagedDataMap .remove (generateSelfManagedDataKey (clazz , key ));
19161918 }
@@ -1926,12 +1928,12 @@ public void removeSelfManagedData(Class clazz, Object key) {
19261928 private ArrayList <Handler > flattenPhaseListToHandlers (ArrayList <Handler > list , LinkedHashMap <String , Handler > map ) {
19271929
19281930 if (map == null ) {
1929- map = new LinkedHashMap <String , Handler >();
1931+ map = new LinkedHashMap <>();
19301932 }
19311933
19321934 Iterator <Handler > it = list .iterator ();
19331935 while (it .hasNext ()) {
1934- Handler handler = ( Handler ) it .next ();
1936+ Handler handler = it .next ();
19351937
19361938 String key = null ;
19371939 if (handler != null ) {
@@ -1952,15 +1954,15 @@ private ArrayList<Handler> flattenPhaseListToHandlers(ArrayList<Handler> list, L
19521954 Iterator <String > it2 = map .keySet ().iterator ();
19531955 while (it2 .hasNext ()) {
19541956 Object key = it2 .next ();
1955- Handler value = ( Handler ) map .get (key );
1957+ Handler value = map .get (key );
19561958 String name = value .getName ();
19571959 log .trace (getLogIDString () + ":flattenPhaseListToHandlers(): key [" + key +
19581960 "] handler name [" + name + "]" );
19591961 }
19601962 }
19611963
19621964
1963- return new ArrayList <Handler >(map .values ());
1965+ return new ArrayList <>(map .values ());
19641966 }
19651967
19661968
@@ -1975,12 +1977,12 @@ private ArrayList<Handler> flattenPhaseListToHandlers(ArrayList<Handler> list, L
19751977 private ArrayList <Handler > flattenHandlerList (List <Handler > list , LinkedHashMap <String , Handler > map ) {
19761978
19771979 if (map == null ) {
1978- map = new LinkedHashMap <String , Handler >();
1980+ map = new LinkedHashMap <>();
19791981 }
19801982
19811983 Iterator <Handler > it = list .iterator ();
19821984 while (it .hasNext ()) {
1983- Handler handler = ( Handler ) it .next ();
1985+ Handler handler = it .next ();
19841986
19851987 String key = null ;
19861988 if (handler != null ) {
@@ -2000,7 +2002,7 @@ private ArrayList<Handler> flattenHandlerList(List<Handler> list, LinkedHashMap<
20002002 }
20012003 }
20022004
2003- return new ArrayList <Handler >(map .values ());
2005+ return new ArrayList <>(map .values ());
20042006 }
20052007
20062008
@@ -2076,12 +2078,12 @@ private void serializeSelfManagedData(ObjectOutput out) {
20762078 * @return ArrayList
20772079 */
20782080 private ArrayList <SelfManagedDataHolder > serializeSelfManagedDataHelper (ArrayList <Handler > handlers ) {
2079- ArrayList <SelfManagedDataHolder > selfManagedDataHolderList = new ArrayList <SelfManagedDataHolder >();
2081+ ArrayList <SelfManagedDataHolder > selfManagedDataHolderList = new ArrayList <>();
20802082 Iterator <Handler > it = handlers .iterator ();
20812083
20822084 try {
20832085 while (it .hasNext ()) {
2084- Handler handler = ( Handler ) it .next ();
2086+ Handler handler = it .next ();
20852087
20862088 //if (handler instanceof Phase)
20872089 //{
@@ -2156,7 +2158,7 @@ private SelfManagedDataManager deserialize_getHandlerFromExecutionChain(Iterator
21562158
21572159 try {
21582160 while ((it .hasNext ()) && (handler_toreturn == null )) {
2159- Handler handler = ( Handler ) it .next ();
2161+ Handler handler = it .next ();
21602162
21612163 if (handler instanceof Phase ) {
21622164 handler_toreturn = deserialize_getHandlerFromExecutionChain (
@@ -3410,7 +3412,7 @@ public void readExternal(ObjectInput inObject) throws IOException, ClassNotFound
34103412 log .trace (getLogIDString () +
34113413 ": readExternal(): About to read properties, marker is: " + marker );
34123414 }
3413- properties = in .readMap (new HashMap ());
3415+ properties = in .readMap (new HashMap <> ());
34143416
34153417
34163418 //---------------------------------------------------------
@@ -3687,7 +3689,7 @@ public void activate(ConfigurationContext cc) {
36873689 }
36883690
36893691 if (executedPhases == null ) {
3690- executedPhases = new LinkedList <Handler >();
3692+ executedPhases = new LinkedList <>();
36913693 }
36923694
36933695
@@ -3915,7 +3917,7 @@ public void activateWithOperationContext(OperationContext operationCtx) {
39153917 }
39163918
39173919 if (executedPhases == null ) {
3918- executedPhases = new LinkedList <Handler >();
3920+ executedPhases = new LinkedList <>();
39193921 }
39203922
39213923 //-------------------------------------------------------
@@ -3936,7 +3938,7 @@ public void activateWithOperationContext(OperationContext operationCtx) {
39363938 private ArrayList <Handler > restoreHandlerList (ArrayList <MetaDataEntry > metaDataEntries ) {
39373939 AxisConfiguration axisConfig = configurationContext .getAxisConfiguration ();
39383940
3939- List <Handler > existingHandlers = new ArrayList <Handler >();
3941+ List <Handler > existingHandlers = new ArrayList <>();
39403942
39413943 // TODO: I'm using clone for the ArrayList returned from axisConfig object.
39423944 // Does it do a deep clone of the Handlers held there? Does it matter?
@@ -3960,11 +3962,11 @@ private ArrayList<Handler> restoreHandlerList(ArrayList<MetaDataEntry> metaDataE
39603962
39613963 existingHandlers = flattenHandlerList (existingHandlers , null );
39623964
3963- ArrayList <Handler > handlerListToReturn = new ArrayList <Handler >();
3965+ ArrayList <Handler > handlerListToReturn = new ArrayList <>();
39643966
39653967 for (int i = 0 ; i < metaDataEntries .size (); i ++) {
39663968 Handler handler = (Handler ) ActivateUtils
3967- .findHandler (existingHandlers , ( MetaDataEntry ) metaDataEntries .get (i ));
3969+ .findHandler (existingHandlers , metaDataEntries .get (i ));
39683970
39693971 if (handler != null ) {
39703972 handlerListToReturn .add (handler );
@@ -3992,7 +3994,7 @@ private LinkedList<Handler> restoreExecutedList(LinkedList<Handler> base, Linked
39923994
39933995 // get a list of existing handler/phase objects for the restored objects
39943996
3995- ArrayList <MetaDataEntry > tmpMetaDataList = new ArrayList <MetaDataEntry >(metaDataEntries );
3997+ ArrayList <MetaDataEntry > tmpMetaDataList = new ArrayList <>(metaDataEntries );
39963998
39973999 ArrayList <Handler > existingList = restoreHandlerList (tmpMetaDataList );
39984000
@@ -4002,7 +4004,7 @@ private LinkedList<Handler> restoreExecutedList(LinkedList<Handler> base, Linked
40024004
40034005 // set up a list to return
40044006
4005- LinkedList <Handler > returnedList = new LinkedList <Handler >();
4007+ LinkedList <Handler > returnedList = new LinkedList <>();
40064008
40074009 if (base != null ) {
40084010 returnedList .addAll (base );
0 commit comments