Skip to content

Commit e2bab7b

Browse files
Add .serialized suffix and consider them as binary in Git
Issue gh-3737
1 parent 4fb6a33 commit e2bab7b

File tree

52 files changed

+3
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+3
-2
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@
1515
*.otg binary
1616
*.png binary
1717
*.hsx binary
18+
*.serialized binary

config/src/test/java/org/springframework/security/SpringSecurityCoreVersionSerializableTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ class SpringSecurityCoreVersionSerializableTests {
227227
@Disabled("This method should only be used to serialize the classes once")
228228
void serializeCurrentVersionClasses(Class<?> clazz) throws Exception {
229229
Files.createDirectories(currentVersionFolder);
230-
Path filePath = Paths.get(currentVersionFolder.toAbsolutePath() + "/" + clazz.getName());
230+
Path filePath = Paths.get(currentVersionFolder.toAbsolutePath() + "/" + clazz.getName() + ".serialized");
231231
File file = filePath.toFile();
232232
if (file.exists()) {
233233
return;
@@ -253,7 +253,7 @@ void shouldBeAbleToDeserializeClassFromPreviousVersion(Path filePath) {
253253
try (FileInputStream fileInputStream = new FileInputStream(filePath.toFile());
254254
ObjectInputStream objectInputStream = new ObjectInputStream(fileInputStream)) {
255255
Object obj = objectInputStream.readObject();
256-
Class<?> clazz = Class.forName(filePath.getFileName().toString());
256+
Class<?> clazz = Class.forName(filePath.getFileName().toString().replace(".serialized", ""));
257257
assertThat(obj).isInstanceOf(clazz);
258258
}
259259
catch (IOException | ClassNotFoundException ex) {

0 commit comments

Comments
 (0)