RFR: 8268788: Annotations with lambda expressions can still cause AnnotationFormatError [v4]

Sergei Ustimenko github.com+5709644+fdesu at openjdk.java.net
Wed Aug 25 17:53:52 UTC 2021


> Change #3294 helps to avoid `AnnotaionFormatException` in `sun.reflect.annotation.AnnotationInvocationHandler.validateAnnotationMethods`. While it fixes the case with e.g. `Runnable`  that generates the synthetic method without parameters, validation still fails on synthetic methods that have parameters e.g. `Function`, `BiFunction`, etc.
> 
> This change removes the restriction on parameters count to be zero i.e. lambdas with parameters
> would be skipped from validation.

Sergei Ustimenko has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision:

 - 8268788: Filter out synthetic methods from the member methods computation
 - 8268788: Annotations with lambda expressions can still cause AnnotationFormatError

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/4642/files
  - new: https://git.openjdk.java.net/jdk/pull/4642/files/1f5fd0a5..9cf2f0c1

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=4642&range=03
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=4642&range=02-03

  Stats: 8852 lines in 417 files changed: 5797 ins; 1742 del; 1313 mod
  Patch: https://git.openjdk.java.net/jdk/pull/4642.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/4642/head:pull/4642

PR: https://git.openjdk.java.net/jdk/pull/4642


More information about the core-libs-dev mailing list