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

Annotate methods which return explicit null #40

Merged

Conversation

oleg-nenashev
Copy link
Member

There is a risk of NPEs in some cases, e.g. in "*Strategy#getPriority()" API. No related JIRA issues, but I would rather fix it.

@oleg-nenashev
Copy link
Member Author

I forgot about @reviewbybees

@ghost
Copy link

ghost commented Jul 9, 2017

This pull request originates from a CloudBees employee. At CloudBees, we require that all pull requests be reviewed by other CloudBees employees before we seek to have the change accepted. If you want to learn more about our process please see this explanation.

@rsandell rsandell requested review from abayer and svanoort July 10, 2017 15:41
Copy link
Member

@abayer abayer left a comment

Choose a reason for hiding this comment

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

Other than those mis-indented @CheckForNulls, looks good.

@@ -139,6 +140,7 @@ public int getPriority() {
* @deprecated Used in 2.x now replaced with dynamic {@link JobGroup#jobGroupStrategy}, will return the view
*/
@Deprecated
@CheckForNull
Copy link
Member

Choose a reason for hiding this comment

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

Indent. =)

@@ -236,7 +238,8 @@ private PriorityConfigurationCallback getPriorityInternal(Queue.Item item, Prior
return priorityCallback.setPrioritySelection(PrioritySorterConfiguration.get().getStrategy().getDefaultPriority());
}

public JobGroup getJobGroup(PriorityConfigurationCallback priorityCallback, Job<?, ?> job) {
@CheckForNull
Copy link
Member

Choose a reason for hiding this comment

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

Indent again?

@oleg-nenashev
Copy link
Member Author

@abayer As a plugin maintainer I have officially gave up with maintaining tab indenting in it. Once I have zero pending PRs, I will just refactor all the code

@oleg-nenashev oleg-nenashev merged commit 4ee2f99 into jenkinsci:master Jul 31, 2017
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.

2 participants