RFR: 8286386: Address possibly lossy conversions in java.net.http

Daniel Fuchs dfuchs at openjdk.java.net
Wed May 11 17:08:00 UTC 2022


On Wed, 11 May 2022 16:55:16 GMT, Michael McMahon <michaelm at openjdk.org> wrote:

>> In relation to [JDK-8244681](https://bugs.openjdk.java.net/browse/JDK-8244681), please find here a patch that addresses possibly lossy conversions in java.net.http
>
> src/java.net.http/share/classes/jdk/internal/net/http/websocket/Frame.java line 222:
> 
>> 220:                 // compiler will emit a warning if not cast
>> 221:                 firstChar &= (char) ~0b10000000_00000000;
>> 222:             }
> 
> Am I right in believing that there was an implicit cast to char here before and the only change is to make it explicit? ie. there is no actual behavior change?

Yes - that's my understanding.

-------------

PR: https://git.openjdk.java.net/jdk/pull/8656


More information about the net-dev mailing list