Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 80949 Details for
Bug 207160
Template XML file isn't correctly queried
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
Workaround/patch for this problem
resolveTemplateXMLFileInputStream.txt (text/plain), 1.78 KB, created by
Sinee Paungam
on 2007-10-23 09:30:59 EDT
(
hide
)
Description:
Workaround/patch for this problem
Filename:
MIME Type:
Creator:
Sinee Paungam
Created:
2007-10-23 09:30:59 EDT
Size:
1.78 KB
patch
obsolete
>public InputStream resolveTemplateXMLFileInputStream(final String fileName) { > > InputStream inputStream = null; > > if ((fileName != null) && (fileName.trim().length() > 0)) { > > //because of a bug in resolveTemplateXMLFileInputStream(fileName), the following call will only check > //the EventXMLFileEventFactoryHomeImpl's class loader > inputStream = super.resolveTemplateXMLFileInputStream(fileName); > > try{ > if (inputStream == null){ > > //Catch all exceptions since the current class' (e.g. > // EventXMLFileEventFactoryHomeImpl) > // class loader may be null (e.g. current class was loaded by > // the bootstrap > // class loader) or insufficient security privileges > // for accessing the current class' class loader and we > // will attempt to use the system's class loader. > > > // Consult the system's class loader to find the > // actual local location of the configuration template file > // using privileged security: > inputStream = ((InputStream) (AccessController.doPrivileged(new PrivilegedExceptionAction() { > > public Object run() throws Exception { > return (ClassLoader.getSystemClassLoader().getResourceAsStream(fileName)); > } > }))); > > } > > if (inputStream == null){ > > > // Consult the current thread's context class loader to > // find the actual local location of the configuration > // template file using privileged security: > inputStream = ((InputStream) (AccessController.doPrivileged(new PrivilegedExceptionAction() { > > public Object run() throws Exception { > return (Thread.currentThread().getContextClassLoader().getResourceAsStream(fileName)); > } > }))); > } > } > catch (Throwable t) { > > } > > } > return inputStream; > }
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 Raw
Actions:
View
Attachments on
bug 207160
:
80949
|
81438
|
81439