mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-10-05 22:49:02 +00:00
Polishing contribution
Closes gh-35625
This commit is contained in:
+7
@@ -31,10 +31,17 @@ package org.springframework.core.io.buffer;
|
||||
public class DataBufferLimitException extends IllegalStateException {
|
||||
|
||||
|
||||
/**
|
||||
* Create an instance with the given message.
|
||||
*/
|
||||
public DataBufferLimitException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance with a message and a cause, e.g. {@link OutOfMemoryError}.
|
||||
* @since 6.2.12
|
||||
*/
|
||||
public DataBufferLimitException(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
}
|
||||
|
||||
@@ -383,7 +383,8 @@ public class NettyDataBuffer implements PooledDataBuffer {
|
||||
return this.byteBuf.toString();
|
||||
}
|
||||
catch (OutOfMemoryError ex) {
|
||||
throw new DataBufferLimitException("Failed to convert data buffer to string: " + ex.getMessage(), ex);
|
||||
throw new DataBufferLimitException(
|
||||
"Failed to convert data buffer to string: " + ex.getMessage(), ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user