Fix unnecessary boxing and incorrect Serializable
Motivation: - AbstractHttp2ConnectionHandlerBuilder.encoderEnforceMaxConcurrentStreams can be the primitive boolean - SpdySession.StreamComparator should not be Serializable since SpdySession is not Serializable Modifications: Use boolean instead and remove Serializable Result: - Minor improvement for AbstractHttp2ConnectionHandlerBuilder - StreamComparator is not Serializable any more
This commit is contained in:
parent
0b16c3c513
commit
0ae6f17285
@ -323,9 +323,7 @@ final class SpdySession {
|
||||
}
|
||||
}
|
||||
|
||||
private final class StreamComparator implements Comparator<Integer>, Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1161471649740544848L;
|
||||
private final class StreamComparator implements Comparator<Integer> {
|
||||
|
||||
StreamComparator() { }
|
||||
|
||||
|
@ -94,7 +94,7 @@ public abstract class AbstractHttp2ConnectionHandlerBuilder<T extends Http2Conne
|
||||
// * OK to use with server() and connection()
|
||||
private Http2FrameLogger frameLogger;
|
||||
private SensitivityDetector headerSensitivityDetector;
|
||||
private Boolean encoderEnforceMaxConcurrentStreams;
|
||||
private boolean encoderEnforceMaxConcurrentStreams;
|
||||
|
||||
/**
|
||||
* Returns if HTTP headers should be validated according to
|
||||
@ -268,7 +268,7 @@ public abstract class AbstractHttp2ConnectionHandlerBuilder<T extends Http2Conne
|
||||
* would otherwise be exceeded.
|
||||
*/
|
||||
protected boolean encoderEnforceMaxConcurrentStreams() {
|
||||
return encoderEnforceMaxConcurrentStreams != null ? encoderEnforceMaxConcurrentStreams : false;
|
||||
return encoderEnforceMaxConcurrentStreams;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user