wuwangben opened a new issue, #2686:
URL: https://github.com/apache/fory/issues/2686

   ### Search before asking
   
   - [x] I had searched in the [issues](https://github.com/apache/fory/issues) 
and found no similar issues.
   
   
   ### Version
   
   Version
   org.apache.fory:fory-core:0.12.2
   JDK 21
   
   Component(s)
   Java
   
   Minimal reproduce step
   
   
   What did you see instead?
   Image
   Anything Else?
   No response
   
   这样修改问题解决
   
   
   ### Component(s)
   
   Java
   
   ### Minimal reproduce step
   
   样例代码:
   inStream = LZ4BlockInputStream()
   private[this] var input: ForyInputStream = new ForyInputStream(inStream)
   private[this] var fory: ThreadSafeFory = 
serInstance.getSerializer.getThreadSafeFory()
   override def readObject[T: ClassTag](): T = {
       checkNotClosed()
       fory.deserialize(input).asInstanceOf[T]
     }
   当对象大小超过32768就会报错,位置如图:
   <img width="868" height="283" alt="Image" 
src="https://github.com/user-attachments/assets/950365af-c6e7-489c-83e7-472600980737";
 />
   这中类似LZ4的分块的流应该都会有问题
   
   ### What did you expect to see?
   
   正常序列化这种大对象
   
   ### What did you see instead?
   
     private void throwOOBExceptionForRange(int offset, int length) {
       throw new IndexOutOfBoundsException(
           String.format("offset(%d) + length(%d) exceeds size(%d): %s", 
offset, length, size, this));
     }
   
   ### Anything Else?
   
   这样修改问题解决
   <img width="1710" height="629" alt="Image" 
src="https://github.com/user-attachments/assets/17fc747d-0e34-4c5b-a264-6354d643888e";
 />
   
   ### 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