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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: 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

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: