RFR: 8265909 : build.tools.dtdbuilder.DTDBuilder.java failed detecting missing path of dtd_home
Erik Joelsson
erikj at openjdk.java.net
Tue Jun 8 12:40:18 UTC 2021
On Thu, 22 Apr 2021 13:47:03 GMT, ScientificWare <github.com+19194678+scientificware at openjdk.org> wrote:
> This concerns [dtdbuilder tools](https://github.com/openjdk/jdk/tree/master/make/jdk/src/classes/build/tools/dtdbuilder).
>
> In jshell, try `System.getProperty("html32") + ""` you'll get a `String`.
>
> So, in `DTDBuilder.java` when none `dtd_home` property is set, the `dtd_home` string value is not `null`, causing an exception with the present test.
>
> The expected value is `"Must set property 'dtd_home'"`
>
> And in this case, should'nt we have a `System.exit(1)` too rather than a simple `return` ?
make/jdk/src/classes/build/tools/dtdbuilder/DTDBuilder.java line 287:
> 285:
> 286: String dtd_home = System.getProperty("dtd_home") + File.separator;
> 287: if (dtd_home.equals("null" + File.separator)) {
dtd_home is only used in one location, so instead of changing this null check, maybe just move the "+ File.separator" to line 295?
-------------
PR: https://git.openjdk.java.net/jdk/pull/3626
More information about the build-dev
mailing list