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

Common: fix pattern matching against null in ScrambleMapFunction #338

Closed
chuwy opened this issue Sep 8, 2020 · 0 comments
Closed

Common: fix pattern matching against null in ScrambleMapFunction #338

chuwy opened this issue Sep 8, 2020 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@chuwy
Copy link
Contributor

chuwy commented Sep 8, 2020

In ScrambleMapFunction we match against AnyRef that fails against null and causes the following unhandled error:

scala.MatchError: null
    at com.snowplowanalytics.snowplow.enrich.common.enrichments.registry.pii.ScrambleMapFunction.map(PiiPseudonymizerEnrichment.scala:293)
    at com.jayway.jsonpath.internal.PathRef$ObjectMultiPropertyPathRef.convert(PathRef.java:301)
    at com.jayway.jsonpath.JsonPath.map(JsonPath.java:246)
    at com.jayway.jsonpath.internal.JsonContext.map(JsonContext.java:161)
    at com.jayway.jsonpath.internal.JsonContext.map(JsonContext.java:155)
    at com.snowplowanalytics.snowplow.enrich.common.enrichments.registry.pii.PiiJson.jsonPathReplace(PiiPseudonymizerEnrichment.scala:275)
    at com.snowplowanalytics.snowplow.enrich.common.enrichments.registry.pii.PiiJson.$anonfun$modifyObjectIfSchemaMatches$6(PiiPseudonymizerEnrichment.scala:255)
@chuwy chuwy added this to the 1.4.0 milestone Sep 8, 2020
@chuwy chuwy self-assigned this Sep 8, 2020
@chuwy chuwy changed the title Common: Common: fix pattern matching against null in ScrambleMapFunction Sep 8, 2020
@chuwy chuwy added the bug Something isn't working label Sep 8, 2020
@chuwy chuwy closed this as completed in 73c9ebf Oct 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant