Permalink
Browse files

fixes #1 - changes class loader during initialization of Velocity

  • Loading branch information...
tjuerge committed Jan 1, 2016
1 parent c0b17b4 commit 9cde377f855bdcaa56605f93a78948201e7b0f6d
@@ -62,8 +62,15 @@ public synchronized void init() {
setProperty(RUNTIME_LOG_LOGSYSTEM_CLASS,
NullLogChute.class.getCanonicalName());
// Call super implementation
super.init();
// Call super implementation - Massage TCCL to deal with bug in m2e
// (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=396554)
ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader();
Thread.currentThread().setContextClassLoader(RuntimeInstance.class.getClassLoader());
try {
super.init();
} finally {
Thread.currentThread().setContextClassLoader(oldClassLoader);
}
// Initialize user directives
initializeUserDirectives();

0 comments on commit 9cde377

Please sign in to comment.