Uploaded image for project: 'Repository'
  1. Repository
  2. REPOSITORY-411

Check all calls to ModelAwareDataHolder.getValue with a integer default value

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major Major
    • 4.2.0
    • None
    • None
    • None
    • 4.2 M9

      long maxNbMembers = serviceParameters2018.getValue("nbMembers", false, -1); leads to a ClassCastException

      Caused by: java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer
      
          at org.ametys.plugins.workspaces.members.ProjectMembersGenerator.generate(ProjectMembersGenerator.java:114)
      
          at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:581)
      

      because the default value is a Integer instead of a Long.

      This should be replaced by long maxNbMembers = serviceParameters2018.getValue("nbMembers", false, -1L);

            cbayle Caroline Bayle
            laurence Laurence Aumeunier
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: