Uploaded image for project: 'Roaster'
  1. Roaster
  2. ROASTER-124

AnnotationSource.setLiteralValue() error occur

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Done
    • Affects Version/s: 2.19.4.Final
    • Fix Version/s: 2.20.1.Final
    • Component/s: JDT
    • Labels:
      None
    • Environment:

      intelliJ IDEA, MacOS - Sierra

    • Steps to Reproduce:
      Hide

      1. Create string: String annotation = "clazz = ComprehensionTool.class, method = \"startAnalyse\""
      2. Call method: method.addAnnotation(annotationStructure.getName()).setLiteralValue(annotation);

      Show
      1. Create string: String annotation = "clazz = ComprehensionTool.class, method = \"startAnalyse\"" 2. Call method: method.addAnnotation(annotationStructure.getName()).setLiteralValue(annotation);

      Description

      Error:

      Exception in thread "main" java.lang.ClassCastException: org.jboss.forge.roaster._shade.org.eclipse.jdt.core.dom.NormalAnnotation cannot be cast to org.jboss.forge.roaster._shade.org.eclipse.jdt.core.dom.SingleMemberAnnotation
        at org.jboss.forge.roaster.model.impl.AnnotationImpl.setLiteralValue(AnnotationImpl.java:325)
        at comprehensionTool.data.annotation.AnnotationImplementer.annotateMethod(AnnotationImplementer.java:132)
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                gastaldi George Gastaldi
                Reporter:
                ondrejz Ondrej Zoricak
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: