You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2019/07/02 20:40:47 UTC
[tomcat] 01/02: Fix some SpotBugs issues in the tests
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 8fcfb847a950f0bcc09a617faf0739826878247e
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed Nov 29 22:06:40 2017 +0000
Fix some SpotBugs issues in the tests
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1816655 13f79535-47bb-0310-9956-ffa450edef68
---
.../catalina/authenticator/jaspic/TestAuthConfigFactoryImpl.java | 8 ++++++--
.../authenticator/jaspic/TestPersistentProviderRegistrations.java | 4 +++-
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/test/org/apache/catalina/authenticator/jaspic/TestAuthConfigFactoryImpl.java b/test/org/apache/catalina/authenticator/jaspic/TestAuthConfigFactoryImpl.java
index 5b8ce77..38fff7b 100644
--- a/test/org/apache/catalina/authenticator/jaspic/TestAuthConfigFactoryImpl.java
+++ b/test/org/apache/catalina/authenticator/jaspic/TestAuthConfigFactoryImpl.java
@@ -321,7 +321,9 @@ public class TestAuthConfigFactoryImpl {
System.setProperty(Globals.CATALINA_BASE_PROP, "test");
if (TEST_CONFIG_FILE.exists()) {
- TEST_CONFIG_FILE.delete();
+ if (!TEST_CONFIG_FILE.delete()) {
+ Assert.fail("Failed to delete " + TEST_CONFIG_FILE);
+ }
}
}
@@ -335,7 +337,9 @@ public class TestAuthConfigFactoryImpl {
}
if (TEST_CONFIG_FILE.exists()) {
- TEST_CONFIG_FILE.delete();
+ if (!TEST_CONFIG_FILE.delete()) {
+ Assert.fail("Failed to delete " + TEST_CONFIG_FILE);
+ }
}
}
diff --git a/test/org/apache/catalina/authenticator/jaspic/TestPersistentProviderRegistrations.java b/test/org/apache/catalina/authenticator/jaspic/TestPersistentProviderRegistrations.java
index 43fcc61..d198777 100644
--- a/test/org/apache/catalina/authenticator/jaspic/TestPersistentProviderRegistrations.java
+++ b/test/org/apache/catalina/authenticator/jaspic/TestPersistentProviderRegistrations.java
@@ -126,7 +126,9 @@ public class TestPersistentProviderRegistrations {
validateNoLayerAndAC(loadedProviders);
} finally {
if (f.exists()) {
- f.delete();
+ if (!f.delete()) {
+ Assert.fail("Failed to delete " + f);
+ }
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org