Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-7012406

JSR 292: target typing cast and parenthesis

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • 7
    • 7
    • tools
    • None
    • unknown
    • generic

      One potential bug: The switch statement in Infer.java mentions tags TYPECAST and EXEC.

      It should probably mention PARENS also, if only to assert that env. expressions of that sort don't appear. Otherwise we could get confusion some day about the meaning of this code:

      String s = (String)( mh.invokeExact() );

      It should be the same as this code:

      String s = (String) mh.invokeExact();

      But the switch statement might make it act like this:

      String s = (Object)( mh.invokeExact() );

            mcimadamore Maurizio Cimadamore
            mcimadamore Maurizio Cimadamore
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: