Skip to content

Commit 49112fa

Browse files
scientificwareerikj79
authored andcommitted
8265909: build.tools.dtdbuilder.DTDBuilder.java failed detecting missing path of dtd_home
Reviewed-by: erikj
1 parent 94d0b0f commit 49112fa

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

make/jdk/src/classes/build/tools/dtdbuilder/DTDBuilder.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
* @see DTDParser
5757
* @see Parser
5858
* @author Arthur van Hoff
59+
* @author Guy Abossolo Foh
5960
*/
6061
public
6162
class DTDBuilder extends DTD {
@@ -282,7 +283,7 @@ public void saveContentModel(DataOutputStream out, ContentModel model) throws IO
282283

283284
public static void main(String argv[]) {
284285

285-
String dtd_home = System.getProperty("dtd_home") + File.separator;
286+
String dtd_home = System.getProperty("dtd_home");
286287
if (dtd_home == null) {
287288
System.err.println("Must set property 'dtd_home'");
288289
return;
@@ -291,12 +292,12 @@ public static void main(String argv[]) {
291292
DTDBuilder dtd = null;
292293
try {
293294
dtd = new DTDBuilder(argv[0]);
294-
mapping = new PublicMapping(dtd_home, "public.map");
295+
mapping = new PublicMapping(dtd_home + File.separator, "public.map");
295296
String path = mapping.get(argv[0]);
296297
new DTDParser().parse(new FileInputStream(path), dtd);
297298

298299
} catch (IOException e) {
299-
System.err.println("Could not open DTD file "+argv[0]);
300+
System.err.println("Could not open DTD file " + argv[0]);
300301
e.printStackTrace(System.err);
301302
System.exit(1);
302303
}

0 commit comments

Comments
 (0)