mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-07-15 06:43:32 +00:00
Merge branch '6.2.x'
This commit is contained in:
commit
1daa9e27e2
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -15,3 +15,4 @@
|
|||||||
*.otg binary
|
*.otg binary
|
||||||
*.png binary
|
*.png binary
|
||||||
*.hsx binary
|
*.hsx binary
|
||||||
|
*.serialized binary
|
||||||
|
@ -227,7 +227,7 @@ class SpringSecurityCoreVersionSerializableTests {
|
|||||||
@Disabled("This method should only be used to serialize the classes once")
|
@Disabled("This method should only be used to serialize the classes once")
|
||||||
void serializeCurrentVersionClasses(Class<?> clazz) throws Exception {
|
void serializeCurrentVersionClasses(Class<?> clazz) throws Exception {
|
||||||
Files.createDirectories(currentVersionFolder);
|
Files.createDirectories(currentVersionFolder);
|
||||||
Path filePath = Paths.get(currentVersionFolder.toAbsolutePath() + "/" + clazz.getName());
|
Path filePath = Paths.get(currentVersionFolder.toAbsolutePath() + "/" + clazz.getName() + ".serialized");
|
||||||
File file = filePath.toFile();
|
File file = filePath.toFile();
|
||||||
if (file.exists()) {
|
if (file.exists()) {
|
||||||
return;
|
return;
|
||||||
@ -252,7 +252,7 @@ class SpringSecurityCoreVersionSerializableTests {
|
|||||||
try (FileInputStream fileInputStream = new FileInputStream(filePath.toFile());
|
try (FileInputStream fileInputStream = new FileInputStream(filePath.toFile());
|
||||||
ObjectInputStream objectInputStream = new ObjectInputStream(fileInputStream)) {
|
ObjectInputStream objectInputStream = new ObjectInputStream(fileInputStream)) {
|
||||||
Object obj = objectInputStream.readObject();
|
Object obj = objectInputStream.readObject();
|
||||||
Class<?> clazz = Class.forName(filePath.getFileName().toString());
|
Class<?> clazz = Class.forName(filePath.getFileName().toString().replace(".serialized", ""));
|
||||||
assertThat(obj).isInstanceOf(clazz);
|
assertThat(obj).isInstanceOf(clazz);
|
||||||
}
|
}
|
||||||
catch (IOException | ClassNotFoundException ex) {
|
catch (IOException | ClassNotFoundException ex) {
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user