提交 c40bedef 编写于 作者: B bpatel

7068595: html files in class-use dir do not get loaded correctly when Frames link is clicked

Reviewed-by: jjg
上级 10089735
/*
* 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 @@ public class ClassUseWriter extends SubWriterHolderWriter {
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";
......
/*
* 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 @@ public class TestUseOption extends JavadocTester {
}
};
private static final String[][] TEST4 = {
{BUG_ID + "-4" + FS + "pkg2" + FS + "class-use" + FS + "C3.html", "<a href=" +
"\"../../index.html?pkg2/class-use/C3.html\" target=\"_top\">" +
"Frames</a></li>"
}
};
private static final String[] ARGS = new String[] {
"-d", BUG_ID, "-sourcepath", SRC_DIR, "-use", "pkg1", "pkg2"
};
......@@ -76,6 +83,10 @@ public class TestUseOption extends JavadocTester {
"-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 @@ public class TestUseOption extends JavadocTester {
}
tester.printSummary();
run(tester, ARGS3, TEST3, NO_TEST);
run(tester, ARGS4, TEST4, NO_TEST);
tester.printSummary();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册