()
| 44 | // test for class name same with package name: |
| 45 | // https://github.com/janino-compiler/janino/issues/165 |
| 46 | @Test |
| 47 | public void testOrgPackage() { |
| 48 | Fory fory = |
| 49 | Fory.builder() |
| 50 | .withXlang(false) |
| 51 | .withRefTracking(true) |
| 52 | // Allow to deserialize objects unknown types,more flexible but less secure. |
| 53 | .requireClassRegistration(false) |
| 54 | .withDeserializeUnknownClass(true) |
| 55 | .withCompatible(true) |
| 56 | .withRefTracking(true) |
| 57 | .build(); |
| 58 | |
| 59 | // If the class name is not Org, it can be serialized normally |
| 60 | byte[] bytes = fory.serialize(new Org()); |
| 61 | Object o = fory.deserialize(bytes); |
| 62 | Assert.assertEquals(o.getClass(), Org.class); |
| 63 | } |
| 64 | } |
nothing calls this directly
no test coverage detected