File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed
main/java/org/hibernate/search/util/common/serialization/spi
test/java/org/hibernate/search/util/common/serialization/spi Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change 10
10
import java .io .ObjectInputStream ;
11
11
import java .io .ObjectOutputStream ;
12
12
13
+ @ Deprecated (since = "8.1" , forRemoval = true )
13
14
public final class SerializationUtils {
14
15
15
16
private SerializationUtils () {
Original file line number Diff line number Diff line change
1
+ /*
2
+ * SPDX-License-Identifier: Apache-2.0
3
+ * Copyright Red Hat Inc. and Hibernate Authors
4
+ */
5
+ package org .hibernate .search .util .common .serialization .spi ;
6
+
7
+ import static org .assertj .core .api .Assertions .assertThat ;
8
+
9
+ import java .io .Serializable ;
10
+
11
+ import org .junit .jupiter .api .Test ;
12
+
13
+ @ Deprecated (since = "8.1" , forRemoval = true )
14
+ class SerializationUtilsTest {
15
+
16
+ @ SuppressWarnings ({ "removal" , "deprecation" })
17
+ @ Test
18
+ void smoke () {
19
+ MyRecord test = new MyRecord ( 1 , "smth" );
20
+ byte [] serialized = SerializationUtils .serialize ( test );
21
+
22
+ MyRecord deserialized = SerializationUtils .deserialize ( MyRecord .class , serialized );
23
+ assertThat ( deserialized ).isEqualTo ( test );
24
+ }
25
+
26
+ record MyRecord (int number , String string ) implements Serializable {
27
+ }
28
+ }
You can’t perform that action at this time.
0 commit comments