mirror of
https://github.com/openjdk/jdk.git
synced 2026-05-11 05:59:52 +00:00
6879346: files have Windows newlines
Reviewed-by: darcy
This commit is contained in:
parent
b2eaa8339f
commit
a8e28960cd
@ -1,7 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
|
||||
<!--
|
||||
Copyright 2003-2009 Sun Microsystems, Inc. All Rights Reserved.
|
||||
Copyright 2003-2009 Sun Microsystems, Inc. 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
|
||||
@ -44,7 +44,7 @@
|
||||
<PackageTags/>
|
||||
<PackageFooter/>
|
||||
</PackageDoc>
|
||||
|
||||
|
||||
<AnnotationTypeDoc>
|
||||
<AnnotationTypeHeader/>
|
||||
<DeprecationInfo/>
|
||||
@ -52,7 +52,7 @@
|
||||
<AnnotationTypeDescription/>
|
||||
<AnnotationTypeTagInfo/>
|
||||
<MemberSummary>
|
||||
<AnnotationTypeRequiredMemberSummary/>
|
||||
<AnnotationTypeRequiredMemberSummary/>
|
||||
<AnnotationTypeOptionalMemberSummary/>
|
||||
</MemberSummary>
|
||||
<AnnotationTypeRequiredMemberDetails>
|
||||
@ -77,16 +77,16 @@
|
||||
<MemberFooter/>
|
||||
</AnnotationTypeOptionalMember>
|
||||
<Footer/>
|
||||
</AnnotationTypeOptionalMemberDetails>
|
||||
</AnnotationTypeOptionalMemberDetails>
|
||||
<AnnotationTypeFooter/>
|
||||
</AnnotationTypeDoc>
|
||||
|
||||
|
||||
<ClassDoc>
|
||||
<ClassHeader/>
|
||||
<ClassTree/>
|
||||
<TypeParamInfo/>
|
||||
<SuperInterfacesInfo/>
|
||||
<ImplementedInterfacesInfo/>
|
||||
<ImplementedInterfacesInfo/>
|
||||
<SubClassInfo/>
|
||||
<SubInterfacesInfo/>
|
||||
<InterfaceUsageInfo/>
|
||||
@ -100,7 +100,7 @@
|
||||
<NestedClassesInheritedSummary/>
|
||||
<EnumConstantsSummary/>
|
||||
<FieldsSummary/>
|
||||
<FieldsInheritedSummary/>
|
||||
<FieldsInheritedSummary/>
|
||||
<ConstructorsSummary/>
|
||||
<MethodsSummary/>
|
||||
<MethodsInheritedSummary/>
|
||||
@ -155,7 +155,7 @@
|
||||
</MethodDetails>
|
||||
<ClassFooter/>
|
||||
</ClassDoc>
|
||||
|
||||
|
||||
<ConstantSummary>
|
||||
<Header/>
|
||||
<Contents/>
|
||||
@ -166,12 +166,12 @@
|
||||
<ClassHeader/>
|
||||
<ConstantMembers/>
|
||||
<ClassFooter/>
|
||||
</ClassConstantSummary>
|
||||
</ClassConstantSummary>
|
||||
</PackageConstantSummary>
|
||||
</ConstantSummaries>
|
||||
</ConstantSummaries>
|
||||
<Footer/>
|
||||
</ConstantSummary>
|
||||
|
||||
|
||||
<SerializedForm>
|
||||
<Header/>
|
||||
<SerializedFormSummaries>
|
||||
|
||||
@ -32,6 +32,9 @@
|
||||
* @run main TestCRLineSeparator
|
||||
*/
|
||||
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
public class TestCRLineSeparator extends JavadocTester {
|
||||
|
||||
//Test information.
|
||||
@ -39,7 +42,7 @@ public class TestCRLineSeparator extends JavadocTester {
|
||||
|
||||
//Javadoc arguments.
|
||||
private static final String[] ARGS = new String[] {
|
||||
"-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg"
|
||||
"-d", BUG_ID, "-sourcepath", ".", "pkg"
|
||||
};
|
||||
|
||||
//Input for string search tests.
|
||||
@ -53,7 +56,8 @@ public class TestCRLineSeparator extends JavadocTester {
|
||||
* The entry point of the test.
|
||||
* @param args the array of command line arguments.
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
public static void main(String[] args) throws Exception {
|
||||
initFiles(new File(SRC_DIR), new File("."), "pkg");
|
||||
TestCRLineSeparator tester = new TestCRLineSeparator();
|
||||
run(tester, ARGS, TEST, NEGATED_TEST);
|
||||
tester.printSummary();
|
||||
@ -72,4 +76,36 @@ public class TestCRLineSeparator extends JavadocTester {
|
||||
public String getBugName() {
|
||||
return getClass().getName();
|
||||
}
|
||||
|
||||
// recursively copy files from fromDir to toDir, replacing newlines
|
||||
// with \r
|
||||
static void initFiles(File fromDir, File toDir, String f) throws IOException {
|
||||
File from_f = new File(fromDir, f);
|
||||
File to_f = new File(toDir, f);
|
||||
if (from_f.isDirectory()) {
|
||||
to_f.mkdirs();
|
||||
for (String child: from_f.list()) {
|
||||
initFiles(from_f, to_f, child);
|
||||
}
|
||||
} else {
|
||||
List<String> lines = new ArrayList<String>();
|
||||
BufferedReader in = new BufferedReader(new FileReader(from_f));
|
||||
try {
|
||||
String line;
|
||||
while ((line = in.readLine()) != null)
|
||||
lines.add(line);
|
||||
} finally {
|
||||
in.close();
|
||||
}
|
||||
BufferedWriter out = new BufferedWriter(new FileWriter(to_f));
|
||||
try {
|
||||
for (String line: lines) {
|
||||
out.write(line);
|
||||
out.write("\r");
|
||||
}
|
||||
} finally {
|
||||
out.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -21,4 +21,11 @@
|
||||
* have any questions.
|
||||
*/
|
||||
|
||||
package pkg;
/**
* Line 1
* Line 2
*/
public class MyClass {}
|
||||
package pkg;
|
||||
|
||||
/**
|
||||
* Line 1
|
||||
* Line 2
|
||||
*/
|
||||
public class MyClass {}
|
||||
|
||||
|
||||
@ -1 +1 @@
|
||||
java.lang
|
||||
java.lang
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<body>
|
||||
{@link java.awt.Color#getAlpha()
|
||||
getAlpha}
|
||||
</body>
|
||||
</html>
|
||||
<html>
|
||||
<body>
|
||||
{@link java.awt.Color#getAlpha()
|
||||
getAlpha}
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -52,7 +52,7 @@ public class TestNoPackagesFile extends JavadocTester {
|
||||
TestNoPackagesFile tester = new TestNoPackagesFile();
|
||||
run(tester, ARGS, NO_TEST, NO_TEST);
|
||||
if ((new java.io.File(BUG_ID + FS + "packages.html")).exists()) {
|
||||
throw new Error("Test Fails: packages file should not be " +
"generated anymore.");
|
||||
throw new Error("Test Fails: packages file should not be " + "generated anymore.");
|
||||
} else {
|
||||
System.out.println("Test passes: packages.html not found.");
|
||||
}
|
||||
|
||||
@ -46,7 +46,7 @@ public class TestMultiInheritence extends JavadocTester {
|
||||
//Method foo() is inherited from BOTH I2 and I3
|
||||
private static final String[][] TEST = {
|
||||
{BUG_ID + FS + "pkg3" + FS + "I1.html",
|
||||
"Methods inherited from interface pkg3." +
"<A HREF=\"../pkg3/I2.html\" title=\"interface in pkg3\">I2</A>"},
|
||||
"Methods inherited from interface pkg3." + "<A HREF=\"../pkg3/I2.html\" title=\"interface in pkg3\">I2</A>"},
|
||||
{BUG_ID + FS + "pkg3" + FS +"I1.html",
|
||||
"Methods inherited from interface pkg3." +
|
||||
"<A HREF=\"../pkg3/I3.html\" title=\"interface in pkg3\">I3</A>"},
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<html>
|
||||
<body>
|
||||
Here is a relative link in a package:
|
||||
<a href="relative-package-link.html">relative package link</a>.
|
||||
</body>
|
||||
</html>
|
||||
<html>
|
||||
<body>
|
||||
Here is a relative link in a package:
|
||||
<a href="relative-package-link.html">relative package link</a>.
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@ -55,7 +55,7 @@ public class TestTaglets extends JavadocTester {
|
||||
|
||||
//Input for string search tests.
|
||||
private static final String[][] TEST_4654308 = new String[][] {
|
||||
{"4654308" + FS + "C.html", "<B>Foo:</B><DD>my only method is " +
"<A HREF=\"C.html#method()\"><CODE>here</CODE></A>"}
|
||||
{"4654308" + FS + "C.html", "<B>Foo:</B><DD>my only method is " + "<A HREF=\"C.html#method()\"><CODE>here</CODE></A>"}
|
||||
};
|
||||
private static final String[][] NEGATED_TEST_4654308 = NO_TEST;
|
||||
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
<HTML>
|
||||
Testing.
|
||||
<HTML>
|
||||
<HTML>
|
||||
Testing.
|
||||
<HTML>
|
||||
|
||||
|
||||
@ -1,31 +1,31 @@
|
||||
/* DO NOT EDIT THIS FILE - it is machine generated */
|
||||
#include <jni.h>
|
||||
/* Header for class SubClassConsts */
|
||||
|
||||
#ifndef _Included_SubClassConsts
|
||||
#define _Included_SubClassConsts
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#undef SubClassConsts_serialVersionUID
|
||||
#define SubClassConsts_serialVersionUID 6733861379283244755i64
|
||||
#undef SubClassConsts_SUPER_INT_CONSTANT
|
||||
#define SubClassConsts_SUPER_INT_CONSTANT 3L
|
||||
#undef SubClassConsts_SUPER_FLOAT_CONSTANT
|
||||
#define SubClassConsts_SUPER_FLOAT_CONSTANT 99.3f
|
||||
#undef SubClassConsts_SUPER_DOUBLE_CONSTANT
|
||||
#define SubClassConsts_SUPER_DOUBLE_CONSTANT 33.2
|
||||
#undef SubClassConsts_SUPER_BOOLEAN_CONSTANT
|
||||
#define SubClassConsts_SUPER_BOOLEAN_CONSTANT 0L
|
||||
#undef SubClassConsts_SUB_INT_CONSTANT
|
||||
#define SubClassConsts_SUB_INT_CONSTANT 2L
|
||||
#undef SubClassConsts_SUB_DOUBLE_CONSTANT
|
||||
#define SubClassConsts_SUB_DOUBLE_CONSTANT 2.25
|
||||
#undef SubClassConsts_SUB_FLOAT_CONSTANT
|
||||
#define SubClassConsts_SUB_FLOAT_CONSTANT 7.9f
|
||||
#undef SubClassConsts_SUB_BOOLEAN_CONSTANT
|
||||
#define SubClassConsts_SUB_BOOLEAN_CONSTANT 1L
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
/* DO NOT EDIT THIS FILE - it is machine generated */
|
||||
#include <jni.h>
|
||||
/* Header for class SubClassConsts */
|
||||
|
||||
#ifndef _Included_SubClassConsts
|
||||
#define _Included_SubClassConsts
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#undef SubClassConsts_serialVersionUID
|
||||
#define SubClassConsts_serialVersionUID 6733861379283244755i64
|
||||
#undef SubClassConsts_SUPER_INT_CONSTANT
|
||||
#define SubClassConsts_SUPER_INT_CONSTANT 3L
|
||||
#undef SubClassConsts_SUPER_FLOAT_CONSTANT
|
||||
#define SubClassConsts_SUPER_FLOAT_CONSTANT 99.3f
|
||||
#undef SubClassConsts_SUPER_DOUBLE_CONSTANT
|
||||
#define SubClassConsts_SUPER_DOUBLE_CONSTANT 33.2
|
||||
#undef SubClassConsts_SUPER_BOOLEAN_CONSTANT
|
||||
#define SubClassConsts_SUPER_BOOLEAN_CONSTANT 0L
|
||||
#undef SubClassConsts_SUB_INT_CONSTANT
|
||||
#define SubClassConsts_SUB_INT_CONSTANT 2L
|
||||
#undef SubClassConsts_SUB_DOUBLE_CONSTANT
|
||||
#define SubClassConsts_SUB_DOUBLE_CONSTANT 2.25
|
||||
#undef SubClassConsts_SUB_FLOAT_CONSTANT
|
||||
#define SubClassConsts_SUB_FLOAT_CONSTANT 7.9f
|
||||
#undef SubClassConsts_SUB_BOOLEAN_CONSTANT
|
||||
#define SubClassConsts_SUB_BOOLEAN_CONSTANT 1L
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user