JSR 292: target typing cast and parenthesis

XMLWordPrintable

    • Type: Bug
    • Resolution: Cannot Reproduce
    • Priority: P4
    • 7
    • Affects Version/s: 7
    • Component/s: 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() );

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: