# HG changeset patch # User bpatel # Date 1349471792 25200 # Node ID ae69cea86e838558009cbe590adeb6e307ccd2f4 # Parent 3bee341587fa05858b6b4a321972b419fb1db0e2 7068595: html files in class-use dir do not get loaded correctly when Frames link is clicked Reviewed-by: jjg diff -r 3bee341587fa -r ae69cea86e83 langtools/src/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java --- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java Fri Oct 05 14:13:47 2012 -0700 +++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java Fri Oct 05 14:16:32 2012 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -195,10 +195,7 @@ ClassUseWriter clsgen; String path = DirectoryManager.getDirectoryPath(classdoc. containingPackage()); - if (path.length() > 0) { - path += File.separator; - } - path += "class-use"; + path += "class-use" + DirectoryManager.URL_FILE_SEPARATOR; String filename = classdoc.name() + ".html"; String pkgname = classdoc.containingPackage().name(); pkgname += (pkgname.length() > 0)? ".class-use": "class-use"; diff -r 3bee341587fa -r ae69cea86e83 langtools/test/com/sun/javadoc/testUseOption/TestUseOption.java --- a/langtools/test/com/sun/javadoc/testUseOption/TestUseOption.java Fri Oct 05 14:13:47 2012 -0700 +++ b/langtools/test/com/sun/javadoc/testUseOption/TestUseOption.java Fri Oct 05 14:16:32 2012 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,7 +23,7 @@ /* * @test - * @bug 4496290 4985072 7006178 + * @bug 4496290 4985072 7006178 7068595 * @summary A simple test to determine if -use works. * @author jamieh * @library ../lib/ @@ -34,7 +34,7 @@ public class TestUseOption extends JavadocTester { - private static final String BUG_ID = "4496290-4985072-7006178"; + private static final String BUG_ID = "4496290-4985072-7006178-7068595"; //Input for string search tests. private static final String[] TEST2 = { @@ -64,6 +64,13 @@ } }; + private static final String[][] TEST4 = { + {BUG_ID + "-4" + FS + "pkg2" + FS + "class-use" + FS + "C3.html", "" + + "Frames" + } + }; + private static final String[] ARGS = new String[] { "-d", BUG_ID, "-sourcepath", SRC_DIR, "-use", "pkg1", "pkg2" }; @@ -76,6 +83,10 @@ "-d", BUG_ID + "-3", "-sourcepath", SRC_DIR, "-use", SRC_DIR + FS + "C.java", SRC_DIR + FS + "UsedInC.java" }; + private static final String[] ARGS4 = new String[] { + "-d", BUG_ID + "-4", "-sourcepath", SRC_DIR, "-use", "pkg1", "pkg2" + }; + /** * The entry point of the test. * @param args the array of command line arguments. @@ -108,6 +119,7 @@ } tester.printSummary(); run(tester, ARGS3, TEST3, NO_TEST); + run(tester, ARGS4, TEST4, NO_TEST); tester.printSummary(); }