@@ -85,23 +85,24 @@ public void simpleScalarDeserializationIsOk() {
85
85
* number, type AND ORDER. However, the equality between the original and the deserialized object is then
86
86
* not given, as the class of the object is taken into account. This behaviour is considered to be correct.
87
87
*/
88
+ @ SuppressWarnings ("AssertBetweenInconvertibleTypes" )
88
89
@ Test
89
90
public void deserializationIntoDifferentTbWorks () {
90
- /* This shows cross-deserialization: Into another tensoribacked with the same dimensions.*/
91
+ /* This shows cross-deserialization: Into another tensorbacked with the same dimensions.*/
91
92
AnInterfaceTensorbacked val = simpleGson .fromJson (JSON_STRING , AnInterfaceTensorbacked .class );
92
93
assertThat (val ).isNotNull ();
93
94
94
95
/* The tensorbacked objects are not equal in this case ....*/
95
96
assertThat (val ).isNotEqualTo (TENSORBACKED );
96
97
97
- /* However, the underlaying tensors are ...*/
98
+ /* However, the underlying tensors are ...*/
98
99
assertThat (val .tensor ()).isEqualTo (TENSORBACKED .tensor ());
99
100
}
100
101
101
102
/**
102
103
* The context is not serialized or deserialized currently. This is demonstrated here.
103
104
* Can be discussed, if this is good behaviour.... tricky to change anyhow, as the context
104
- * dimensions are not well defined by a tensorbacked.
105
+ * dimensions are not well- defined by a tensorbacked.
105
106
*/
106
107
@ Test
107
108
public void contextIsNotSerialized () {
@@ -137,9 +138,6 @@ public void complexCoordinateSerializationWithComplexMapKeySupport() {
137
138
String string = complexMapKeyGson .toJson (COMPLEX_COORD_TB );
138
139
System .out .println (string );
139
140
assertThat (string ).isEqualTo (COMPLEX_COORD_JSON_STRING );
140
-
141
- /* deserialization works, no matter if the flag is set or not */
142
- AComplexCoordTensorbacked deserialized = simpleGson .fromJson (string , AComplexCoordTensorbacked .class );
143
141
}
144
142
145
143
@ Test
@@ -163,16 +161,16 @@ public AnInheritedTensorbacked(Tensor<Double> tensor) {
163
161
164
162
}
165
163
166
- public static interface AnInterfaceTensorbacked extends Tensorbacked2d <String , Integer , Double > {
164
+ public interface AnInterfaceTensorbacked extends Tensorbacked2d <String , Integer , Double > {
167
165
168
166
}
169
167
170
- public static interface AComplexCoordTensorbacked extends Tensorbacked1d <Pair , Double > {
168
+ public interface AComplexCoordTensorbacked extends Tensorbacked1d <Pair , Double > {
171
169
172
170
}
173
171
174
- public static enum AB {
175
- A , B
172
+ public enum AB {
173
+ A
176
174
}
177
175
178
176
public static class Pair {
0 commit comments