[ 
http://issues.apache.org/jira/browse/XALANJ-1402?page=comments#action_12356605 
] 

Igor Malinin commented on XALANJ-1402:
--------------------------------------

I can confirm that it is not fixed and still an issue:

Static Encoding._encodings is still initialized based on context classloader;
Contents of static CharInfo.m_getCharInfoCache could be initialized based on 
context classloader too.


Other resource loading seems to be fixed correctly:

The code from OutputProperties has been moved to OutputPropertiesFactory where 
own classloader used;
The code from TransformerFactoryImpl has been moved to FuncSystemProperty where 
it is not in static context anymore.


PS. It is not related to XALANJ-411 in any way, probably wrong reference.


> Incorrect usage of context ClassLoader for static field initialization
> ----------------------------------------------------------------------
>
>          Key: XALANJ-1402
>          URL: http://issues.apache.org/jira/browse/XALANJ-1402
>      Project: XalanJ2
>         Type: Bug
>   Components: Xalan
>     Versions: 2.5
>  Environment: Operating System: All
> Platform: All
>     Reporter: Igor Malinin
>     Assignee: Xalan Developers Mailing List
>     Priority: Critical
>  Attachments: patch-static.txt
>
> Several classes read resources through thread context ClassLoader. When it is
> right thing for factories, it it is definitely not right for static field
> initialization. Due to this it is problematic for me to use Xalan as Eclipse
> plugin. This might be issue in other environments with many ClassLoaders too.
> These two classes should not use context Classloader:
> org.apache.xalan.serialize.Encodings
> org.apache.xalan.templates.OutputProperties
> Instead they should simply read properties from their OWN Classloader as
> org.apache.xalan.serialize.CharInfo does:
> ClassLoader cl = CharInfo.class.getClassLoader();
> There are one more class:
> org.apache.xalan.processor.TransformerFactoryImpl
> It does "System.setProperties(systemProps)" in it's static initialization!
> Actually it does'nt set anything what could be needed except sax-driver (which
> should be defined in META-INF/services by default!), and I think it is 
> something
> from legacy code and must be removed now (to remove possible side effects)...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to