ASF Bugzilla – Attachment 30387 Details for
Bug 55052
[JULI] Make ClassLoaderLogManager.getProperty() to try unprefixed property if prefixed one does not exist
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
2013-06-04_tc6_55052.patch
2013-06-04_tc6_55052.patch (text/plain), 1.82 KB, created by
Konstantin Kolinko
on 2013-06-04 17:05:19 UTC
(
hide
)
Description:
2013-06-04_tc6_55052.patch
Filename:
MIME Type:
Creator:
Konstantin Kolinko
Created:
2013-06-04 17:05:19 UTC
Size:
1.82 KB
patch
obsolete
>Index: java/org/apache/juli/ClassLoaderLogManager.java >=================================================================== >--- java/org/apache/juli/ClassLoaderLogManager.java (revision 1489499) >+++ java/org/apache/juli/ClassLoaderLogManager.java (working copy) >@@ -243,12 +243,31 @@ > * @param name The property name > */ > public String getProperty(String name) { >- ClassLoader classLoader = Thread.currentThread() >- .getContextClassLoader(); > String prefix = this.prefix.get(); >+ String result = null; >+ >+ // If a prefix is defined look for a prefixed property first > if (prefix != null) { >- name = prefix + name; >+ result = findProperty(prefix + name); > } >+ >+ // If there is no prefix or no property match with the prefix try just >+ // the name >+ if (result == null) { >+ result = findProperty(name); >+ } >+ >+ // Simple property replacement (mostly for folder names) >+ if (result != null) { >+ result = replace(result); >+ } >+ return result; >+ } >+ >+ >+ private String findProperty(String name) { >+ ClassLoader classLoader = Thread.currentThread() >+ .getContextClassLoader(); > ClassLoaderLogInfo info = getClassLoaderInfo(classLoader); > String result = info.props.getProperty(name); > // If the property was not found, and the current classloader had no >@@ -270,14 +289,9 @@ > result = super.getProperty(name); > } > } >- // Simple property replacement (mostly for folder names) >- if (result != null) { >- result = replace(result); >- } > return result; > } >- >- >+ > public void readConfiguration() > throws IOException, SecurityException { >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 55052
: 30387