Author: trustin
Date: Mon Nov 5 21:51:12 2007
New Revision: 592295
URL: http://svn.apache.org/viewvc?rev=592295&view=rev
Log:
SslBufferUtil.allocate() obeys IoBuffer.useDirectBuffer property correctly.
Modified:
mina/trunk/core/src/main/java/org/apache/mina/filter/ssl/SslBufferUtil.java
Modified:
mina/trunk/core/src/main/java/org/apache/mina/filter/ssl/SslBufferUtil.java
URL:
http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/filter/ssl/SslBufferUtil.java?rev=592295&r1=592294&r2=592295&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/filter/ssl/SslBufferUtil.java
(original)
+++ mina/trunk/core/src/main/java/org/apache/mina/filter/ssl/SslBufferUtil.java
Mon Nov 5 21:51:12 2007
@@ -110,17 +110,9 @@
private static ByteBuffer createBuffer(int capacity) {
if (IoBuffer.isUseDirectBuffer()) {
- try {
- return ByteBuffer.allocateDirect(capacity);
- } catch (OutOfMemoryError e) {
- return ByteBuffer.allocate(capacity);
- }
+ return ByteBuffer.allocateDirect(capacity);
} else {
- try {
- return ByteBuffer.allocate(capacity);
- } catch (OutOfMemoryError e) {
- return ByteBuffer.allocateDirect(capacity);
- }
+ return ByteBuffer.allocate(capacity);
}
}
}