View | Details | Raw Unified | Return to bug 53498
Collapse All | Expand All

(-)java/org/apache/catalina/core/ApplicationContext.java (-13 / +6 lines)
Lines 169-175 Link Here
169
    /**
169
    /**
170
     * The merged context initialization parameters for this Context.
170
     * The merged context initialization parameters for this Context.
171
     */
171
     */
172
    private Map<String,String> parameters =
172
    private ConcurrentHashMap<String,String> parameters =
173
        new ConcurrentHashMap<String,String>();
173
        new ConcurrentHashMap<String,String>();
174
174
175
175
Lines 752-770 Link Here
752
    public void removeAttribute(String name) {
752
    public void removeAttribute(String name) {
753
753
754
        Object value = null;
754
        Object value = null;
755
        boolean found = false;
755
        
756
757
        // Remove the specified attribute
756
        // Remove the specified attribute
758
        // Check for read only attribute
757
        // Check for read only attribute
759
        if (readOnlyAttributes.containsKey(name))
758
        if (readOnlyAttributes.containsKey(name))
760
            return;
759
            return;
761
        found = attributes.containsKey(name);
760
        value = attributes.remove(name);
762
        if (found) {
761
        if(value == null)
763
            value = attributes.get(name);
764
            attributes.remove(name);
765
        } else {
766
            return;
762
            return;
767
        }
768
763
769
        // Notify interested application event listeners
764
        // Notify interested application event listeners
770
        Object listeners[] = context.getApplicationEventListeners();
765
        Object listeners[] = context.getApplicationEventListeners();
Lines 1259-1269 Link Here
1259
1254
1260
    @Override
1255
    @Override
1261
    public boolean setInitParameter(String name, String value) {
1256
    public boolean setInitParameter(String name, String value) {
1262
        if (parameters.containsKey(name)) {
1257
        if(parameters.putIfAbsent(name, value) != null)
1263
            return false;
1258
            return false;
1264
        }
1259
1265
        
1266
        parameters.put(name, value);
1267
        return true;
1260
        return true;
1268
    }
1261
    }
1269
    
1262
    
(-)java/org/apache/catalina/ha/context/ReplicatedContext.java (-2 / +3 lines)
Lines 168-175 Link Here
168
        
168
        
169
        @Override
169
        @Override
170
        public Object getAttribute(String name) {
170
        public Object getAttribute(String name) {
171
            if (tomcatAttributes.containsKey(name) )
171
        	Object obj = tomcatAttributes.get(name);
172
                return tomcatAttributes.get(name);
172
            if (obj != null)
173
                return obj;
173
            else 
174
            else 
174
                return super.getAttribute(name);
175
                return super.getAttribute(name);
175
        }
176
        }
(-)java/org/apache/catalina/startup/HostConfig.java (-2 / +2 lines)
Lines 146-152 Link Here
146
    /**
146
    /**
147
     * Map of deployed applications.
147
     * Map of deployed applications.
148
     */
148
     */
149
    protected Map<String, DeployedApplication> deployed =
149
    protected ConcurrentHashMap<String, DeployedApplication> deployed =
150
        new ConcurrentHashMap<String, DeployedApplication>();
150
        new ConcurrentHashMap<String, DeployedApplication>();
151
151
152
    
152
    
Lines 1506-1512 Link Here
1506
        } else {
1506
        } else {
1507
            addWatchedResources(deployedApp, null, context);
1507
            addWatchedResources(deployedApp, null, context);
1508
        }
1508
        }
1509
        deployed.put(contextName, deployedApp);
1509
        deployed.putIfAbsent(contextName, deployedApp);
1510
    }
1510
    }
1511
1511
1512
    /**
1512
    /**

Return to bug 53498