Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-1178

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.6.1
    • 0.7
    • Java - Library
    • None
    • 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

      Attachments

        1. THRIFT-1178.txt
          0.6 kB
          ryan rawson

        Activity

          People

            ryanobjc ryan rawson
            ryanobjc ryan rawson
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: