mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-02-23 10:55:10 +01:00
Prefer checking isEmpty over size() > 0. Plus fix some typos
Former-commit-id: 754f300c0b120c0c9098c17c19dbd11aa7a39844
This commit is contained in:
@@ -701,7 +701,7 @@ public abstract class BaseDependencyCheckMojo extends AbstractMojo implements Ma
|
||||
private Proxy getMavenProxy() {
|
||||
if (mavenSettings != null) {
|
||||
final List<Proxy> proxies = mavenSettings.getProxies();
|
||||
if (proxies != null && proxies.size() > 0) {
|
||||
if (proxies != null && !proxies.isEmpty()) {
|
||||
if (mavenSettingsProxyId != null) {
|
||||
for (Proxy proxy : proxies) {
|
||||
if (mavenSettingsProxyId.equalsIgnoreCase(proxy.getId())) {
|
||||
@@ -711,8 +711,8 @@ public abstract class BaseDependencyCheckMojo extends AbstractMojo implements Ma
|
||||
} else if (proxies.size() == 1) {
|
||||
return proxies.get(0);
|
||||
} else {
|
||||
LOGGER.warning("Multiple proxy defentiions exist in the Maven settings. In the dependency-check "
|
||||
+ "configuration set the maveSettingsProxyId so that the correct proxy will be used.");
|
||||
LOGGER.warning("Multiple proxy definitions exist in the Maven settings. In the dependency-check "
|
||||
+ "configuration set the mavenSettingsProxyId so that the correct proxy will be used.");
|
||||
throw new IllegalStateException("Ambiguous proxy definition");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user