summaryrefslogtreecommitdiff
path: root/java/src
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2011-04-13 14:50:10 +0200
committerJose <jose@zeroc.com>2011-04-13 14:50:10 +0200
commit0eb8d99e1e2938171e548be54ca327fd722679e9 (patch)
tree226bfb56afd978c2ca20e714ecaf2f99a926bc9c /java/src
parent4851 - slice2cpp bug for string literals (diff)
downloadice-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.java1
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);
}
}