Hi Vladimir,
    You've made all the valid points. Thanks for the thoughts.

On Tue, May 30, 2023 at 11:12 AM Vladimir Sitnikov
<sitnikov.vladi...@gmail.com> wrote:

> It would be better to add CI and test the changes **before** releasing the 
> changes.
> CI could help track code coverage, so everybody knows if there is untested 
> code.

I'm not an expert on configuring CI on github's XalanJ project.
Perhaps Gary may look at that aspect, if he thinks that is important
right now to configure.

> Selecting method names, variable names, and class names helps readers to 
> understand the intention behind the code.
> Of course, everybody can reverse-engineer the intention from analyzing the 
> XML contents.
> However, the code with "test1, test2, tets3" methods takes more time to 
> understand than a code with reasonable names.

I agree with you. Hopefully, someone may get time to further refactor
(in a more better way) the test suite codebase, that I've provided.

But I'd wish, if someone may spend enough time to study the logic
within the .xsl files that're provided with this test suite, and point
out the defects, instead of *just/only* looking at method names,
variable names, class names and trying to provide feedback quickly.

> public static void runTransformAndAssertOutput(File xmlFilePath, File 
> xlsFilePath, File goldFilePath) {
>         try {
>            Node xmlDomSource = docBuilder.parse(new InputSource(xmlFilePath));
>
>            Transformer xslTransformer = tfactory.newTransformer(new 
> StreamSource(xslFilePath));
>            StringWriter resultStrWriter = new StringWriter();
>            xslTransformer.transform(new DOMSource(xmlDomSource), new 
> StreamResult(resultStrWriter));
>
>            byte[] goldFileBytes = Files.readAllBytes(Paths.get(goldFilePath));
>
>            Assert.assertEquals(new String(goldFileBytes), 
> resultStrWriter.toString());
>         }
>         catch (Exception ex) {
>             Assert.fail();
>         }
> }

The above code refactoring provided by you is useful. I'll try to
incorporate that, within the junit test suite that I've written.

> Frankly speaking, it is inconvenient to comment on code change in email,
> and it would be way easier to review code if you could create a PR with the 
> changes.
>
> Do you think you could create PRs?

I can do that. But right now, no one other than *myself* is trying to
commit any dev code changes within XalanJ repos. It'd be more useful,
if any of the non XalanJ persons create any of the PRs that XalanJ
committers might review.

You're always, free to review the XalanJ dev codebase changes, and
point out codebase defects, and those shall be considered with
priority.


-- 
Regards,
Mukul Gandhi

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@xalan.apache.org
For additional commands, e-mail: dev-h...@xalan.apache.org

Reply via email to