Skip to content

Fix JRubyException message access #1344

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

Closed
wants to merge 505 commits into from
Closed

Fix JRubyException message access #1344

wants to merge 505 commits into from

Conversation

wltjr
Copy link

@wltjr wltjr commented Mar 3, 2017

I do not think I created this PR properly but maybe. Newer JRuby changed access on message in JRubyException to private. This causes an error when attempting to use a private variable in public scope. I changed it from .message to ex.getMessage(). Also removed null check, as it is only needed on the JRubyException object.

If the PR is in fact improperly created, let me know and I will attempt to recreate/resubmit properly. This pertains to 4.3.7 release/branch.

jhoeller and others added 30 commits October 31, 2016 11:54
(cherry picked from commit 7f280a3)
(cherry picked from commit 45fc449)
For SPR-14863 we need to adjust the code generation for OpNE
to use !x.equals(y) rather than x!=y. There are also further
cases in the equalityCheck() code in Operator that were not
being handled in the compilation case (when comparators are
used for example). This latter issue also affects OpEQ.

Rather than add yet more bytecode generation, both OpNE and
OpEQ generateCode() methods have been simplified. The
generated code now delegates to equalityCheck() in Operator
which is exactly what the interpreted case does.

This ensures that the compiled code continues to behave just
like the interpreted case. It ensures changes to the interpreted
case are automatically picked up for the compiled case. It
makes the bytecode generation simpler.

The benefit of compilation of SpEL expressions is to avoid
slow reflective calls - that doesn't apply for a basic
(in)equality test so there is no need to go crazy in bytecode
gen.

Issue: SPR-14863
(cherry picked from commit 9000acd)
This commits adds a validation check whether the SockJS session type
matches the transport type and rejects requests for which they
don't match.

Issue: SPR-14867
…older

Issue: SPR-14583
(cherry picked from commit 03468fd)
…ations

Issue: SPR-10502
(cherry picked from commit 8053fef)
Issue: SPR-14867
(cherry picked from commit a90e4b2)
Issue: SPR-14879
(cherry picked from commit 8ae0bd6)
(cherry picked from commit 9b57437)
Do not check on non-specified port when scheme is https.
Enables SSL for https URIs with a specified port.

Issue: SPR-14889
jhoeller and others added 22 commits February 18, 2017 00:51
Prior to this commit, the `ShallowEtagHeaderFilter` could participate in
the response and set its ETag/Content-Length headers, even for HEAD
requests. Since the response body is empty, the filter implementation
would set a `"Content-Length: 0"`.

The RFC states that responses to HEAD requests should exhibit identical
response headers to GET (with the possible exception of payload related
headers such as Content-Length.

With this commit, `ShallowEtagHeaderFilter` now ignores HEAD requests
since the proper values may be set already for payload related headers
by the handler. The filter has no way to generate a proper ETag value
nor calculate the content length without the actual body.

Issue: SPR-15261
(cherry picked from commit b732251)
This commit improves `AbstractValueAdaptingCache` to throw a dedicated
exception if `allowNullValues` is `false` and a `null` value is provided
anyway. This avoid a lower-level exception from the cache library that
will miss some context.

Issue: SPR-15173
…again)

Issue: SPR-15214
(cherry picked from commit fc11321)
(cherry picked from commit d2cc97a)
Closes gh-1335
(cherry picked from commit 7d062df)
…dAnnotations

Issue: SPR-15271
(cherry picked from commit 6108ab1)
…ryBeans

Issue: SPR-15275
(cherry picked from commit 7fb0ad3)
Also retrieves CacheConfig as merged annotation now, aligned with other caching annotations.

Issue: SPR-15296
(cherry picked from commit d4a1b59)
…IB proxies)

Issue: SPR-15271
Issue: SPR-14949
Issue: SPR-14322
(cherry picked from commit d003f66)
(cherry picked from commit 6d6cf01)
@pivotal-issuemaster
Copy link

@wltjr Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@wltjr wltjr changed the title Fix jruby Fix JRubyException message access Mar 3, 2017
@snicoll
Copy link
Member

snicoll commented Mar 3, 2017

Thanks for the PR. please resubmit with master, we are taking care of backports anyway.

@snicoll snicoll closed this Mar 3, 2017
@wltjr
Copy link
Author

wltjr commented Mar 3, 2017

The file has been removed from master. I resubmitted against the 4.3.x branch

@jhoeller
Copy link
Contributor

jhoeller commented Mar 7, 2017

I've addressed this through a slightly different revision, retaining compatibility with JRuby 1.7.x while also allowing JRubyScriptFactory to be used with JRuby 9.1.7+ still: see https://jira.spring.io/browse/SPR-15322

Note that we primarily support JRuby 9000 through JSR-223, i.e. StandardScriptFactory, and that native JRuby support is deprecated since Spring Framework 4.2 already and therefore gone in 5.0.

@wltjr
Copy link
Author

wltjr commented Mar 7, 2017

Ok sounds good

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.