- changed status to resolved
TCPConnection
I know the code is tested and is functional. So this is awkward for me to say.
The constructor for TCP connection is doing alot here, creating the object itself and registering compression managers by creating a closure. Perhaps a Factory pattern is better suited here. I know Java 8 allows cool syntactic sugar, but creation and registration are two different actions and should be written as such. I see the convenience of scoped variable inputStream, and outputStream but it may be better of as a parameter to be passed within a Factory pattern, where Connection and registration of compression manager is done.
Comments (4)
-
repo owner -
Does it really make any sense to be able to create uninitialized TCPConnections? I would assume that it actually just opens the possibility to induce hard to track failures by uninitialized connections.
-
repo owner Compression and Stream Management are optional anyway. Furthermore this is all package-private stuff, so I don't see any harm here.
-
repo owner - changed status to closed
- Log in to comment
Separate construction and initialization of TcpConnection.
Fixes Issue
#54.→ <<cset 61ef54ea4828>>