On 08/21/2017 08:06 PM, Paul Sandoz wrote:
>> On 21 Aug 2017, at 07:48, Claes Redestad <claes.redes...@oracle.com> wrote:
>> a trivial test[1] invoking the StringConcatFactory.makeConcatWithConstants 
>> fails
>> when providing an Integer as a constant, which appears to be due to failure 
>> to
>> coerce boxed types to the corresponding primitive types when looking up 
>> various
>> methods in StringConcatHelper:
>>
>> Webrev: http://cr.openjdk.java.net/~redestad/8186500/jdk.00/
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8186500
>>
>> Simply using Wrapper.asPrimitiveType coerces boxed types to their primitive
>> counterpart, and is a (semantical) no-op for other types, e.g., String.
> 
> Looks good. Perhaps a token test would be useful (maybe hard to test all code 
> paths here without some combinator test).

Please add tests. We have to at least assert that passing "null" works fine 
there -- I am not sure
it does right now. Since we are talking non-String constants, passing 
java/lang/Object is a good
test too.

-Aleksey

Reply via email to