FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Prevent stacktrace when there are no admin credentials by carlossg · Pull Request #191 · jenkinsci/github-plugin · GitHub

Prevent stacktrace when there are no admin credentials - #191

Open
carlossg wants to merge 1 commit into
jenkinsci:masterfrom
carlossg:npe
Open

Prevent stacktrace when there are no admin credentials#191
carlossg wants to merge 1 commit into
jenkinsci:masterfrom
carlossg:npe

Conversation

carlossg commented Apr 7, 2018
edited by KostyaSha
Loading

Copy link
Copy Markdown
Contributor

To keep logs cleaner

Instead of

Dec 10, 2016 10:31:51 PM WARNING org.jenkinsci.plugins.github.webhook.WebhookManager$2 applyNullSafe
Failed to add GitHub webhook for GitHubRepositoryName[host=github.com,username=doublesharp,repository=PRIVATE_PROJECT]
java.lang.NullPointerException: There is no credentials with admin access to manage hooks on GitHubRepositoryName[host=github.com,username=doublesharp,repository=PRIVATE_PROJECT]
	at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:231)
	at org.jenkinsci.plugins.github.webhook.WebhookManager$2.applyNullSafe(WebhookManager.java:156)
	at org.jenkinsci.plugins.github.webhook.WebhookManager$2.applyNullSafe(WebhookManager.java:152)
	at org.jenkinsci.plugins.github.util.misc.NullSafeFunction.apply(NullSafeFunction.java:18)

This change is 

To keep logs cleaner

Instead of

```
Dec 10, 2016 10:31:51 PM WARNING org.jenkinsci.plugins.github.webhook.WebhookManager$2 applyNullSafe
Failed to add GitHub webhook for GitHubRepositoryName[host=github.com,username=doublesharp,repository=PRIVATE_PROJECT]
java.lang.NullPointerException: There is no credentials with admin access to manage hooks on GitHubRepositoryName[host=github.com,username=doublesharp,repository=PRIVATE_PROJECT]
	at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:231)
	at org.jenkinsci.plugins.github.webhook.WebhookManager$2.applyNullSafe(WebhookManager.java:156)
	at org.jenkinsci.plugins.github.webhook.WebhookManager$2.applyNullSafe(WebhookManager.java:152)
	at org.jenkinsci.plugins.github.util.misc.NullSafeFunction.apply(NullSafeFunction.java:18)
```

Copy link
Copy Markdown
Member

So it changes behaviour, now instead exception it will return null. May be good, but not sure how change will influence on plugins

Copy link
Copy Markdown
Member

btw, #206 may be related

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL