> On Mar 9, 2023, at 22:52, Christopher Schultz <ch...@christopherschultz.net> 
> wrote:
> 
> All,
> 
> Please have a look at DataSourceStore.java:629
> 
> https://github.com/apache/tomcat/blob/main/java/org/apache/catalina/session/DataSourceStore.java#L629
> 
> It looks to be like the byte array which contains the session data is being 
> first wrapped in a ByteArrayInputStream (which is necessary to robustly 
> supply the data to the JDBC driver), and then again in a BufferedInputStream.
> 
> I don't see a need for this second wrapper. IMO it just adds overhead because 
> the underlying data is just byte[]. Copying that data to another buffer 
> doesn't improve anything.
> 
> I'd like to remove this additional wrapper unless someone can provide a 
> justification for the double-wrapping.
+1

Indeed, It doesn’t seem to improve anything.

> 
> Thanks,
> -chris
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to