JDK 9 RFR of JDK-8162539: Test fails because it expects a blank between method signature and throws exception

Coleen Phillimore coleen.phillimore at oracle.com
Tue Jul 26 19:23:19 UTC 2016


Thank you for fixing this so quickly.  This looks good but I have a 
question about:

http://cr.openjdk.java.net/~darcy/8162539.0/test/java/lang/reflect/Constructor/GenericStringTest.java.udiff.html

      @ExpectedGenericString(
     "protected <S,T> TestClass1(S,T) throws java.lang.Exception")
+ @ExpectedString(
+ "protected TestClass1(java.lang.Object,java.lang.Object) throws 
java.lang.Exception")
      protected <S, T> TestClass1(S s, T t) throws Exception{}


I can't really read the metaprogramming but why didn't the existing 
@Expected{Generic}String strings here find the problem?

thanks,
Coleen

On 7/26/16 3:08 PM, joe darcy wrote:
> Hello,
>
> Please review the changes to address
>
>     JDK-8162539: Test fails because it expects a blank between method 
> signature and throws exception
>     http://cr.openjdk.java.net/~darcy/8162539.0/
>
> In brief, recent refactorings of the toString output in core 
> reflection (JDK-8161500 Use getTypeName and StringJoiner in core 
> reflection generic toString methods) omitted a space character between 
> the closing ")" and "throws" for toString output, but correctly 
> included the space in toGenericString output.
>
> The simple fix is to add the space character; regression tests are 
> suitably augmented and slightly refactored.
>
> Thanks,
>
> -Joe
>



More information about the core-libs-dev mailing list