Painless: add tests for cached boxing#24163
Merged
nik9000 merged 3 commits intoelastic:masterfrom Oct 10, 2017
Merged
Conversation
We had a TODO about adding tests around cached boxing. In elastic#24077 I tracked down the uncached boxing tests and saw the TODO. Cached boxing testing is a fairly small extension to that work.
cbuescher
reviewed
Jun 28, 2017
| /* Now check that we use valueOf with the boxing used for comparing primitives to def. For this we need an | ||
| * integer that is cached by Integer.valueOf. The JLS says 0 should always be cached. */ | ||
| int cachedAutoboxedInt = 0; | ||
| assertEquals(Integer.valueOf(cachedAutoboxedInt), Integer.valueOf(cachedAutoboxedInt)); |
Member
There was a problem hiding this comment.
I took a look because it looked fun, sorry if I'm getting things wrong. If I understand this test right, then these two values should be referentialy equal, so shouldn't this be assertSame?
| /* Now check that we use valueOf with the boxing used for comparing primitives to def. For this we need an | ||
| * integer that is cached by Integer.valueOf. The JLS says 0 should always be cached. */ | ||
| int cachedAutoboxedInt = 0; | ||
| assertEquals(Integer.valueOf(cachedAutoboxedInt), Integer.valueOf(cachedAutoboxedInt)); |
Member
jdconrad
approved these changes
Jun 28, 2017
Contributor
jdconrad
left a comment
There was a problem hiding this comment.
LGTM. My apologies, not sure why I never got back to this.
nik9000
added a commit
that referenced
this pull request
Oct 10, 2017
We had a TODO about adding tests around cached boxing. In #24077 I tracked down the uncached boxing tests and saw the TODO. Cached boxing testing is a fairly small extension to that work.
jasontedor
added a commit
that referenced
this pull request
Oct 12, 2017
* master: (35 commits) Create weights lazily in filter and filters aggregation (#26983) Use a dedicated ThreadGroup in rest sniffer (#26897) Fire global checkpoint sync under system context Update by Query is modified to accept short `script` parameter. (#26841) Cat shards bytes (#26952) Add support for parsing inline script (#23824) (#26846) Change default value to true for transpositions parameter of fuzzy query (#26901) Adding unreleased 5.6.4 version number to Version.java Rename TCPTransportTests to TcpTransportTests (#26954) Fix NPE for /_cat/indices when no primary shard (#26953) [DOCS] Fixed indentation of the definition list. Fix formatting in channel close test Check for closed connection while opening Clarify systemd overrides [DOCS] Plugin Installation for Windows (#21671) Painless: add tests for cached boxing (#24163) Don't detect source's XContentType in DocumentParser.parseDocument() (#26880) Fix handling of paths containing parentheses Allow only a fixed-size receive predictor (#26165) Add Homebrew instructions to getting started ...
jasontedor
added a commit
that referenced
this pull request
Oct 12, 2017
* 6.x: (32 commits) Use a dedicated ThreadGroup in rest sniffer (#26897) Fire global checkpoint sync under system context Update by Query is modified to accept short `script` parameter. (#26841) Cat shards bytes (#26952) Adding unreleased 5.6.4 version number to Version.java Rename TCPTransportTests to TcpTransportTests (#26954) Fix NPE for /_cat/indices when no primary shard (#26953) [DOCS] Fixed indentation of the definition list. Check for closed connection while opening Clarify systemd overrides [DOCS] Plugin Installation for Windows (#21671) Painless: add tests for cached boxing (#24163) Don't detect source's XContentType in DocumentParser.parseDocument() (#26880) Return List instead of an array from settings (#26903) Emit deprecation warning for variable size predictor Fix handling of paths containing parentheses Deprecate variable-size receive predictor Add Homebrew instructions to getting started ingest: Fix bug that prevent date_index_name processor from accepting timestamps specified as a json number Scripting: Fix expressions to temporarily support filter scripts (#26824) ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We had a TODO about adding tests around cached boxing. In #24077
I tracked down the uncached boxing tests and saw the TODO. Cached
boxing testing is a fairly small extension to that work.