Skip to content

Commit

Permalink
Fix NullPointer Exception (#9)
Browse files Browse the repository at this point in the history
Fixes #8
  • Loading branch information
aensley authored Jul 31, 2019
1 parent d9206a6 commit d29a81f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
Binary file not shown.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.andrewensley.sonarteamsnotifier</groupId>
<artifactId>sonar-teams-notifier</artifactId>
<version>1.1.1</version>
<version>1.1.2</version>

<packaging>sonar-plugin</packaging>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,12 +287,14 @@ private int getPort() {
*/
private String getPath() {
String tempPath = hook.getPath();
if (!hook.getQuery().isEmpty()) {
tempPath += "?" + hook.getQuery();
String query = hook.getQuery();
if (query != null && !query.isEmpty()) {
tempPath += "?" + query;
}

if (!hook.getRef().isEmpty()) {
tempPath += "#" + hook.getRef();
String ref = hook.getRef();
if (ref != null && !ref.isEmpty()) {
tempPath += "#" + ref;
}

return tempPath;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public void finished(final ProjectAnalysis analysis) {
return;
}

LOG.info("Teams notification URLL " + hook);
LOG.info("Teams notification URL: " + hook);
LOG.info("Teams notification message: " + analysis.toString());

Payload payload = PayloadBuilder.of(analysis)
Expand Down

0 comments on commit d29a81f

Please sign in to comment.