arturobernalg commented on a change in pull request #123:
URL: https://github.com/apache/commons-geometry/pull/123#discussion_r547384785
##########
File path:
commons-geometry-core/src/test/java/org/apache/commons/geometry/core/GeometryTestUtils.java
##########
@@ -100,28 +96,9 @@ public static void assertSimpleEqualsCases(final Object
obj) {
Assertions.assertFalse(obj.equals(new Object()), "Object should
not equal an instance of different type");
}
- Assertions.assertTrue(obj.equals(obj), "Object should equal itself");
- }
+ Assertions.assertTrue(obj.
- /**
- * Serializes and then recovers an object from a byte array. Returns the
deserialized object.
- *
- * @param obj object to serialize and recover
- * @return the recovered, deserialized object
- */
- public static Object serializeAndRecover(final Object obj) {
- try {
- // serialize the Object
- final ByteArrayOutputStream bos = new ByteArrayOutputStream();
- final ObjectOutputStream so = new ObjectOutputStream(bos);
- so.writeObject(obj);
- // deserialize the Object
- final ByteArrayInputStream bis = new
ByteArrayInputStream(bos.toByteArray());
- final ObjectInputStream si = new ObjectInputStream(bis);
- return si.readObject();
- } catch (final Exception e) {
- throw new RuntimeException(e);
- }
+ equals(obj), "Object should equal itself");
Review comment:
done
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]