Uploaded image for project: 'Geode'
  1. Geode
  2. GEODE-336

Function extends Identifiable without specifying generics type for Identifiable

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • None
    • 1.0.0-incubating.M3
    • None
    • None

    Description

      Function interface is defined as
      public interface Function extends Identifiable

      { public String getId(); ...}

      but that is not correct because Identifiable requires type parameter
      public interface Identifiable<T extends Comparable<T>> extends Serializable {
      public T getId();
      }

      so when custom function is defined as
      class SomeFunction extends FunctionAdapter {
      override def getId:String = "SomeFunction-v1"
      }

      Java compiler tolerates that, but Scala compiler refuses to compile because because String is not compatible with 'Nothing' that is expected from getId because Function extends Identifiable without specifying type.

      Solution:
      define Function as
      public interface Function extends Identifiable<String>

      Attachments

        Issue Links

          Activity

            People

              upthewaterspout Dan Smith
              kgignatyev Konstantin Ignatyev
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 1m
                  1m
                  Remaining:
                  Remaining Estimate - 1m
                  1m
                  Logged:
                  Time Spent - Not Specified
                  Not Specified