Skip to content
Permalink
Browse files

8236077: Clean up the use of modifiers and semicolons

Reviewed-by: jjg
  • Loading branch information
pavelrappo committed Dec 17, 2019
1 parent a1d396c commit bdaa9c6a1caa4ebc3edb20ce4811ec6d97a619dd
Showing with 316 additions and 338 deletions.
  1. +2 −2 src/jdk.javadoc/share/classes/jdk/javadoc/doclet/Doclet.java
  2. +2 −2 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractMemberWriter.java
  3. +1 −1 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/DocFilesHandlerImpl.java
  4. +2 −2 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlSerialFieldWriter.java
  5. +1 −1 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlSerialMethodWriter.java
  6. +2 −2 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/IndexRedirectWriter.java
  7. +4 −4 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/MethodWriterImpl.java
  8. +1 −1 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ModuleWriterImpl.java
  9. +1 −1 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageTreeWriter.java
  10. +1 −1 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/Head.java
  11. +2 −2 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlTag.java
  12. +2 −2 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/package-info.java
  13. +10 −10 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/AnnotationTypeFieldWriter.java
  14. +1 −1 ...avadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/AnnotationTypeOptionalMemberWriter.java
  15. +10 −11 ...avadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/AnnotationTypeRequiredMemberWriter.java
  16. +16 −16 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/AnnotationTypeWriter.java
  17. +5 −5 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/BaseConfiguration.java
  18. +26 −26 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/ClassWriter.java
  19. +15 −16 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/ConstantsSummaryWriter.java
  20. +12 −12 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/ConstructorWriter.java
  21. +3 −3 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/DocletElement.java
  22. +11 −11 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/EnumConstantWriter.java
  23. +9 −11 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/FieldWriter.java
  24. +11 −12 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/MemberSummaryWriter.java
  25. +9 −11 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/MethodWriter.java
  26. +12 −12 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/ModuleSummaryWriter.java
  27. +16 −24 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/PackageSummaryWriter.java
  28. +11 −11 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/PropertyWriter.java
  29. +37 −38 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/SerializedFormWriter.java
  30. +21 −26 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/WriterFactory.java
  31. +3 −3 ...dk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/AbstractMemberBuilder.java
  32. +2 −2 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/ConstructorBuilder.java
  33. +1 −1 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/EnumConstantBuilder.java
  34. +2 −2 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/FieldBuilder.java
  35. +1 −1 ...jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/MemberSummaryBuilder.java
  36. +2 −2 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/MethodBuilder.java
  37. +2 −2 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/PropertyBuilder.java
  38. +1 −1 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclets.properties
  39. +1 −1 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclets_ja.properties
  40. +1 −1 ...jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclets_zh_CN.properties
  41. +1 −1 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/InheritDocTaglet.java
  42. +1 −1 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/Taglet.java
  43. +9 −9 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/TagletManager.java
  44. +1 −1 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/UserTaglet.java
  45. +1 −1 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/ValueTaglet.java
  46. +2 −2 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/package-info.java
  47. +1 −1 ...jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/DeprecatedAPIListBuilder.java
  48. +2 −2 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/DocFileIOException.java
  49. +1 −1 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/DocFinder.java
  50. +1 −1 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Extern.java
  51. +4 −4 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Utils.java
  52. +4 −4 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/VisibleMemberTable.java
  53. +1 −1 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/links/LinkFactory.java
  54. +2 −2 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/links/LinkOutput.java
  55. +4 −4 src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/ElementsTable.java
  56. +4 −4 src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/JavadocTool.java
  57. +2 −2 src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/Main.java
  58. +2 −2 src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/ToolOption.java
  59. +1 −2 src/jdk.javadoc/share/classes/module-info.java
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2019, 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
@@ -153,7 +153,7 @@
/**
* The kind of an option.
*/
public static enum Kind {
enum Kind {
/** an extended option, such as those prefixed with -X */
EXTENDED,
/** a standard option */
@@ -510,11 +510,11 @@ public Content getMemberTree(Content memberTree) {
private Content exceptions;

// Threshold for length of type parameters before switching from inline to block representation.
private final static int TYPE_PARAMS_MAX_INLINE_LENGTH = 50;
private static final int TYPE_PARAMS_MAX_INLINE_LENGTH = 50;

// Threshold for combined length of modifiers, type params and return type before breaking
// it up with a line break before the return type.
private final static int RETURN_TYPE_MAX_LINE_LENGTH = 50;
private static final int RETURN_TYPE_MAX_LINE_LENGTH = 50;

/**
* Create a new member signature builder.
@@ -304,7 +304,7 @@ private String getWindowTitle(HtmlDocletWriter docletWriter, Element element) {
/**
* Constructor to construct the HtmlDocletWriter object.
*
* @param configuration the configuruation of this doclet.
* @param configuration the configuration of this doclet.
* @param path the file to be generated.
* @param e the anchoring element.
*/
@@ -79,7 +79,7 @@ public Content getSerializableFieldsHeader() {
/**
* Return the header for serializable fields content section.
*
* @param isLastContent true if the cotent being documented is the last content.
* @param isLastContent true if the content being documented is the last content.
* @return a content tree for the header
*/
public Content getFieldsContentHeader(boolean isLastContent) {
@@ -92,7 +92,7 @@ public Content getFieldsContentHeader(boolean isLastContent) {
* Add serializable fields.
*
* @param heading the heading for the section
* @param serializableFieldsTree the tree to be added to the serializable fileds
* @param serializableFieldsTree the tree to be added to the serializable fields
* content tree
* @return a content tree for the serializable fields content
*/
@@ -69,7 +69,7 @@ public Content getSerializableMethodsHeader() {
/**
* Return the header for serializable methods content section.
*
* @param isLastContent true if the cotent being documented is the last content.
* @param isLastContent true if the content being documented is the last content.
* @return a content tree for the header
*/
public Content getMethodsContentHeader(boolean isLastContent) {
@@ -44,9 +44,9 @@
/**
* Writes a file that tries to redirect to an alternate page.
* The redirect uses JavaScript, if enabled, falling back on
* {@code <meta http-eqiv=refresh content="0,<uri>">}.
* {@code <meta http-equiv=refresh content="0,<uri>">}.
* If neither are supported/enabled in a browser, the page displays the
* standard "JavaScipt not enabled" message, and a link to the alternate page.
* standard "JavaScript not enabled" message, and a link to the alternate page.
*/
public class IndexRedirectWriter extends HtmlDocletWriter {

@@ -168,13 +168,13 @@ public void addComments(TypeMirror holderType, ExecutableElement method, Content
? utils.getSimpleName(holder)
: utils.getFullyQualifiedName(holder),
false);
Content codelLink = HtmlTree.CODE(link);
Content codeLink = HtmlTree.CODE(link);
Content descfrmLabel = HtmlTree.SPAN(HtmlStyle.descfrmTypeLabel,
utils.isClass(holder)
? contents.descfrmClassLabel
: contents.descfrmInterfaceLabel);
descfrmLabel.add(Entity.NO_BREAK_SPACE);
descfrmLabel.add(codelLink);
descfrmLabel.add(codeLink);
methodDocTree.add(HtmlTree.DIV(HtmlStyle.block, descfrmLabel));
writer.addInlineComment(method, methodDocTree);
}
@@ -328,7 +328,7 @@ protected static void addOverridden(HtmlDocletWriter writer,
dl.add(dt);
Content overriddenTypeLink =
writer.getLink(new LinkInfoImpl(writer.configuration, context, overriddenType));
Content codeOverridenTypeLink = HtmlTree.CODE(overriddenTypeLink);
Content codeOverriddenTypeLink = HtmlTree.CODE(overriddenTypeLink);
Content methlink = writer.getLink(
new LinkInfoImpl(writer.configuration, LinkInfoImpl.Kind.MEMBER,
holder)
@@ -338,7 +338,7 @@ protected static void addOverridden(HtmlDocletWriter writer,
dd.add(Entity.NO_BREAK_SPACE);
dd.add(writer.contents.inClass);
dd.add(Entity.NO_BREAK_SPACE);
dd.add(codeOverridenTypeLink);
dd.add(codeOverriddenTypeLink);
dl.add(dd);
}
}
@@ -281,7 +281,7 @@ public void computeModulesData() {
}
packages.put(pkg, e);
}
};
}

// Get all exported packages for the module, using the exports directive for the module.
for (ModuleElement.ExportsDirective directive : ElementFilter.exportsIn(mdle.getDirectives())) {
@@ -81,7 +81,7 @@ public PackageTreeWriter(HtmlConfiguration configuration, DocPath path, PackageE
* @param configuration the configuration for this run.
* @param pkg Package for which tree file is to be generated.
* @param noDeprecated If true, do not generate any information for
* deprecated classe or interfaces.
* deprecated classes or interfaces.
* @throws DocFileIOException if there is a problem generating the package tree page
*/
public static void generate(HtmlConfiguration configuration,
@@ -148,7 +148,7 @@ public Head addKeywords(List<String> keywords) {
* @param timestamp true if timestamps should be be added.
* @return this object
*/
// For temporary backwards compatibiility, if this method is not called,
// For temporary backwards compatibility, if this method is not called,
// no 'Generated by javadoc' comment will be added.
public Head setTimestamp(boolean timestamp) {
showTimestamp = timestamp;
@@ -97,7 +97,7 @@
/**
* Enum representing the type of HTML element.
*/
public static enum BlockType {
public enum BlockType {
BLOCK,
INLINE,
OTHER
@@ -106,7 +106,7 @@
/**
* Enum representing HTML end tag requirement.
*/
public static enum EndTag {
public enum EndTag {
END,
NOEND
}
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2019, 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
@@ -24,7 +24,7 @@
*/

/**
* Doclets provide the user-selectable backends for processing the
* Doclets provide the user-selectable back ends for processing the
* documentation comments in Java source code.
*
* <p>Doclets are implementations of the {@link jdk.javadoc.doclet Doclet API}.</p>
@@ -44,21 +44,21 @@
*
* @return content tree for the member tree header
*/
public Content getMemberTreeHeader();
Content getMemberTreeHeader();

/**
* Add the annotation type field details marker.
*
* @param memberDetails the content tree representing field details marker
*/
public void addAnnotationFieldDetailsMarker(Content memberDetails);
void addAnnotationFieldDetailsMarker(Content memberDetails);

/**
* Add the annotation type details tree header.
*
* @param typeElement the annotation type being documented
*/
public Content getAnnotationDetailsTreeHeader(TypeElement typeElement);
Content getAnnotationDetailsTreeHeader(TypeElement typeElement);

/**
* Get the annotation type documentation tree header.
@@ -67,7 +67,7 @@
* @param annotationDetailsTree the content tree representing annotation type details
* @return content tree for the annotation type documentation header
*/
public Content getAnnotationDocTreeHeader(Element member, Content annotationDetailsTree);
Content getAnnotationDocTreeHeader(Element member, Content annotationDetailsTree);

/**
* Get the annotation type details tree.
@@ -76,45 +76,45 @@
* @param annotationDetailsTree the content tree representing annotation type details
* @return content tree for the annotation type details
*/
public Content getAnnotationDetails(Content annotationDetailsTreeHeader, Content annotationDetailsTree);
Content getAnnotationDetails(Content annotationDetailsTreeHeader, Content annotationDetailsTree);

/**
* Get the annotation type documentation.
*
* @param annotationDocTree the content tree representing annotation type documentation
* @return content tree for the annotation type documentation
*/
public Content getAnnotationDoc(Content annotationDocTree);
Content getAnnotationDoc(Content annotationDocTree);

/**
* Get the signature for the given member.
*
* @param member the member being documented
* @return content tree for the annotation type signature
*/
public Content getSignature(Element member);
Content getSignature(Element member);

/**
* Add the deprecated output for the given member.
*
* @param member the member being documented
* @param annotationDocTree content tree to which the deprecated information will be added
*/
public void addDeprecated(Element member, Content annotationDocTree);
void addDeprecated(Element member, Content annotationDocTree);

/**
* Add the comments for the given member.
*
* @param member the member being documented
* @param annotationDocTree the content tree to which the comments will be added
*/
public void addComments(Element member, Content annotationDocTree);
void addComments(Element member, Content annotationDocTree);

/**
* Add the tags for the given member.
*
* @param member the member being documented
* @param annotationDocTree the content tree to which the tags will be added
*/
public void addTags(Element member, Content annotationDocTree);
void addTags(Element member, Content annotationDocTree);
}
@@ -45,5 +45,5 @@
* @param member the member being documented
* @param annotationDocTree content tree to which the default value will be added
*/
public void addDefaultValueInfo(Element member, Content annotationDocTree);
void addDefaultValueInfo(Element member, Content annotationDocTree);
}
@@ -44,21 +44,21 @@
*
* @return content tree for the member tree header
*/
public Content getMemberTreeHeader();
Content getMemberTreeHeader();

/**
* Add the annotation type details marker.
*
* @param memberDetails the content tree representing details marker
*/
public void addAnnotationDetailsMarker(Content memberDetails);
void addAnnotationDetailsMarker(Content memberDetails);

/**
* Add the annotation type details tree header.
*
* @param typeElement the annotation type being documented
*/
public Content getAnnotationDetailsTreeHeader(TypeElement typeElement);
Content getAnnotationDetailsTreeHeader(TypeElement typeElement);

/**
* Get the annotation type documentation tree header.
@@ -67,8 +67,7 @@
* @param annotationDetailsTree the content tree representing annotation type details
* @return content tree for the annotation type documentation header
*/
public Content getAnnotationDocTreeHeader(Element member,
Content annotationDetailsTree);
Content getAnnotationDocTreeHeader(Element member, Content annotationDetailsTree);

/**
* Get the annotation type details tree.
@@ -77,45 +76,45 @@ public Content getAnnotationDocTreeHeader(Element member,
* @param annotationDetailsTree the content tree representing annotation type details
* @return content tree for the annotation type details
*/
public Content getAnnotationDetails(Content annotationDetailsTreeHeader, Content annotationDetailsTree);
Content getAnnotationDetails(Content annotationDetailsTreeHeader, Content annotationDetailsTree);

/**
* Get the annotation type documentation.
*
* @param annotationDocTree the content tree representing annotation type documentation
* @return content tree for the annotation type documentation
*/
public Content getAnnotationDoc(Content annotationDocTree);
Content getAnnotationDoc(Content annotationDocTree);

/**
* Get the signature for the given member.
*
* @param member the member being documented
* @return content tree for the annotation type signature
*/
public Content getSignature(Element member);
Content getSignature(Element member);

/**
* Add the deprecated output for the given member.
*
* @param member the member being documented
* @param annotationDocTree content tree to which the deprecated information will be added
*/
public void addDeprecated(Element member, Content annotationDocTree);
void addDeprecated(Element member, Content annotationDocTree);

/**
* Add the comments for the given member.
*
* @param member the member being documented
* @param annotationDocTree the content tree to which the comments will be added
*/
public void addComments(Element member, Content annotationDocTree);
void addComments(Element member, Content annotationDocTree);

/**
* Add the tags for the given member.
*
* @param member the member being documented
* @param annotationDocTree the content tree to which the tags will be added
*/
public void addTags(Element member, Content annotationDocTree);
void addTags(Element member, Content annotationDocTree);
}

0 comments on commit bdaa9c6

Please sign in to comment.
You can’t perform that action at this time.