Thrift
  1. Thrift
  2. THRIFT-1178

Java: TBase signature should be T extends TBase<?,?>

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.6.1
    • Fix Version/s: 0.7
    • Component/s: Java - Library
    • Labels:
      None
    • Patch Info:
      Patch Available

      Description

      Right now TBase looks like:
      public interface TBase<T extends TBase, F extends TFieldIdEnum> extends Comparable<T>, Serializable {

      but it should be:
      public interface TBase<T extends TBase<?,?>, F extends TFieldIdEnum> extends Comparable<T>, Serializable {

      While the Java compiler does not have a problem, the Scala compiler throws a fit and refuses to upcast generated classes to 'TBase' when required, such as calling TSerializer.serialize

      1. THRIFT-1178.txt
        0.6 kB
        ryan rawson

        Activity

        Hide
        ryan rawson added a comment -

        originally suggested by extempore on #scala/freenode

        Show
        ryan rawson added a comment - originally suggested by extempore on #scala/freenode
        Hide
        Bryan Duxbury added a comment -

        I just committed this to TRUNK.

        Show
        Bryan Duxbury added a comment - I just committed this to TRUNK.
        Hide
        Hudson added a comment -

        Integrated in Thrift #147 (See https://builds.apache.org/hudson/job/Thrift/147/)

        Show
        Hudson added a comment - Integrated in Thrift #147 (See https://builds.apache.org/hudson/job/Thrift/147/ )

          People

          • Assignee:
            ryan rawson
            Reporter:
            ryan rawson
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development