Skip to content

Commit

Permalink
Bump com.github.spotbugs from 6.1.0 to 6.1.2 and fix newly identified…
Browse files Browse the repository at this point in the history
… issues
  • Loading branch information
GregDThomas committed Jan 25, 2025
1 parent 03453b1 commit d156928
Show file tree
Hide file tree
Showing 8 changed files with 113 additions and 59 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ plugins {
id 'java-library'
id 'maven-publish'
id 'checkstyle'
id 'com.github.spotbugs' version '6.1.0'
id 'com.github.ben-manes.versions' version '0.51.0'
id 'com.github.spotbugs' version '6.1.2'
id 'com.github.ben-manes.versions' version '0.52.0'
}

ext {
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.io.File;
import java.net.URL;
import lombok.SneakyThrows;
import org.jivesoftware.openfire.IQRouter;
import org.jivesoftware.openfire.XMPPServer;
import org.jivesoftware.openfire.XMPPServerInfo;
Expand All @@ -32,7 +33,8 @@ private Fixtures() {
* JiveGlobals#setProperty(String, String)} etc. to work (and persist) in test classes without
* errors being displayed to stderr. Ideally should be called in a {@link BeforeAll} method.
*/
public static void reconfigureOpenfireHome() throws Exception {
@SneakyThrows
public static void reconfigureOpenfireHome() {
final URL configFile = ClassLoader.getSystemResource("conf/openfire.xml");
if (configFile == null) {
throw new IllegalStateException(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class PasswordResetMailerTest {

@BeforeAll
@SuppressWarnings("deprecation")
static void beforeAll() throws Exception {
static void beforeAll() {
Fixtures.reconfigureOpenfireHome();
XMPPServer.setInstance(Fixtures.mockXmppServer());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.util.Date;
import lombok.SneakyThrows;
import org.jivesoftware.openfire.XMPPServer;
import org.jivesoftware.openfire.user.User;
import org.junit.jupiter.api.BeforeAll;
Expand All @@ -31,7 +32,7 @@ class PasswordResetTokenManagerTest {

@BeforeAll
@SuppressWarnings("deprecation")
static void beforeAll() throws Exception {
static void beforeAll() {
Fixtures.reconfigureOpenfireHome();
XMPPServer.setInstance(Fixtures.mockXmppServer());
}
Expand All @@ -45,7 +46,8 @@ static void beforeAll() throws Exception {
"ODR_OPEN_DATABASE_RESOURCE",
"RV_RETURN_VALUE_IGNORED"},
justification = "All false positives!")
void setUp() throws Exception {
@SneakyThrows
void setUp() {
Fixtures.reconfigureOpenfireHome();

user = new User("test-username", "Test User", "[email protected]", new Date(), new Date());
Expand All @@ -61,7 +63,8 @@ void setUp() throws Exception {
@SuppressFBWarnings(
value = {"UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR"},
justification = "False positive")
void willGenerateRandomTokenForUser() throws Exception {
@SneakyThrows
void willGenerateRandomTokenForUser() {
final String token1 = resetTokenManager.generateToken(user, "localhost");
final String token2 = resetTokenManager.generateToken(user, "localhost");

Expand Down
Loading

0 comments on commit d156928

Please sign in to comment.