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

(-)java/org/apache/juli/ClassLoaderLogManager.java (-9 / +23 lines)
Lines 243-254 Link Here
243
     * @param name The property name
243
     * @param name The property name
244
     */    
244
     */    
245
    public String getProperty(String name) {
245
    public String getProperty(String name) {
246
        ClassLoader classLoader = Thread.currentThread()
247
            .getContextClassLoader();
248
        String prefix = this.prefix.get();
246
        String prefix = this.prefix.get();
247
        String result = null;
248
249
        // If a prefix is defined look for a prefixed property first
249
        if (prefix != null) {
250
        if (prefix != null) {
250
            name = prefix + name;
251
            result = findProperty(prefix + name);
251
        }
252
        }
253
254
        // If there is no prefix or no property match with the prefix try just
255
        // the name
256
        if (result == null) {
257
            result = findProperty(name);
258
        }
259
260
        // Simple property replacement (mostly for folder names)
261
        if (result != null) {
262
            result = replace(result);
263
        }
264
        return result;
265
    }
266
267
268
    private String findProperty(String name) {
269
        ClassLoader classLoader = Thread.currentThread()
270
                .getContextClassLoader();
252
        ClassLoaderLogInfo info = getClassLoaderInfo(classLoader);
271
        ClassLoaderLogInfo info = getClassLoaderInfo(classLoader);
253
        String result = info.props.getProperty(name);
272
        String result = info.props.getProperty(name);
254
        // If the property was not found, and the current classloader had no 
273
        // If the property was not found, and the current classloader had no 
Lines 270-283 Link Here
270
                result = super.getProperty(name);
289
                result = super.getProperty(name);
271
            }
290
            }
272
        }
291
        }
273
        // Simple property replacement (mostly for folder names)
274
        if (result != null) {
275
            result = replace(result);
276
        }
277
        return result;
292
        return result;
278
    }
293
    }
279
    
294
280
    
281
    public void readConfiguration()
295
    public void readConfiguration()
282
        throws IOException, SecurityException {
296
        throws IOException, SecurityException {
283
        
297
        

Return to bug 55052