-
Notifications
You must be signed in to change notification settings - Fork 736
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
Remove a few long deprecated methods and fully annotate others #719
Conversation
@Sage-Pierce @nobe0716 |
LGTM - Are you planning on releasing with a major rev since this is technically backward incompatible? |
98fc6cf
to
5e5708d
Compare
@Sage-Pierce |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -63,23 +63,14 @@ | |||
protected int comments; | |||
@SkipFromToString | |||
protected String body; | |||
// for backward compatibility with < 1.63, this collection needs to hold instances of Label, not GHLabel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
v1.63 is 5 years ago.
* | ||
* @deprecated use {@link GHLabel} | ||
*/ | ||
public static class Label extends GHLabel { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is publicly visible, but not returned from any properties. It exists in one spot (above).
pageSize); | ||
} catch (MalformedURLException e) { | ||
throw new GHException("Unable to build GitHub API URL", e); | ||
return () -> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clean up to use even more of the existing code base. Still behaves the same.
public String getGravatarId() { | ||
return gravatar_id; | ||
return ""; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This always returns ""
anyway. So, let's be explicit about it.
* | ||
* @return the avatar url | ||
*/ | ||
public String getAvatarUrl() { | ||
if (avatar_url != null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is null, it is still more meaningful that the ""
returned from gravatar.
return (HttpURLConnection) url.openConnection(p); | ||
} | ||
})); | ||
return withConnector(new ImpatientHttpConnector(url -> (HttpURLConnection) url.openConnection(p))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found a way to do this without dynamic classes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love it. Couple trivial questions.
// both thread an unread are included | ||
// assertThat(t.getLastReadAt(), notNullValue()); | ||
// assertThat(t.isRead(), equalTo(true)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these commented out intentionally?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I meant this as a note to say, "This query doesn't return only records where isRead()
is true
."
* @return the string | ||
* @deprecated Typo of {@link #getHttpTransportUrl()} | ||
*/ | ||
public String gitHttpTransportUrl() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It took me a few eye blinks to see this 💯
Co-Authored-By: Karl Shultz <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, though I was mostly looking from a coding perspective.
Description
There were a few very old deprecated classes that were annoying me. Like 3+ years deprecated.
Removed in this PR:
DeleteToken
GHIssue.Label
Before submitting a PR:
We love getting PRs, but we hate asking people for the same basic changes every time.
master
. Create your PR from that branch.mvn -D enable-ci clean install site
locally. This may reformat your code, commit those changes. If this command doesn't succeed, your change will not pass CI.