fix NPE, update to Gradle 5.3.1, Spotbugs 2.0.0

This commit is contained in:
Jörg Prante 2019-08-07 23:41:28 +02:00
parent 4665353fc7
commit e154bb2cb7
4 changed files with 7 additions and 8 deletions

View file

@ -2,7 +2,7 @@
plugins { plugins {
id "org.sonarqube" version "2.6.1" id "org.sonarqube" version "2.6.1"
id "io.codearte.nexus-staging" version "0.11.0" id "io.codearte.nexus-staging" version "0.11.0"
id "com.github.spotbugs" version "1.6.9" id "com.github.spotbugs" version "2.0.0"
id "org.xbib.gradle.plugin.asciidoctor" version "1.5.6.0.1" id "org.xbib.gradle.plugin.asciidoctor" version "1.5.6.0.1"
} }
@ -10,7 +10,6 @@ subprojects {
apply plugin: 'java' apply plugin: 'java'
apply plugin: 'maven' apply plugin: 'maven'
apply plugin: 'signing'
apply plugin: 'checkstyle' apply plugin: 'checkstyle'
apply plugin: 'com.github.spotbugs' apply plugin: 'com.github.spotbugs'
apply plugin: 'pmd' apply plugin: 'pmd'
@ -63,7 +62,7 @@ subprojects {
systemProperty 'java.net.preferIPv6Addresses', 'true' systemProperty 'java.net.preferIPv6Addresses', 'true'
failFast = false failFast = false
testLogging { testLogging {
events 'PASSED', 'FAILED', 'SKIPPED' events 'STARTED', 'PASSED', 'FAILED', 'SKIPPED'
} }
afterSuite { desc, result -> afterSuite { desc, result ->
if (!desc.parent) { if (!desc.parent) {

View file

@ -1,6 +1,6 @@
#Tue Apr 16 23:50:27 CEST 2019 #Wed Aug 07 23:28:18 CEST 2019
distributionUrl=https\://services.gradle.org/distributions/gradle-5.3.1-all.zip
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.3-all.zip zipStoreBase=GRADLE_USER_HOME

View file

@ -500,7 +500,7 @@ public class URL implements Comparable<URL> {
} }
public URL normalize() { public URL normalize() {
return scheme.normalize(this); return scheme != null ? scheme.normalize(this) : this;
} }
public String toExternalForm() { public String toExternalForm() {

View file

@ -44,7 +44,7 @@ class URLResolverTest {
String pathSpec = "foobar/"; String pathSpec = "foobar/";
String index = "index.html"; String index = "index.html";
String queryString = "a=b"; String queryString = "a=b";
URL url = base.resolve(pathSpec).resolve(index).newBuilder().query(queryString).build().normalize(); URL url = base.resolve(pathSpec).resolve(index).mutator().query(queryString).build().normalize();
assertEquals("http://example:8080/foobar/index.html?a=b", url.toString()); assertEquals("http://example:8080/foobar/index.html?a=b", url.toString());
} }