[ 
https://issues.apache.org/jira/browse/TOMEE-2838?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17132820#comment-17132820
 ] 

Thiago Henrique Hupner commented on TOMEE-2838:
-----------------------------------------------

Look all the usage of the "javax.xml." is safe. It is to verify if it a class 
from 'javax.xml.stream' (not sure, but the it is in the comment) .

As I can tell, it is used to verifiy is the class is assignable from one of 
these: 

 
|javax.xml.namespace.QName|
|javax.xml.datatype.XMLGregorianCalendar|
|javax.xml.datatype.Duration|

The private static final field that contains the _javax.xml._ string:

[https://github.com/FasterXML/jackson-databind/blob/master/src/main/java/com/fasterxml/jackson/databind/ext/OptionalHandlerFactory.java#L23]

 

[https://github.com/FasterXML/jackson-databind/blob/master/src/main/java/com/fasterxml/jackson/databind/ext/OptionalHandlerFactory.java#L49]

 

[https://github.com/FasterXML/jackson-databind/blob/master/src/main/java/com/fasterxml/jackson/databind/ext/OptionalHandlerFactory.java#L72]

 

[https://github.com/FasterXML/jackson-databind/blob/master/src/main/java/com/fasterxml/jackson/databind/ext/OptionalHandlerFactory.java#L88]

 

 

> Jackson uses "javax.xml."
> -------------------------
>
>                 Key: TOMEE-2838
>                 URL: https://issues.apache.org/jira/browse/TOMEE-2838
>             Project: TomEE
>          Issue Type: Sub-task
>            Reporter: David Blevins
>            Priority: Major
>
> In Jakarta EE 9 all the APIs have been repackaged from javax to jakarta.  For 
> example `javax.servlet.http.HttpServlet` becomes 
> `jakarta.servlet.http.HttpServlet`
>  
> We're using tooling to perform bytecode transformation on all the jars and 
> classes in TomEE 8 so that we can create a distribution of TomEE that can be 
> made both Jakarta EE 8 and Jakarta EE 9 compliant.  When the references are 
> classes, it's very easy.  When the references are strings, it's harder as you 
> have to look at the code and see what it is doing with the string and if its 
> logic will still work or if it needs to be adjusted.
>  
> In various versions of Jackson there seems to be a part of the code using the 
> string "javax.xml."  We need to investigate to figure out what it might be 
> trying to learn or do with that string.
> *Uses spotted in bytecode*
> |{{methodVisitor.visitLdcInsn("javax.xml.");}}|[com/fasterxml/jackson/databind/ext/OptionalHandlerFactory:117|https://github.com/dblevins/tomee-analysis/blob/master/apache-tomee-microprofile-8.0.3-SNAPSHOT.zip/apache-tomee-microprofile-8.0.3-SNAPSHOT/lib/jackson-databind-2.10.0.jar/com/fasterxml/jackson/databind/ext/OptionalHandlerFactory-asmified.java#L117]|
> |{{methodVisitor.visitLdcInsn("javax.xml.");}}|[com/fasterxml/jackson/databind/ext/OptionalHandlerFactory:123|https://github.com/dblevins/tomee-analysis/blob/master/apache-tomee-microprofile-8.0.3-SNAPSHOT.zip/apache-tomee-microprofile-8.0.3-SNAPSHOT/lib/jackson-databind-2.10.0.jar/com/fasterxml/jackson/databind/ext/OptionalHandlerFactory-asmified.java#L123]|
> |{{methodVisitor.visitLdcInsn("javax.xml.");}}|[com/fasterxml/jackson/databind/ext/OptionalHandlerFactory:211|https://github.com/dblevins/tomee-analysis/blob/master/apache-tomee-microprofile-8.0.3-SNAPSHOT.zip/apache-tomee-microprofile-8.0.3-SNAPSHOT/lib/jackson-databind-2.10.0.jar/com/fasterxml/jackson/databind/ext/OptionalHandlerFactory-asmified.java#L211]|
> |{{methodVisitor.visitLdcInsn("javax.xml.");}}|[com/fasterxml/jackson/databind/ext/OptionalHandlerFactory:217|https://github.com/dblevins/tomee-analysis/blob/master/apache-tomee-microprofile-8.0.3-SNAPSHOT.zip/apache-tomee-microprofile-8.0.3-SNAPSHOT/lib/jackson-databind-2.10.0.jar/com/fasterxml/jackson/databind/ext/OptionalHandlerFactory-asmified.java#L217]|
> The most sane way to investigate would probably be to download the source 
> code for Jackson and look into the OptionalHandlerFactory class.  We should 
> make sure to get the source code for the version of Jackson that is in TomEE 
> 8.0.3-SNAPSHOT.
>  
> If the code is attempting to "see" or "act on" these subpackages of 
> javax.xml. then the code will be *broken* by the change to `jakarta.xml.` and 
> will need to be updated
> *Unsafe `javax.xml.` references*
>  * javax.xml.bind
>  * javax.xml.soap
>  * javax.xml.ws
>  
> If the code is attempting to "see" or "act on" these subpackages of 
> javax.xml. then the code will be *safe* by the change to `jakarta.xml.` and 
> will *not* need to be updated
>  *Safe `javax.xml.` references*
>  * javax.xml.stream
>  * javax.xml.validation
>  * javax.xml.transform
>  * javax.xml.stream
>  * javax.xml.namespace
>  * javax.xml.datatype
>  * javax.xml.parsers
>  * javax.xml.crypto
>  * javax.xml.xpath
>  * javax.xml.access
>  * javax.xml.rpc
>  
> If it is a mix of the two, then it's still broken and we'll have to try and 
> figure out how to fix it.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to