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

Updates to OGNL 3.2.x OgnlRuntime #64

Merged

Conversation

JCgH4164838Gh792C124B5
Copy link
Contributor

Updates to OGNL 3.2.x OgnlRuntime:

pom.xml changes:

  • downgrade javassist 3.24.0-GA -> 3.23.1-GA, to restore compatiblity with JDK 7.

Code changes:

  • added clarifying comments to getStaticField(), cleanup.
  • added a finally guard in invokeMethod().
  • added a finally guard in getFieldValue(), cleanup.
  • added additional limiter (final) to setFieldValue(), cleanup.
  • added two test units for protected and public members.
  • updated PrivateMemberTest with additional tests, cleanup.

pom.xml changes:
- downgrade javassist 3.24.0-GA -> 3.23.1-GA, to restore compatiblity with JDK 7

Code changes:
- added clarifying comments to getStaticField(), cleanup.
- added a finally guard in invokeMethod().
- added a finally guard in getFieldValue(), cleanup.
- added additional limiter (final) to setFieldValue(), cleanup.
- added two test units for protected and public members.
- updated PrivateMemberTest with additional tests.
Copy link
Collaborator

@lukaszlenart lukaszlenart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@@ -68,7 +68,7 @@
<dependency>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.24.0-GA</version>
<version>3.23.1-GA</version>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uh... I missed that out :\

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @lukaszlenart .

The only reason I noticed it was I ran the Maven build with JDK7 (and it failed due to "Unsupported major.minor version 52.0" related to Javassist). :)

It seems like they jumped from source/target 1.6 right to 1.8 in 3.24.0-GA (the commit that made the change didn't explain why ...)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @lukaszlenart .

In addition to the JDK version support levels for Javassist 3.24 vs. 3.23, I ran across a note of possible issues with 3.23.x (jboss-javassist/javassist#224). It's possible that falling back to Javassist 3.22 for OGNL 3.2.x, or opening an issue report with Javassist and asking for restoration of JDK 7 support in 3.25+ might be necessary ...

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does OGNL even need javassist anymore? I'm not sure if anyone ever used those features other than me in Tapestry 4. It might be safe to just drop that feature set instead. Up to you. =)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @jkuhnert .

Not sure if anyone out there needs Javassist for OGNL. If neither you nor @lukaszlenart are aware of any active Javassist feature usage, maybe it could marked for deprecation in the OGNL 3.2.x line (or simply phased out in future 3.2.x and noted in the release notes) ?

I was just trying to keep it compiling on JDK 7. :)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's used in ExpressionCompiler and I don't know if this can be easily replaced

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @lukaszlenart .

Based on your comment about ExpressionCompiler and a brief look at the code, it certainly looks like Javassist is pretty fundamental to its design...

As a "heads-up" the Javassist team accepted a PR (jboss-javassist/javassist#230) to restore JDK 7 runtime compatibility. That could mean that the next Javassist 3.24.x or 3.25 release might work for the OGNL 3.2.x line, whenever the next Javassist official build is released.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great news, thanks a lot!!!

@lukaszlenart lukaszlenart merged commit ac279de into orphan-oss:master Nov 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants