RFR: 8374754: jtreg failure handler - replace inline javascript and inline event handlers with same origin javascript files [v2]

Daniel Jeliński djelinski at openjdk.org
Thu Jan 8 07:40:30 UTC 2026


On Thu, 8 Jan 2026 07:25:03 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:

>> test/failure_handler/src/share/classes/jdk/test/failurehandler/HtmlPage.java line 96:
>> 
>>> 94:         }
>>> 95:         final String content = """
>>> 96:                 function doShow(e) {
>> 
>> Would it be possible to check in the css/js files to the repository instead of generating them on the fly?
>
> Hello Daniel, that's possible to do. These files would then need to be looked up (ClassLoader.getResourceAsStream(...)) and then copied over to the relevant runtime `dir`(s) as and when needed by the failure handler. So there will still be a step of copying these files.
> 
> It does prevent the inline js/css text we have in these java source files. Is that inline script/css content you suggest we avoid (for better error detection and code completion in IDEs)?

Yes. Having the js and css in separate files has several advantages: you can find the files using their file names, you have IDE support when editing, and if you fix a bug directly in the generated js file, you can copy the entire file instead of copying its contents back to the generator.

Not a blocker for this PR anyway; I don't expect anyone to work on these files anytime soon.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/29106#discussion_r2671229107


More information about the build-dev mailing list