You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by Shivani Karol via j-users <j-...@xalan.apache.org> on 2023/12/20 12:42:22 UTC

Query regarding tranform function in TransformerIdentityImpl resetting content handler

Hi,



In the commit: https://github.com/apache/xalan-java/commit/b03ee965878f7cc62d4ae8a8d9dd0a28acf01fab

changes were made to reset the content handler to the old content handler after doing the parse operation while earlier the ContentHandler was set to TransformerIdentityImpl permanently in the tranform(Source, Result) function, this is because the setting old content handler is being done in the finally block.

I am getting a null pointer exception for content handler now as it was automatically set to Tansformer IdentityImpl.

Is this intended behaviour? If not please provide a new release with the fix.

Bug is raised too - XALANJ-2720<https://issues.apache.org/jira/browse/XALANJ-2720>

Awaiting your inputs.

Thanks
Shivani Karol
9968283306


Re: Query regarding tranform function in TransformerIdentityImpl resetting content handler

Posted by Mukul Gandhi <mu...@apache.org>.
Hi Shivani,
   Within the zip archive you've shared, I'm able to see following files,

1) XFDFSample.java
2) test.pdf
3) test.xfdf (this is an XML document)

The Java program XFDFSample.java seems to be attempting to read/write
the files test.pdf and test.xfdf.

I'm not able to see anywhere within these attached files, where and
how XalanJ is been used. I'm not able to
see, any XSLT or XPath being used within these attached files.

It'll be useful for people on this list, to get more details about
this bug report, to try helping with this
problem.

On Fri, Jan 5, 2024 at 3:25 PM Shivani Karol via j-users
<j-...@xalan.apache.org> wrote:
>
> Hi Joseph,
>
> Attaching sample.
>
> Thanks
>
> Shivani Karol


-- 
Regards,
Mukul Gandhi

RE: Query regarding tranform function in TransformerIdentityImpl resetting content handler

Posted by Shivani Karol via j-users <j-...@xalan.apache.org>.
Hi Joseph,
Attaching sample.
Thanks
Shivani Karol
From: Joseph Kesselman <ke...@alum.mit.edu>
Sent: Wednesday, December 20, 2023 8:36 PM
To: Shivani Karol <ka...@adobe.com>; j-users@xalan.apache.org
Subject: Re: Query regarding tranform function in TransformerIdentityImpl resetting content handler


EXTERNAL: Use caution when clicking on links or opening attachments.


Please attach a sample to the Jira report which provokes the exception when run. It's really hard to diagnose bug reports without one.

--
   /_  Joe Kesselman (he/him/his)
-/ _) My Alexa skill for New Music/New Sounds fans:
   /   https://www.amazon.com/dp/B09WJ3H657/

Caveat: Opinionated old geezer with overcompensated writer's block. May be redundant, verbose, prolix, sesquipedalian, didactic, officious, or redundant.
________________________________
From: Shivani Karol via j-users <j-...@xalan.apache.org>>
Sent: Wednesday, December 20, 2023 7:42:22 AM
To: j-users@xalan.apache.org<ma...@xalan.apache.org> <j-...@xalan.apache.org>>
Subject: Query regarding tranform function in TransformerIdentityImpl resetting content handler


Hi,



In the commit: https://github.com/apache/xalan-java/commit/b03ee965878f7cc62d4ae8a8d9dd0a28acf01fab

changes were made to reset the content handler to the old content handler after doing the parse operation while earlier the ContentHandler was set to TransformerIdentityImpl permanently in the tranform(Source, Result) function, this is because the setting old content handler is being done in the finally block.

I am getting a null pointer exception for content handler now as it was automatically set to Tansformer IdentityImpl.

Is this intended behaviour? If not please provide a new release with the fix.



Bug is raised too - XALANJ-2720<https://issues.apache.org/jira/browse/XALANJ-2720>

Awaiting your inputs.



Thanks

Shivani Karol

9968283306



Re: Query regarding tranform function in TransformerIdentityImpl resetting content handler

Posted by Joseph Kesselman <ke...@alum.mit.edu>.
Please attach a sample to the Jira report which provokes the exception when run. It's really hard to diagnose bug reports without one.

--
   /_  Joe Kesselman (he/him/his)
-/ _) My Alexa skill for New Music/New Sounds fans:
   /   https://www.amazon.com/dp/B09WJ3H657/

Caveat: Opinionated old geezer with overcompensated writer's block. May be redundant, verbose, prolix, sesquipedalian, didactic, officious, or redundant.
________________________________
From: Shivani Karol via j-users <j-...@xalan.apache.org>
Sent: Wednesday, December 20, 2023 7:42:22 AM
To: j-users@xalan.apache.org <j-...@xalan.apache.org>
Subject: Query regarding tranform function in TransformerIdentityImpl resetting content handler


Hi,



In the commit: https://github.com/apache/xalan-java/commit/b03ee965878f7cc62d4ae8a8d9dd0a28acf01fab

changes were made to reset the content handler to the old content handler after doing the parse operation while earlier the ContentHandler was set to TransformerIdentityImpl permanently in the tranform(Source, Result) function, this is because the setting old content handler is being done in the finally block.

I am getting a null pointer exception for content handler now as it was automatically set to Tansformer IdentityImpl.

Is this intended behaviour? If not please provide a new release with the fix.



Bug is raised too - XALANJ-2720<https://issues.apache.org/jira/browse/XALANJ-2720>

Awaiting your inputs.



Thanks

Shivani Karol

9968283306