Skip to content

Commit

Permalink
chore: update Jakarta / JAXB libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
bobeal committed Jan 26, 2025
1 parent 5c52fe9 commit 814bac7
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 15 deletions.
8 changes: 4 additions & 4 deletions nifi-file-identity-provider/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,12 @@
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>2.3.3</version>
<version>4.0.2</version>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<version>2.3.9</version>
<version>4.0.5</version>
</dependency>
</dependencies>
</profile>
Expand Down Expand Up @@ -150,12 +150,12 @@
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>2.3.3</version>
<version>4.0.2</version>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<version>2.3.9</version>
<version>4.0.5</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;

import jakarta.xml.bind.*;
import javax.xml.XMLConstants;
import javax.xml.bind.*;
import javax.xml.transform.stream.StreamSource;
import javax.xml.validation.Schema;
import javax.xml.validation.SchemaFactory;
Expand Down Expand Up @@ -176,9 +176,7 @@ public boolean checkPassword(String userName, String rawPassword) {
UserCredentials userCreds = findUser(userName);
if (userCreds != null) {
final String hashedPassword = userCreds.getPasswordHash();
if (encoder.matches(rawPassword, hashedPassword)){
return true;
}
return encoder.matches(rawPassword, hashedPassword);
}
return false;
}
Expand All @@ -188,8 +186,7 @@ public boolean removeUser(String userName) {
if (userCreds != null) {
UserCredentialsList credentialsList = getCredentialsList();
List<UserCredentials> usersList = credentialsList.getUser();
boolean removed = usersList.remove(userCreds);
return removed;
return usersList.remove(userCreds);
}
return false;
}
Expand All @@ -208,8 +205,7 @@ public void save(File saveFile) throws Exception {
}

public void save(String saveFilePath) throws Exception {
File saveFile = new File(saveFilePath);
credentialsFile = saveFile;
credentialsFile = new File(saveFilePath);
save();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import org.apache.commons.io.FileUtils;
import org.junit.jupiter.api.Test;

import javax.xml.bind.UnmarshalException;
import jakarta.xml.bind.UnmarshalException;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.InvalidObjectException;
Expand Down Expand Up @@ -51,7 +51,7 @@ public void testLoadCredentialsFile() throws Exception {
final List<UserCredentials> users = credentials.getUser();
assertEquals(2, users.size());

final UserCredentials userCred = users.get(0);
final UserCredentials userCred = users.getFirst();
assertEquals("user1", userCred.getName());
assertEquals("fakePasswordHash", userCred.getPasswordHash());
}
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId>
<version>2.5.0</version>
<version>3.2.0</version>
</plugin>
</plugins>
</pluginManagement>
Expand Down

0 comments on commit 814bac7

Please sign in to comment.