Uploaded image for project: 'Forge'
  1. Forge
  2. FORGE-959

ClassCastException with CLAC when the attribute added to UIContext.setAttribute is an Enum

    XMLWordPrintable

Details

    • Hide
      • Open NewFieldWizard, go to line 239
      • Change
        context.setAttribute(RelationshipType.class,relationshipType.getValue().name());
        

        to

        context.setAttribute(RelationshipType.class,relationshipType.getValue());
        context.getAttribute(RelationshipType.class);
        
      • Install the addon and execute the New Field Wizard
      • Select a relationship and press next
      Show
      Open NewFieldWizard, go to line 239 Change context.setAttribute(RelationshipType. class, relationshipType.getValue().name()); to context.setAttribute(RelationshipType. class, relationshipType.getValue()); context.getAttribute(RelationshipType.class); Install the addon and execute the New Field Wizard Select a relationship and press next

    Description

      This was spotted in the NewFieldWizard when transitioning to NewFieldRelationshipWizardStep:

      RelationshipType enumValue = ...
      UIContext.setAttribute("value", enumValue);
      enumValue = (RelationshipType) UIContext.getAttribute("value")// CCE
      

      Attachments

        Activity

          People

            lincolnthree Lincoln Baxter III (Inactive)
            rhn-support-ggastald George Gastaldi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: