Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-6089

Java type conversion error hint in editor vs compiler

Rank to TopRank to BottomBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersConvert to sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Workaround
    • 12.5
    • 12.6
    • java - Source
    • None

    Description

      Settings imported from IDE 12.4
      Project is fine with IDE 12.4
      Project compiles without errors in 12.4 and 12.5

      With 12.5, getting problems in the editor and in the Projects window as follows:

      On the following source code:
      final List<EvaluatedCandidate<CgpNetwork>> evaluatedPopulation = this.populationAccessibleEvolutionEngine.getEvaluatedPopulation();

      I get a red error hint:
      incompatible types: List<Object> cannot be converted to List<EvaluatedCandidate<CgpNetwork>>


      (Alt-Enter shows hints)
      and in the Project window, the project is marked red.

      The relevant source code:

      private final PopulationAccessibleEvolutionEngine<CgpNetwork> populationAccessibleEvolutionEngine;

      The above code has parameterized type CgpNetwork as seen below:

      public class PopulationAccessibleEvolutionEngine<T> extends GenerationalEvolutionEngine<T> implements EvaluatedPopulationAccessible<T> {

      In Project settings:
      Sources, Source/Binary Format: 1.8
      Build, Compile, Java Platform is JDK 14 (Default)

      Attachments

        Activity

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

          People

            Unassigned Unassigned
            bht Bernard
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment