Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 299871 - java.nio.BufferUnderFlowException
Summary: java.nio.BufferUnderFlowException
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.net4j (show other bugs)
Version: 3.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Eike Stepper CLA
QA Contact: Eike Stepper CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 561532
  Show dependency tree
 
Reported: 2010-01-17 11:11 EST by Andre Dietisheim CLA
Modified: 2020-03-28 04:04 EDT (History)
0 users

See Also:
stepper: review+


Attachments
patch that solves java.nio.BufferUnderFlowException (39.28 KB, patch)
2010-01-17 11:48 EST, Andre Dietisheim CLA
no flags Details | Diff
Patch v2 - DO NOT COMMIT (29.60 KB, patch)
2010-01-18 03:54 EST, Eike Stepper CLA
no flags Details | Diff
Patch v3 - taken from 2.0 (25.37 KB, patch)
2010-01-18 12:53 EST, Eike Stepper CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andre Dietisheim CLA 2010-01-17 11:11:31 EST
Net4J throws BufferUnderFlowExceptions if the data to transfer (payload + metadata) exactly matches the buffer capacity. Net4J erroneously uses 2 buffers (where 1 buffer's sufficient). This issue was already solved for R2_0_maintenance in https://bugs.eclipse.org/bugs/show_bug.cgi?id=262875 and has to be fixed for 3.0 now.
Comment 1 Andre Dietisheim CLA 2010-01-17 11:48:08 EST
Created attachment 156324 [details]
patch that solves java.nio.BufferUnderFlowException
Comment 2 Eike Stepper CLA 2010-01-18 03:54:10 EST
Created attachment 156361 [details]
Patch v2 - DO NOT COMMIT

I refactored a little bit without changing the functionality and then realized that both, your original patch and, hence, my refactored patch do introduce regressions in the CDO tests. They're reproducible.
Comment 3 Eike Stepper CLA 2010-01-18 12:53:40 EST
Created attachment 156416 [details]
Patch v3 - taken from 2.0
Comment 4 Eike Stepper CLA 2010-01-18 12:54:05 EST
Committed to HEAD
Comment 5 Eike Stepper CLA 2010-06-29 04:36:26 EDT
Available in 3.0 GA:
http://download.eclipse.org/modeling/emf/cdo/updates/3.0-releases/