Re: RFR: 8286386: Address possibly lossy conversions in java.net.http [v3]

2022-05-11 Thread Daniel Fuchs
On Wed, 11 May 2022 18:23:30 GMT, Daniel Fuchs  wrote:

>>  I'd put `_MASK` in the name along with whatever name is used for the bits 
>> in the frame spec .
>
> @RogerRiggs Actually - I'm no longer sure that this will work:
> 
> 
> jshell> char x = 0b1000_
> x ==> '耀'
> 
> jshell> var y = ~x
> y ==> -32769
> 
> jshell> char y = ~x
> |  Error:
> |  incompatible types: possible lossy conversion from int to char
> |  char y = ~x;
> |   ^^

So if x is a char, ~x seems to be an int :-(

-

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


Re: RFR: 8286386: Address possibly lossy conversions in java.net.http [v3]

2022-05-11 Thread Daniel Fuchs
On Wed, 11 May 2022 17:49:28 GMT, Roger Riggs  wrote:

>> Ah! Good point. Maybe I should use a constant and get rid of the cast.
>
>  I'd put `_MASK` in the name along with whatever name is used for the bits 
> in the frame spec .

@RogerRiggs Actually - I'm no longer sure that this will work:


jshell> char x = 0b1000_
x ==> '耀'

jshell> var y = ~x
y ==> -32769

jshell> char y = ~x
|  Error:
|  incompatible types: possible lossy conversion from int to char
|  char y = ~x;
|   ^^

-

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


Re: RFR: 8286386: Address possibly lossy conversions in java.net.http [v3]

2022-05-11 Thread Daniel Fuchs
> 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

Daniel Fuchs has updated the pull request incrementally with one additional 
commit since the last revision:

  Add _MASK suffix to char constants

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/8656/files
  - new: https://git.openjdk.java.net/jdk/pull/8656/files/bbcf238b..ec344eef

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk=8656=02
 - incr: https://webrevs.openjdk.java.net/?repo=jdk=8656=01-02

  Stats: 14 lines in 1 file changed: 0 ins; 0 del; 14 mod
  Patch: https://git.openjdk.java.net/jdk/pull/8656.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/8656/head:pull/8656

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