Uploaded image for project: 'Click'
  1. Click
  2. CLK-736

function getPageClassList has incorrect return type

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 2.3.0-M1
    • Fix Version/s: 2.3.0-M1
    • Component/s: core
    • Labels:
      None

      Description

      function getPageClassList from class ConfigService
      has an incorrect signature

      public List<? extends Page> getPageClassList();

      while it should be

      public List<Class<? extends Page>> getPageClassList();

      This function when used causes sometimes ClassCastException. However this is not repeatable. I assume that javac compiler generates code which try to cast to incorrect generic type.
      Loop construction like
      for(Class<? extends Page> clazz : configService.getPageClassList())

      {...}

      is rejected by java compiler

      Please correct the signature in ConfigService and its implementation in XmlConfigService

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              leszekp Leszek Piotrowicz
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: