mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
Remove accidental usage of com.hazelcast.util.Base64
Closes gh-17461
This commit is contained in:
parent
cc6ef038f2
commit
c5241f0e82
@ -16,7 +16,8 @@
|
||||
|
||||
package org.springframework.boot.autoconfigure.data.neo4j;
|
||||
|
||||
import com.hazelcast.util.Base64;
|
||||
import java.util.Base64;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Test;
|
||||
import org.neo4j.ogm.config.AutoIndexMode;
|
||||
@ -149,10 +150,8 @@ public class Neo4jPropertiesTests {
|
||||
assertThat(credentials).isNotNull();
|
||||
Object content = credentials.credentials();
|
||||
assertThat(content).isInstanceOf(String.class);
|
||||
String[] auth = new String(Base64.decode(((String) content).getBytes())).split(":");
|
||||
assertThat(auth[0]).isEqualTo(username);
|
||||
assertThat(auth[1]).isEqualTo(password);
|
||||
assertThat(auth).hasSize(2);
|
||||
String[] auth = new String(Base64.getDecoder().decode((String) content)).split(":");
|
||||
assertThat(auth).containsExactly(username, password);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
<property name="illegalPkgs"
|
||||
value="^sun.*, ^org\.apache\.commons\.(?!compress|dbcp2|lang|lang3|logging|pool2).*, ^com\.google\.common.*, ^org\.flywaydb\.core\.internal.*, ^org\.testcontainers\.shaded.*" />
|
||||
<property name="illegalClasses"
|
||||
value="^reactor\.core\.support\.Assert, ^org\.junit\.rules\.ExpectedException, ^org\.slf4j\.LoggerFactory" />
|
||||
value="^com\.hazelcast\.util\.Base64, ^org\.junit\.rules\.ExpectedException, ^org\.slf4j\.LoggerFactory, ^reactor\.core\.support\.Assert" />
|
||||
</module>
|
||||
<module
|
||||
name="com.puppycrawl.tools.checkstyle.checks.imports.ImportControlCheck">
|
||||
|
Loading…
Reference in New Issue
Block a user