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

[MSHARED-1251] - Deprecate the JAR Index feature (JDK-8302819) #33

Merged
merged 1 commit into from
Jul 25, 2023

Conversation

jorsol
Copy link
Contributor

@jorsol jorsol commented May 8, 2023

Following this checklist to help us incorporate your
contribution quickly and easily:

  • Make sure there is a JIRA issue filed
    for the change (usually before you start working on it). Trivial changes like typos do not
    require a JIRA issue. Your pull request should address just this issue, without
    pulling in other changes.
  • Each commit in the pull request should have a meaningful subject line and body.
  • Format the pull request title like [MSHARED-XXX] - Fixes bug in ApproximateQuantiles,
    where you replace MSHARED-XXX with the appropriate JIRA issue. Best practice
    is to use the JIRA issue title in the pull request title and in the first line of the
    commit message.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Run mvn clean verify to make sure basic checks pass. A more thorough check will
    be performed on your pull request automatically.
  • You have run the integration tests successfully (mvn -Prun-its clean verify).

If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.

To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.

/**
* @deprecated See <a href="https://bugs.openjdk.org/browse/JDK-8305597">JDK-8305597</a>
*/
@Deprecated
Copy link
Contributor

Choose a reason for hiding this comment

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

no real need to deprecate a private field

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's an internal mark that the field should no longer be used, it helps to detect the places where it's used and is a reminder that in the future it could be removed.

Copy link
Member

Choose a reason for hiding this comment

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

The point is that the usage of index.list has been marked deprecated and is not being used starting with JDK18 https://www.oracle.com/java/technologies/javase/18-relnote-issues.html

Furthermore as already referenced in JDK21 it will be completely being removed. Also it's good to have a reminder here...

Copy link
Contributor

Choose a reason for hiding this comment

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

Deprecating the method is enough. Private fields can be changed freely without worrying about compatibility when they're no longer used. Adding Javadoc to private fields, deprecation warnings included, is painting the lily.

Copy link
Contributor Author

@jorsol jorsol May 29, 2023

Choose a reason for hiding this comment

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

Well, adding Javadoc to private fields could be helpful in some cases, especially if the comment is succinct.

Yet, even if adding a Javadoc on a private field is just a cosmetic change, it doesn't hurt in any way to have it, more when it signals to future developers that touch the code that the field should no longer be used for anything (or with extra care).

I don't mind removing the Javadoc from the field, but there is no real need to remove it, in the end, is just a matter of code convention, just like adding Javadoc to a private method is valid.

Maven plugins even recommend adding Javadoc on private fields as the documentation of @Parameter is generated from there.

pom.xml Outdated Show resolved Hide resolved
Signed-off-by: Jorge Solórzano <jorsol@gmail.com>
@slawekjaranowski slawekjaranowski merged commit f4a9b51 into apache:master Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants