cdxf opened a new issue, #1600:
URL: https://github.com/apache/incubator-fury/issues/1600

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/incubator-fury/issues) and found no similar 
issues.
   
   
   ### Version
   
   0.5.0
   
   ### Component(s)
   
   Java
   
   ### Minimal reproduce step
   
   I have the following code:
   ```
   //Fury Configuration
       public static ThreadSafeFury fury = new ThreadLocalFury(classLoader -> {
           Fury f = Fury.builder()
                   .requireClassRegistration(false)
                   .withRefTracking(true)
                   .withAsyncCompilation(true)
                   .withCompatibleMode(CompatibleMode.SCHEMA_CONSISTENT)
                   .withJdkClassSerializableCheck(false)
                   
.withLanguage(Language.JAVA).withClassLoader(classLoader).build();
           f.register(CircularFifoQueue.class);
   
   // Function 
   public T get(String key) {
               try {
                   return (T) fury.deserialize(bytes);
               } catch (Exception ex) {
                   logger.error("Error deserializing object", ex);
                   return null;
               }
   }
   ... later
   
           Queue<Long> result = get(...);
   
   ```
   
   
   
   
   ### What did you expect to see?
   
   Fury should throw Exception (which is what I am expecting when upgrading to 
new version and Fury failed to deserialize the byte[] from the old version) 
instead of silently deserialize the bytes into 
UnexistedClassSerializers$UnexistedSkipClass
   
   ### What did you see instead?
   
   It works fine in Fury 0.4.1, but since I upgraded to 0.5.0, my app throws 
the following errors:
   
   > java.lang.ClassCastException: class 
org.apache.fury.serializer.UnexistedClassSerializers$UnexistedSkipClass cannot 
be cast to class java.util.Queue 
(org.apache.fury.serializer.UnexistedClassSerializers$UnexistedSkipClass is in 
unnamed module of loader 
org.springframework.boot.loader.launch.LaunchedClassLoader @1d56ce6a; 
java.util.Queue is in module java.base of loader 'bootstrap')
   
   ### Anything Else?
   
   If it is expected behavior, where should I look at in the documentation.
   What should I do instead? Is there any configuration I can change to make it 
throw Exception instead of returning UnexistedSkipClass
   
   ### Are you willing to submit a PR?
   
   - [ ] I'm willing to submit a PR!


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to