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

Painless: Add augmentation to String for base 64 #22665

Merged
merged 1 commit into from
Jan 19, 2017

Conversation

nik9000
Copy link
Member

@nik9000 nik9000 commented Jan 17, 2017

We don't want to expose String#getBytes which is required for
Base64.getEncoder.encode to work because we're worried about
character sets. This adds encodeBase64 and decodeBase64
methods to String in Painless that are duals of one another
such that:
someString == someString.encodeBase64().decodeBase64().

Both methods work with the UTF-8 encoding of the string.

Closes #22648

We don't want to expose `String#getBytes` which is required for
`Base64.getEncoder.encode` to work because we're worried about
character sets. This adds `encodeBase64` and `decodeBase64`
methods to `String` in Painless that are duals of one another
such that:
`someString == someString.encodeBase64().decodeBase64()`.

Both methods work with the UTF-8 encoding of the string.

Closes elastic#22648
@nik9000
Copy link
Member Author

nik9000 commented Jan 17, 2017

Hrm, I'll need to add documentation for this too!

Copy link
Contributor

@jdconrad jdconrad left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for making this change.

@nik9000 nik9000 merged commit 3ce41a0 into elastic:master Jan 19, 2017
nik9000 added a commit that referenced this pull request Jan 19, 2017
We don't want to expose `String#getBytes` which is required for
`Base64.getEncoder.encode` to work because we're worried about
character sets. This adds `encodeBase64` and `decodeBase64`
methods to `String` in Painless that are duals of one another
such that:
`someString == someString.encodeBase64().decodeBase64()`.

Both methods work with the UTF-8 encoding of the string.

Closes #22648
@nik9000
Copy link
Member Author

nik9000 commented Jan 19, 2017

Thanks for reviewing @jdconrad and thanks for fixing my tags @clintongormley!

master: 3ce41a0
5.x: d58d23b

jasontedor added a commit to jasontedor/elasticsearch that referenced this pull request Jan 20, 2017
* master: (117 commits)
  Add missing serialization BWC for disk usage estimates
  Expose disk usage estimates in nodes stats
  S3 repository: Deprecate specifying credentials through env vars, sys props, and remove profile files (elastic#22567)
  Fix Eclipse project generation
  Fix deprecation logging for lenient booleans
  Remove @Header we no longer need
  Make lexer abstract
  [Docs] Remove outdated info about enabling/disabling doc_values (elastic#22694)
  Move lexer hacks to EnhancedPainlessLexer
  Fix incorrect args order passed to createAggregator
  Improve painless's javadocs
  Add TestWithDependenciesPlugin to build (elastic#22646)
  Add parsing from xContent to SearchProfileShardResults and nested classes (elastic#22649)
  Add unit tests for FiltersAggregator (elastic#22678)
  Don't register search response listener in transport clients
  unmute FieldStatsIntegrationIT.testGeoPointNotIndexed, fix already pushed
  Mute FieldStatsIntegrationIT.testGeoPointNotIndexed, for now
  Painless: Add augmentation to string for base 64 (elastic#22665)
  Fix NPE on FieldStats with mixed cluster on version pre/post 5.2 (elastic#22688)
  Add parsing methods for UpdateResponse (elastic#22586)
  ...
@sebunger
Copy link

Is there any chance to get this into a stable release of 5.2.x?

@nik9000
Copy link
Member Author

nik9000 commented Feb 23, 2017 via email

@sebunger
Copy link

Any idea when 5.3 will be released?

@jasontedor
Copy link
Member

Any idea when 5.3 will be released?

I'm really sorry @sebunger but we do not provide release dates.

@clintongormley clintongormley added :Core/Infra/Scripting Scripting abstractions, Painless, and Mustache and removed :Plugin Lang Painless labels Feb 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Core/Infra/Scripting Scripting abstractions, Painless, and Mustache >enhancement v5.3.0 v6.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants