1
1
/*
2
- * Copyright 2002-2022 the original author or authors.
2
+ * Copyright 2002-2024 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
62
62
*/
63
63
public abstract class DataBufferUtils {
64
64
65
- private final static Log logger = LogFactory .getLog (DataBufferUtils .class );
65
+ private static final Log logger = LogFactory .getLog (DataBufferUtils .class );
66
66
67
67
private static final Consumer <DataBuffer > RELEASE_CONSUMER = DataBufferUtils ::release ;
68
68
@@ -728,7 +728,7 @@ private interface NestedMatcher extends Matcher {
728
728
*/
729
729
private static class SingleByteMatcher implements NestedMatcher {
730
730
731
- static SingleByteMatcher NEWLINE_MATCHER = new SingleByteMatcher (new byte [] {10 });
731
+ static final SingleByteMatcher NEWLINE_MATCHER = new SingleByteMatcher (new byte [] {10 });
732
732
733
733
private final byte [] delimiter ;
734
734
@@ -767,7 +767,7 @@ public void reset() {
767
767
/**
768
768
* Base class for a {@link NestedMatcher}.
769
769
*/
770
- private static abstract class AbstractNestedMatcher implements NestedMatcher {
770
+ private abstract static class AbstractNestedMatcher implements NestedMatcher {
771
771
772
772
private final byte [] delimiter ;
773
773
@@ -1005,11 +1005,11 @@ public void completed(Integer read, DataBuffer dataBuffer) {
1005
1005
}
1006
1006
1007
1007
@ Override
1008
- public void failed (Throwable exc , DataBuffer dataBuffer ) {
1008
+ public void failed (Throwable ex , DataBuffer dataBuffer ) {
1009
1009
release (dataBuffer );
1010
1010
closeChannel (this .channel );
1011
1011
this .state .set (State .DISPOSED );
1012
- this .sink .error (exc );
1012
+ this .sink .error (ex );
1013
1013
}
1014
1014
1015
1015
private enum State {
@@ -1064,7 +1064,6 @@ protected void hookOnComplete() {
1064
1064
public Context currentContext () {
1065
1065
return Context .of (this .sink .contextView ());
1066
1066
}
1067
-
1068
1067
}
1069
1068
1070
1069
@@ -1145,9 +1144,9 @@ else if (this.completed.get()) {
1145
1144
}
1146
1145
1147
1146
@ Override
1148
- public void failed (Throwable exc , ByteBuffer byteBuffer ) {
1147
+ public void failed (Throwable ex , ByteBuffer byteBuffer ) {
1149
1148
sinkDataBuffer ();
1150
- this .sink .error (exc );
1149
+ this .sink .error (ex );
1151
1150
}
1152
1151
1153
1152
private void sinkDataBuffer () {
@@ -1161,7 +1160,6 @@ private void sinkDataBuffer() {
1161
1160
public Context currentContext () {
1162
1161
return Context .of (this .sink .contextView ());
1163
1162
}
1164
-
1165
1163
}
1166
1164
1167
1165
}
0 commit comments