antisamy icon indicating copy to clipboard operation
antisamy copied to clipboard

Upgrade neko-htmlunit to 4.20.0 with test fix

Open spassarop opened this issue 2 weeks ago • 13 comments

Related to #649

spassarop avatar Dec 06 '25 20:12 spassarop

@davewichers I don't understand the error, never happened to me before. On my local environment it gives the same if I run mvn site.

spassarop avatar Dec 06 '25 20:12 spassarop

@spassarop - I bumped google-java-format to version 1.17.0 (since I have Java 21 installed) and this issue went away, but then it says the method: containsStringIgnoreCase doesn't exist for class: AntiSamyTest. Did you forget to check in that new method? Can you bump google-java-format to version 1.17.0 and see if that works for you, and if so, check in that change along with the 'missing' method? This new format version also reformats the test class file so you have to check in those changes too.

davewichers avatar Dec 08 '25 15:12 davewichers

@spassarop - htmlunit 4.20.0 just came out, but it doesn't change the 'uppercasing' behavior.

davewichers avatar Dec 08 '25 15:12 davewichers

Made the changes and also upgraded to 4.20.0. However, until we don't have an answer for the uppercase behavior this will be on hold.

spassarop avatar Dec 09 '25 00:12 spassarop

@spassarop - OK I tested this on both Windows and Linux and all the tests now pass and mvn site works. I also tested using both Java 17 and Java 21 and both work fine. Can you get in touch with @rbri to try to get our questions answered.

Also, some of your commits are verified but most are not. Can you make sure your git setup is the same on all machines/environments so your commits are all verified? Thx

davewichers avatar Dec 09 '25 14:12 davewichers

Which question? Did i forgot something?

rbri avatar Dec 09 '25 14:12 rbri

@rbri Read the entire thread for PR https://github.com/nahsra/antisamy/pull/649. Our questions to you are in that thread. Thx

davewichers avatar Dec 09 '25 14:12 davewichers

@rbri & @davewichers - I think @rbri is having difficultly finding it because most of those comments are from PR #649, not this PR.

Specifically, I think Dave is referring to the questions I asked about the impact on xHTML that are discussed in https://github.com/nahsra/antisamy/pull/649#issuecomment-3621141703 and https://github.com/nahsra/antisamy/pull/649#issuecomment-3627280584. Thanks.

kwwall avatar Dec 09 '25 21:12 kwwall

I guess i know what happens here, will work on that and propose possible solutions.

rbri avatar Dec 10 '25 11:12 rbri

@spassarop @davewichers i think this was really a bug. Hopefully the behaviour is not fixed and also a bit more documented. (https://github.com/HtmlUnit/htmlunit-neko?tab=readme-ov-file#tag-case-handling)

Please try the 4.20.1-SNAPSHOT build and give me a sign if your are happy with this. Will do a release 4.20.1 for you.

rbri avatar Dec 12 '25 13:12 rbri

@kwwall - Thanks for pointing out the upper vs. lowercase issue for xHTML. @spassarop - Let me know how your testing goes with this 'fixed'' snapshot. And if it fixes things then I think we can revert our code/test changes and simply upgrade to the version of htmlunit-neko. We also need to upgrade our formatting library config so they work with Java 17/21, but that's a separate issue.

davewichers avatar Dec 12 '25 14:12 davewichers

I will do the test on Sunday, I won’t have access to my testing environment before that. I’ll tell you by then.

Il giorno ven 12 dic 2025 alle 11:27 Dave Wichers @.***> ha scritto:

davewichers left a comment (nahsra/antisamy#656) https://github.com/nahsra/antisamy/pull/656#issuecomment-3646694398

@kwwall https://github.com/kwwall - Thanks for pointing out the upper vs. lowercase issue for xHTML. @spassarop https://github.com/spassarop

  • Let me know how your testing goes with this 'fixed'' snapshot. And if it fixes things then I think we can revert our code/test changes and simply upgrade to the version of htmlunit-neko. We also need to upgrade our formatting library config so they work with Java 17/21, but that's a separate issue.

— Reply to this email directly, view it on GitHub https://github.com/nahsra/antisamy/pull/656#issuecomment-3646694398, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHL3BMJLTXSPVLO4HTCVTWD4BLGFTAVCNFSM6AAAAACOIEVBFGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTMNBWGY4TIMZZHA . You are receiving this because you were mentioned.Message ID: @.***>

spassarop avatar Dec 12 '25 14:12 spassarop

@spassarop - no problem. Thanks!

davewichers avatar Dec 12 '25 14:12 davewichers

@rbri I tried referencing the snapshot but my device cannot find it. This is my snapshot repository:

<snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        ```

spassarop avatar Dec 14 '25 20:12 spassarop

@spassarop yes, the sonatype folks have changed there infrastructure, find the current details here https://github.com/HtmlUnit/htmlunit-neko#maven-1

rbri avatar Dec 14 '25 21:12 rbri

Thanks @rbri, the snapshot is fine with all tests. @davewichers, I think the best is to just bump the new version when Ronald releases it and discard this PR. No code changes are needed after that.

spassarop avatar Dec 15 '25 03:12 spassarop

4.20.1 is released (https://github.com/HtmlUnit/htmlunit-neko/releases)

rbri avatar Dec 15 '25 17:12 rbri

Closing as upgraded to 4.20.1 by hand. @rbri - thanks for fixing and pushing a new release!

davewichers avatar Dec 15 '25 18:12 davewichers