Search before asking
Version
Fory 1.2.0, JDK 25
Component(s)
Java
Minimal reproduce step
This might just be an unavoidable change as part of a refactor, but as our tests caught it, I thought it would be worth the team/community being aware of - perhaps add a similar test for regression capture.
def "should log error for non-Serializable classes to ensure non-Fory compat"() {
given:
captureLogEvents(SerializableTypeChecker.class)
def fory = Fory.builder()
.withLanguage(Language.JAVA)
.requireClassRegistration(false)
.build()
def checker = SerializableTypeChecker.lenient()
fory.getTypeResolver().setTypeChecker(checker)
when:
def bytes = fory.serialize(new AnyClass())
def result = fory.deserialize(bytes)
logEventLatch.await()
then:
result.value == "test"
logEvents.size() == 1 // Passed in 1.1.0 Now fails with 3 in Fory 1.2.0
logEvents.any { it.level.name() == 'ERROR' }
cleanup:
cleanupLogEvents(LoggingTypeChecker.class)
}
What did you expect to see?
expected type checker to only be called once.
What did you see instead?
Type checker now called 3 times
Anything Else?
No response
Are you willing to submit a PR?
Search before asking
Version
Fory 1.2.0, JDK 25
Component(s)
Java
Minimal reproduce step
This might just be an unavoidable change as part of a refactor, but as our tests caught it, I thought it would be worth the team/community being aware of - perhaps add a similar test for regression capture.
What did you expect to see?
expected type checker to only be called once.
What did you see instead?
Type checker now called 3 times
Anything Else?
No response
Are you willing to submit a PR?