docs: private Annotation[][] getConstructorParameterAnnotations(Constructor<?> constructor) {
          /*
           * TODO: Remove after JDK9 is the minimum JDK supported
           *
           * JDK9+ correctly accounts for the synthetic parameter and when it becomes
           * the minimum version this method should no longer be required.
           */
          int parameterCount = constructor.getParameterTypes().length;
          Annotation[][] annotations = constructor.getParameterAnnotations();
          int diff = parameterCount - annotations.length;
          if (diff > 0) {
              // May happen on JDK8 and below. We add elements to the front of the array to account for the synthetic params:
              // - for an inner class we expect one param to account for the synthetic outer reference
              // - for an enum we expect two params to account for the synthetic name and ordinal
              if ((!constructor.getDeclaringClass().isEnum() && diff > 1) || diff > 2) {
                  throw new GroovyBugError(
                          "Constructor parameter annotations length [" + annotations.length + "] " +
                          "does not match the parameter length: " + constructor
                  );
              }
              Annotation[][] adjusted = new Annotation[parameterCount][];
              for (int i = 0; i < diff; i++) {
                  adjusted[i] = EMPTY_ANNOTATION_ARRAY;
              }
              System.arraycopy(annotations, 0, adjusted, diff, annotations.length);
              return adjusted;
          }
          return annotations;
      }