Skip to content
This repository has been archived by the owner on Jun 9, 2021. It is now read-only.

Commit

Permalink
More information if header name/value missing #174
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasbjerre committed Dec 26, 2016
1 parent e643e48 commit 1384dd2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,15 @@ Changelog of Pull Request Notifier for Bitbucket.

[649638d30d2d32c](https://github.com/tomasbjerre/pull-request-notifier-for-bitbucket/commit/649638d30d2d32c) Tomas Bjerre *2016-12-25 21:46:25*

### GitHub [#174](https://github.com/tomasbjerre/pull-request-notifier-for-bitbucket/issues/174) java.lang.NullPointerException: null
More information if header name/value missing

[82765ba693e04cd](https://github.com/tomasbjerre/pull-request-notifier-for-bitbucket/commit/82765ba693e04cd) Tomas Bjerre *2016-12-26 21:18:18*

### GitHub [#57](https://github.com/tomasbjerre/pull-request-notifier-for-bitbucket/issues/57) Trigger button: confirmation dialog
Adding optional confirmation text to buttons

[b14d86ed8b986ea](https://github.com/tomasbjerre/pull-request-notifier-for-bitbucket/commit/b14d86ed8b986ea) Tomas Bjerre *2016-12-26 21:10:45*
[e643e48a8568afc](https://github.com/tomasbjerre/pull-request-notifier-for-bitbucket/commit/e643e48a8568afc) Tomas Bjerre *2016-12-26 21:16:23*

### No issue
Add interactive forms to buttons
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/se/bjurr/prnfb/settings/PrnfbHeader.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ public class PrnfbHeader {
private final String value;

public PrnfbHeader(String name, String value) {
this.name = checkNotNull(emptyToNull(nullToEmpty(name).trim()));
this.value = checkNotNull(emptyToNull(nullToEmpty(value).trim()));
this.name = checkNotNull(emptyToNull(nullToEmpty(name).trim()), "Header name must be set");
this.value = checkNotNull(emptyToNull(nullToEmpty(value).trim()), "Header value must be set");
}

@Override
Expand Down Expand Up @@ -55,8 +55,8 @@ public String getValue() {
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((this.name == null) ? 0 : this.name.hashCode());
result = prime * result + ((this.value == null) ? 0 : this.value.hashCode());
result = prime * result + (this.name == null ? 0 : this.name.hashCode());
result = prime * result + (this.value == null ? 0 : this.value.hashCode());
return result;
}

Expand Down
6 changes: 3 additions & 3 deletions src/main/resources/admin.vm
Original file line number Diff line number Diff line change
Expand Up @@ -242,19 +242,19 @@
<div class="field-group">
<aui-toggle id="confirmation" label="Confirmation Dialog" name="confirmation"></aui-toggle>
<label>Confirmation </label>
<div class="description">Whether to show a confirmation dialog.</div>
<div class="description">Whether to show a confirmation dialog after notifications are triggered.</div>
</div>

<div class="field-group">
<label>Confirmation message </label>
<input class="text long-field" type="text" name="confirmationText">
<div class="description">If not empty, a confirmation dialog will be shown with this message, before any notification is triggered.</div>
<div class="description">Optional. If not empty, a confirmation dialog will be shown with this message, before any notification is triggered.</div>
</div>

<div class="field-group">
<label>Button Form</label>
<textarea class="textarea" rows="6" name="buttonFormListString"></textarea>
<div class="description">Put a JSON representation of your desired form here. This is documented <a href="https://github.com/tomasbjerre/pull-request-notifier-for-bitbucket" target="_blank">here</a>.</div>
<div class="description">Optional. If not empty, a form will be rendered from this JSON. This is documented <a href="https://github.com/tomasbjerre/pull-request-notifier-for-bitbucket" target="_blank">here</a>.</div>
</div>

<div class="aui-buttons">
Expand Down

0 comments on commit 1384dd2

Please sign in to comment.