emopers
emopers
In TransportConnection.java:861, the synchronized list returned by cs.getTempDestinations() is iterated in an unsynchronized manner, but according to the [Oracle Java 7 API specification](http://docs.oracle.com/javase/7/docs/api/java/util/Collections.html#synchronizedList%28java.util.List%29), this is not thread-safe and can lead...
When an `ObjectOutputStream` instance wraps an underlying `ByteArrayOutputStream` instance, it is [recommended](http://stackoverflow.com/questions/2984538/how-to-use-bytearrayoutputstream-and-dataoutputstream-simultaneously-java) to flush or close the `ObjectOutputStream` before invoking the underlying instances's `toByteArray()`. This pull request adds a call...
When an `ObjectOutputStream` instance wraps an underlying `ByteArrayOutputStream` instance, it is recommended to flush or close the `ObjectOutputStream` before invoking the underlying instances's `toByteArray()`. Although in these cases it is...
The `TreeBuilder` constructor does not check whether the input string `s` is null before constructing a `StringTokenizer`. This will cause a `NullPointerException` to be thrown according to the [docs](https://docs.oracle.com/javase/7/docs/api/java/util/StringTokenizer.html#StringTokenizer(java.lang.String)). It...
Close/flush the `OutputStream` before calling `toByteArray()` on underlying `ByteArrayOutputStream`
When an `OutputStream` instance wraps an underlying `ByteArrayOutputStream` instance, it is recommended to flush or close the `OutputStream` before invoking the underlying instances' `toByteArray()`. Although in some of these case...
Hybi00Handshake.java calls `java.lang.long.parseLong` without first checking whether the argument parses. This lead to an uncaught `NumberFormateException`: [Oracle Java 7 API specification](http://docs.oracle.com/javase/7/docs/api/java/lang/Long.html#parseLong%28java.lang.String,%20int%29). This pull request adds a check and a test...
`EndianSwitchableOutputStream.java` internally uses DataOutputStream as its stream and when a DataOutputStream instance wraps an underlying ByteArrayOutputStream instance, it is recommended to flush or close the DataOutputStream before invoking the underlying...
When a `DataOutputStream` instance wraps an underlying `ByteArrayOutputStream` instance, it is recommended to flush or close the `DataOutputStream` before invoking the underlying instances's toByteArray(). Also, it is a good practice...