Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try to fix ronmamo/reflections#253 #290

Closed
wants to merge 3 commits into from
Closed

Conversation

ziqin
Copy link

@ziqin ziqin commented May 8, 2020

This PR tries to fix ronmano/reflections#253 by using only the last dot to seperate class name and member name to get a correct name of the synthetic method for lambda expression usage.

Format of the names of synthetic methods for lambda expression body:
lambda$methodNameWhereTheLambdaExprAppears$# where # is a number

The last dot is also the delimiter of class name and member name in the earlier implementation. It was then changed to Math.max(memberKey.lastIndexOf('.'), memberKey.lastIndexOf("$")) but I don't know under what circumstance will the last dollar be a proper delimiter. Please double check my changes.

Test cases are added for both lambda usage and anonymous class usage, as OpenJDK compiler generates different bytecodes for them.

The problem mentioned in #280 about extracting the expected outer method instead of the synthetic one has not been solved in this PR.

ziqin added 3 commits May 8, 2020 09:06
Use only the last dot to seperate class name and member name to get a
correct name of the synthetic method for lambda expression usage.

Test cases are added for both lambda usage and anonymous class usage.

Note: OpenJDK does not generate an anonymous inner class during compiling.
Instead, a method is synthesized to desugar the lambda expression.
https://cr.openjdk.java.net/~briangoetz/lambda/lambda-translation.html
@rimuln
Copy link

rimuln commented Aug 18, 2020

some attempt to solve the lambdas problem is fixed and released in aschoerk/reflections8 that merge my PR. At least all cases where we use it my fix works for it:
PR request was merged with this commit (If i'm looking correct) c5efd25
it is said that not all was merged to original reflections. So until this will be fixed we will stay on reflections8 :(

@rimuln rimuln mentioned this pull request Oct 24, 2020
ronmamo pushed a commit that referenced this pull request Sep 18, 2022
ronmamo added a commit that referenced this pull request Jun 15, 2023
* Bump maven-bundle-plugin from 5.1.2 to 5.1.8 (#408)

Bumps maven-bundle-plugin from 5.1.2 to 5.1.8.

---
updated-dependencies:
- dependency-name: org.apache.felix:maven-bundle-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump gson from 2.8.8 to 2.9.1 (#417)

Bumps [gson](https://github.com/google/gson) from 2.8.8 to 2.9.1.
- [Release notes](https://github.com/google/gson/releases)
- [Changelog](https://github.com/google/gson/blob/master/CHANGELOG.md)
- [Commits](google/gson@gson-parent-2.8.8...gson-parent-2.9.1)

---
updated-dependencies:
- dependency-name: com.google.code.gson:gson
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump slf4j-simple from 1.7.32 to 1.7.36 (#416)

Bumps [slf4j-simple](https://github.com/qos-ch/slf4j) from 1.7.32 to 1.7.36.
- [Release notes](https://github.com/qos-ch/slf4j/releases)
- [Commits](qos-ch/slf4j@v_1.7.32...v_1.7.36)

---
updated-dependencies:
- dependency-name: org.slf4j:slf4j-simple
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump slf4j-api from 1.7.32 to 1.7.36 (#415)

Bumps [slf4j-api](https://github.com/qos-ch/slf4j) from 1.7.32 to 1.7.36.
- [Release notes](https://github.com/qos-ch/slf4j/releases)
- [Commits](qos-ch/slf4j@v_1.7.32...v_1.7.36)

---
updated-dependencies:
- dependency-name: org.slf4j:slf4j-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump junit-jupiter-engine from 5.8.1 to 5.9.0 (#406)

Bumps [junit-jupiter-engine](https://github.com/junit-team/junit5) from 5.8.1 to 5.9.0.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](junit-team/junit5@r5.8.1...r5.9.0)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump jboss-vfs from 3.2.15.Final to 3.2.17.Final (#399)

Bumps [jboss-vfs](https://github.com/jbossas/jboss-vfs) from 3.2.15.Final to 3.2.17.Final.
- [Release notes](https://github.com/jbossas/jboss-vfs/releases)
- [Commits](jbossas/jboss-vfs@3.2.15.Final...3.2.17.Final)

---
updated-dependencies:
- dependency-name: org.jboss:jboss-vfs
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Issue with new releases of OpenJDK and Zulu.  fix #395 (#396)

* fix #395

* Refactor to use VirtualJarInputStream.root instead of JarInputDir which is much slower. fix #395

Co-authored-by: Dominik Kessler <dominik.kessler@ergon.ch>

* Bump maven-jar-plugin from 3.2.0 to 3.2.2 (#381)

Bumps [maven-jar-plugin](https://github.com/apache/maven-jar-plugin) from 3.2.0 to 3.2.2.
- [Release notes](https://github.com/apache/maven-jar-plugin/releases)
- [Commits](apache/maven-jar-plugin@maven-jar-plugin-3.2.0...maven-jar-plugin-3.2.2)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-jar-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Make URL more accurate (#302)

* rev

* null check params, update jdk tests, auto close dir

* remove jdk tests

* Improve MAVEN build Performance (#363)

Co-authored-by: fdse <fdse@node2>
Co-authored-by: ronmamo <2588829+ronmamo@users.noreply.github.com>

* synthetic/lambda cherry-picked from PR #290 by @ziqin

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: kesslerd <kesslerd@users.noreply.github.com>
Co-authored-by: Dominik Kessler <dominik.kessler@ergon.ch>
Co-authored-by: Chen <chenguopingdota@163.com>
Co-authored-by: ronma <ronma@>
Co-authored-by: ChenZhangg <32891042+ChenZhangg@users.noreply.github.com>
Co-authored-by: fdse <fdse@node2>
@ronmamo ronmamo closed this Jun 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants