diff options
author | Jose <jose@zeroc.com> | 2011-04-13 14:50:10 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2011-04-13 14:50:10 +0200 |
commit | 0eb8d99e1e2938171e548be54ca327fd722679e9 (patch) | |
tree | 226bfb56afd978c2ca20e714ecaf2f99a926bc9c /java/src | |
parent | 4851 - slice2cpp bug for string literals (diff) | |
download | ice-0eb8d99e1e2938171e548be54ca327fd722679e9.tar.bz2 ice-0eb8d99e1e2938171e548be54ca327fd722679e9.tar.xz ice-0eb8d99e1e2938171e548be54ca327fd722679e9.zip |
4780 - Buffer class should reset _capacity if the buffer can't be allocated
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/IceInternal/Buffer.java | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/java/src/IceInternal/Buffer.java b/java/src/IceInternal/Buffer.java index 8a7b8713dc4..a98d5fc7ad0 100644 --- a/java/src/IceInternal/Buffer.java +++ b/java/src/IceInternal/Buffer.java @@ -161,6 +161,7 @@ public class Buffer } catch(OutOfMemoryError ex) { + _capacity = b.capacity(); // Restore the previous capacity. throw new Ice.MarshalException("OutOfMemoryError occurred while allocating a ByteBuffer", ex); } } |