Simplify conditionals

See gh-39259
This commit is contained in:
Tobias Lippert
2024-01-21 18:44:32 +01:00
committed by Phillip Webb
parent def7523398
commit 65a1ff84e6
8 changed files with 11 additions and 11 deletions

View File

@@ -207,7 +207,7 @@ final class JarUrlConnection extends java.net.JarURLConnection {
@Override
public boolean getAllowUserInteraction() {
return (this.jarFileConnection != null) ? this.jarFileConnection.getAllowUserInteraction() : false;
return this.jarFileConnection != null && this.jarFileConnection.getAllowUserInteraction();
}
@Override
@@ -219,7 +219,7 @@ final class JarUrlConnection extends java.net.JarURLConnection {
@Override
public boolean getUseCaches() {
return (this.jarFileConnection != null) ? this.jarFileConnection.getUseCaches() : true;
return this.jarFileConnection == null || this.jarFileConnection.getUseCaches();
}
@Override
@@ -231,7 +231,7 @@ final class JarUrlConnection extends java.net.JarURLConnection {
@Override
public boolean getDefaultUseCaches() {
return (this.jarFileConnection != null) ? this.jarFileConnection.getDefaultUseCaches() : true;
return this.jarFileConnection == null || this.jarFileConnection.getDefaultUseCaches();
}
@Override