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

Add new ToolDescriptor constructor so subclasses are not required to be an inner class #3220

Merged
merged 2 commits into from
Jan 10, 2018

Conversation

dwnusbaum
Copy link
Member

@dwnusbaum dwnusbaum commented Jan 8, 2018

Allow subclasses of ToolDescriptor to use the Descriptor(Class<T>) constructor so that subclasses do not have to be an inner class of their Describable. Required to split out JDK$DescriptorImpl as part of JENKINS-22367, see #3147.

I am happy to create a JIRA ticket or tests if desired.

Proposed changelog entries

  • Developer: Add a constructor to ToolDescriptor so that subclasses are not required to be an inner class of their Describable

Submitter checklist

  • JIRA issue is well described
  • Changelog entry appropriate for the audience affected by the change (users or developer, depending on the change). Examples
    * Use the Internal: prefix if the change has no user-visible impact (API, test frameworks, etc.)
  • Appropriate autotests or explanation to why this change has no tests
  • For dependency updates: links to external changelogs and, if possible, full diffs

Desired reviewers

@reviewbybees

@dwnusbaum dwnusbaum requested a review from jglick January 8, 2018 19:31
Copy link
Member

@daniel-beck daniel-beck left a comment

Choose a reason for hiding this comment

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

@since?

super();
}

protected ToolDescriptor(Class<T> clazz) {
Copy link
Member

Choose a reason for hiding this comment

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

add

/**
 * @since FIXME
 */

Copy link
Member

Choose a reason for hiding this comment

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

(resolved)

@@ -54,6 +54,14 @@

private T[] installations;

protected ToolDescriptor() {
super();
Copy link
Member

Choose a reason for hiding this comment

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

Or can just be omitted:

protected ToolDescriptor() {}

Copy link
Member

@oleg-nenashev oleg-nenashev left a comment

Choose a reason for hiding this comment

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

🐝

@oleg-nenashev oleg-nenashev added the ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback label Jan 9, 2018
@dwnusbaum
Copy link
Member Author

@reviewbybees done

super();
}

protected ToolDescriptor(Class<T> clazz) {
Copy link
Member

Choose a reason for hiding this comment

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

(resolved)

@jglick jglick merged commit deeab3a into jenkinsci:master Jan 10, 2018
@dwnusbaum dwnusbaum deleted the tooldescriptor-constructor branch January 10, 2018 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback
Projects
None yet
4 participants