Uploaded image for project: 'Spatial Information Systems'
  1. Spatial Information Systems
  2. SIS-95

Explicitly specify Typed extends Object parameters in FallbackConverterTest

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.3
    • Component/s: Utilities
    • Labels:
      None

      Description

      I found this bug by trying to open up the latest version of SIS inside of Eclipse. Per Martin Desruisseaux:

      Eclipse doesn't use the Sun/Oracle javac compiler. It uses its own compiler instead, which doesn't behave exactly the same way. I have seen 3 or 4 similar situations in the past, where the Eclipse and Sun compilers were in disagreement. However I do not remember having seen a case where the Eclipse compiler was right...

      In this particular case, the Eclipse compiler complains about that line:

      c = FallbackConverter.merge(c, new StringConverter.Long());
      

      The 'merge' method expect two arguments of type:

         ObjectConverter<S, ? extends T>
         ObjectConverter<S, ? extends T>
      

      The types that we are actually providing are:

         ObjectConverter<String, ?>
         ObjectConverter<String, Long>
      

      If we understand <?> as synonymous to <? extends Object>, the above is
      right as far as I can see. But maybe Eclipse wants it to be specified
      explicitly. could you try to edit line 63 please, replacing the
      <String,?> by <String,? extends Object>.

        Attachments

          Activity

            People

            • Assignee:
              chrismattmann Chris A. Mattmann
              Reporter:
              chrismattmann Chris A. Mattmann
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: