Broken runtime parameter annotations

Issue #247 resolved
Jesper Öqvist created an issue

ExtendJ 8.0.1-248-ga8a2c1e Java SE 8

ExtendJ generates broken runtime parameter annotations for this test:

import java.lang.annotation.*;

public class Ju7 {

    public void bork(@Trait("borkable") @Kind("spork") int x) {

    public static void main(String[] args) throws NoSuchMethodException {
      Annotation[][] notes = Ju7.class
          .getDeclaredMethod("bork", int.class)

@interface Trait {
  String value() default "";

@interface Kind {
  String value() default "";

Expected result: should print


Actual result: fails to run:

Exception in thread "main" java.lang.annotation.AnnotationFormatError: Unexpected end of parameter annotations.
        at sun.reflect.annotation.AnnotationParser.parseParameterAnnotations(
        at java.lang.reflect.Executable.parseParameterAnnotations(
        at java.lang.reflect.Executable.sharedGetParameterAnnotations(
        at java.lang.reflect.Method.getParameterAnnotations(
        at Ju7.main(

Comments (1)

  1. Jesper Öqvist reporter

    Fix error in RuntimeVisibleParameterAnnotations attribute

    The number of annotations attached to each parameter was missing in the RuntimeVisibleParameterAnnotations attribute.

    fixes #247 (bitbucket)

    → <<cset fe3a489cb2f8>>

  2. Log in to comment