Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8253736: Cleanup some of WorkArounds and usage thereof #412

Closed

Conversation

jonathan-gibbons
Copy link
Contributor

@jonathan-gibbons jonathan-gibbons commented Sep 29, 2020

This cleanup is primarily focussed on the WorkArounds class, simplifying/removing code that is no longer required.

Also, simplified DocLint initialization such that it no longer needs a JavacTask and so the initialization code can be moved out of WorkArounds.

The "constant value expression" in Utils is simplified to remove a redundant level of enclosing nested class for the type-kind visitor.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8253736: Cleanup some of WorkArounds and usage thereof

Reviewers

Download

$ git fetch https://git.openjdk.java.net/jdk pull/412/head:pull/412
$ git checkout pull/412

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 29, 2020

👋 Welcome back jjg! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Sep 29, 2020

@jonathan-gibbons this pull request can not be integrated into master due to one or more merge conflicts. To resolve these merge conflicts and update this pull request you can run the following commands in the local repository for your personal fork:

git checkout 8253736-workarounds
git fetch https://git.openjdk.java.net/jdk master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push

@openjdk openjdk bot added the merge-conflict Pull request has merge conflict with target branch label Sep 29, 2020
@openjdk
Copy link

openjdk bot commented Sep 29, 2020

@jonathan-gibbons The following labels will be automatically applied to this pull request:

  • compiler
  • javadoc

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added javadoc javadoc-dev@openjdk.org compiler compiler-dev@openjdk.org labels Sep 29, 2020
@openjdk openjdk bot removed the merge-conflict Pull request has merge conflict with target branch label Sep 29, 2020
@jonathan-gibbons jonathan-gibbons changed the title Cleanup some of WorkArounds and usage thereof. 8253736: Cleanup some of WorkArounds and usage thereof. Sep 29, 2020
@openjdk openjdk bot added the rfr Pull request is ready for review label Sep 29, 2020
@mlbridge
Copy link

mlbridge bot commented Sep 29, 2020

Webrevs

@jonathan-gibbons jonathan-gibbons changed the title 8253736: Cleanup some of WorkArounds and usage thereof. 8253736: Cleanup some of WorkArounds and usage thereof Sep 29, 2020
Copy link
Contributor

@vicente-romero-oracle vicente-romero-oracle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a nit comment, no need for another iteration, the changes looks good to me

// info from a doclet to its taglets via a doclet-specific subtype of
// DocletEnvironment.
toolEnv = ((DocEnvImpl)this.configuration.docEnv).toolEnv;
javacTypes = toolEnv.getTypes();
}

/*
* TODO: This method exists because of a bug in javac which does not
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably a good idea to include the bug ID here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vicente-romero-oracle This relates to a discussion we should have elsewhere, separately, about the interactions between deprecation and packages, and whether we should support depicted packages. JLS does not list packages in the list of kinds of elements that can be deprecated, in which case this comment is probably incorrect, as the bug may actually be here in javadoc for trying to support deprecated packages!

@openjdk
Copy link

openjdk bot commented Oct 1, 2020

@jonathan-gibbons This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for more details.

After integration, the commit message for the final commit will be:

8253736: Cleanup some of WorkArounds and usage thereof

Reviewed-by: vromero, ksrini

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 62 new commits pushed to the master branch:

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Oct 1, 2020
@jonathan-gibbons
Copy link
Contributor Author

/reviewers 2

@openjdk
Copy link

openjdk bot commented Oct 1, 2020

@jonathan-gibbons
The number of required reviews for this PR is now set to 2 (with at least 1 of role reviewers).

@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Oct 1, 2020
@jonathan-gibbons
Copy link
Contributor Author

@vicente-romero-oracle thanks for the review.
I raised the number of reviewers to have a javadoc reviewer participate as well.

Copy link
Member

@kusrinivasan kusrinivasan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice to see WorkArounds being chipped away. It is not clear to me if additional tests are warranted for getConstantValue for TestConstantValuesDriver.java, in langtools test I saw only ElementStructureTest.java. I will leave it to you, maybe file a follow up issue.

public String visitPrimitiveAsBoolean(PrimitiveType t, Object val) {
return (int)val == 0 ? "false" : "true";
}
return cve.visit(ve.asType(), ve.getConstantValue());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yay

@@ -57,15 +57,15 @@ public void test() {
"""
<code id="TestConstantValues.BYTE_MAX_VALUE">public&nbsp;static&nbsp;final&nbsp;byte</code></td>
<th class="col-second" scope="row"><code><a href="TestConstantValues.html#BYTE_MAX_VALUE">BYTE_MAX_VALUE</a></code></th>
<td class="col-last"><code>127</code></td>""",
<td class="col-last"><code>0x7f</code></td>""",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be tests for Float, Double, Long ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Oct 2, 2020
@jonathan-gibbons
Copy link
Contributor Author

/integrate

@openjdk openjdk bot closed this Oct 2, 2020
@openjdk openjdk bot added integrated Pull request has been integrated and removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Oct 2, 2020
@openjdk
Copy link

openjdk bot commented Oct 2, 2020

@jonathan-gibbons Since your change was applied there have been 62 commits pushed to the master branch:

Your commit was automatically rebased without conflicts.

Pushed as commit 7778047.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@jonathan-gibbons jonathan-gibbons deleted the 8253736-workarounds branch November 4, 2020 00:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler compiler-dev@openjdk.org integrated Pull request has been integrated javadoc javadoc-dev@openjdk.org
3 participants