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

Commit 1384dd2

Browse files
committed
More information if header name/value missing #174
1 parent e643e48 commit 1384dd2

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,15 @@ Changelog of Pull Request Notifier for Bitbucket.
2222

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

25+
### GitHub [#174](https://github.com/tomasbjerre/pull-request-notifier-for-bitbucket/issues/174) java.lang.NullPointerException: null
26+
More information if header name/value missing
27+
28+
[82765ba693e04cd](https://github.com/tomasbjerre/pull-request-notifier-for-bitbucket/commit/82765ba693e04cd) Tomas Bjerre *2016-12-26 21:18:18*
29+
2530
### GitHub [#57](https://github.com/tomasbjerre/pull-request-notifier-for-bitbucket/issues/57) Trigger button: confirmation dialog
2631
Adding optional confirmation text to buttons
2732

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

3035
### No issue
3136
Add interactive forms to buttons

src/main/java/se/bjurr/prnfb/settings/PrnfbHeader.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ public class PrnfbHeader {
1010
private final String value;
1111

1212
public PrnfbHeader(String name, String value) {
13-
this.name = checkNotNull(emptyToNull(nullToEmpty(name).trim()));
14-
this.value = checkNotNull(emptyToNull(nullToEmpty(value).trim()));
13+
this.name = checkNotNull(emptyToNull(nullToEmpty(name).trim()), "Header name must be set");
14+
this.value = checkNotNull(emptyToNull(nullToEmpty(value).trim()), "Header value must be set");
1515
}
1616

1717
@Override
@@ -55,8 +55,8 @@ public String getValue() {
5555
public int hashCode() {
5656
final int prime = 31;
5757
int result = 1;
58-
result = prime * result + ((this.name == null) ? 0 : this.name.hashCode());
59-
result = prime * result + ((this.value == null) ? 0 : this.value.hashCode());
58+
result = prime * result + (this.name == null ? 0 : this.name.hashCode());
59+
result = prime * result + (this.value == null ? 0 : this.value.hashCode());
6060
return result;
6161
}
6262

src/main/resources/admin.vm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,19 +242,19 @@
242242
<div class="field-group">
243243
<aui-toggle id="confirmation" label="Confirmation Dialog" name="confirmation"></aui-toggle>
244244
<label>Confirmation </label>
245-
<div class="description">Whether to show a confirmation dialog.</div>
245+
<div class="description">Whether to show a confirmation dialog after notifications are triggered.</div>
246246
</div>
247247

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

254254
<div class="field-group">
255255
<label>Button Form</label>
256256
<textarea class="textarea" rows="6" name="buttonFormListString"></textarea>
257-
<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>
257+
<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>
258258
</div>
259259

260260
<div class="aui-buttons">

0 commit comments

Comments
 (0)