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

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

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment