You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/10/21 13:47:01 UTC
[GitHub] [shardingsphere] zzzwjZhang opened a new pull request, #21686: [ISSUE #21668] Fix nullPointer when encrypt value is null
zzzwjZhang opened a new pull request, #21686:
URL: https://github.com/apache/shardingsphere/pull/21686
Fixes #21668.
Changes proposed in this pull request:
- Fix NullPointerException when insert encrypt value is null
---
Before committing this PR, I'm sure that I have checked the following options:
- [ ] My code follows the [code of conduct](https://shardingsphere.apache.org/community/en/involved/conduct/code/) of this project.
- [ ] I have self-reviewed the commit code.
- [ ] I have (or in comment I request) added corresponding labels for the pull request.
- [ ] I have passed maven check locally : `mvn clean install -B -T2C -DskipTests -Dmaven.javadoc.skip=true -e`.
- [ ] I have made corresponding changes to the documentation.
- [ ] I have added corresponding unit tests for my changes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] strongduanmu commented on a diff in pull request #21686: [ISSUE #21668] Fix nullPointer when encrypt value is null
Posted by GitBox <gi...@apache.org>.
strongduanmu commented on code in PR #21686:
URL: https://github.com/apache/shardingsphere/pull/21686#discussion_r1002272206
##########
features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/rewrite/parameter/rewriter/EncryptInsertValueParameterRewriter.java:
##########
@@ -84,7 +84,7 @@ private void encryptInsertValues(final GroupedParameterBuilder parameterBuilder,
ExpressionSegment expressionSegment = insertStatementContext.getInsertValueContexts().get(count).getValueExpressions().get(columnIndex);
if (expressionSegment instanceof ParameterMarkerExpressionSegment) {
Object literalValue = insertStatementContext.getInsertValueContexts().get(count).getLiteralValue(columnIndex)
- .orElseThrow(() -> new UnsupportedEncryptInsertValueException(columnIndex));
Review Comment:
Can you add some integration test case for this logic?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] codecov-commenter commented on pull request #21686: [ISSUE #21668] Fix nullPointer when encrypt value is null
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #21686:
URL: https://github.com/apache/shardingsphere/pull/21686#issuecomment-1296161310
# [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/21686?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#21686](https://codecov.io/gh/apache/shardingsphere/pull/21686?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (c43c48c) into [master](https://codecov.io/gh/apache/shardingsphere/commit/50ea61223a9e30a692d2ae0be0f0746d439e8b18?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (50ea612) will **decrease** coverage by `0.15%`.
> The diff coverage is `71.69%`.
```diff
@@ Coverage Diff @@
## master #21686 +/- ##
============================================
- Coverage 61.07% 60.92% -0.16%
+ Complexity 2511 2445 -66
============================================
Files 4111 4107 -4
Lines 57332 57268 -64
Branches 9676 9678 +2
============================================
- Hits 35018 34892 -126
- Misses 19423 19474 +51
- Partials 2891 2902 +11
```
| [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/21686?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [.../rewriter/EncryptInsertValueParameterRewriter.java](https://codecov.io/gh/apache/shardingsphere/pull/21686/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZmVhdHVyZXMvZW5jcnlwdC9jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9lbmNyeXB0L3Jld3JpdGUvcGFyYW1ldGVyL3Jld3JpdGVyL0VuY3J5cHRJbnNlcnRWYWx1ZVBhcmFtZXRlclJld3JpdGVyLmphdmE=) | `2.17% <0.00%> (ø)` | |
| [...end/opengauss/err/OpenGaussErrorPacketFactory.java](https://codecov.io/gh/apache/shardingsphere/pull/21686/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHJveHkvZnJvbnRlbmQvb3BlbmdhdXNzL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9wcm94eS9mcm9udGVuZC9vcGVuZ2F1c3MvZXJyL09wZW5HYXVzc0Vycm9yUGFja2V0RmFjdG9yeS5qYXZh) | `54.54% <50.00%> (+54.54%)` | :arrow_up: |
| [.../command/generic/OpenGaussErrorResponsePacket.java](https://codecov.io/gh/apache/shardingsphere/pull/21686/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZGItcHJvdG9jb2wvb3BlbmdhdXNzL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9kYi9wcm90b2NvbC9vcGVuZ2F1c3MvcGFja2V0L2NvbW1hbmQvZ2VuZXJpYy9PcGVuR2F1c3NFcnJvclJlc3BvbnNlUGFja2V0LmphdmE=) | `71.42% <56.66%> (-24.23%)` | :arrow_down: |
| [...n/generator/EncryptInsertValuesTokenGenerator.java](https://codecov.io/gh/apache/shardingsphere/pull/21686/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZmVhdHVyZXMvZW5jcnlwdC9jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9lbmNyeXB0L3Jld3JpdGUvdG9rZW4vZ2VuZXJhdG9yL0VuY3J5cHRJbnNlcnRWYWx1ZXNUb2tlbkdlbmVyYXRvci5qYXZh) | `83.75% <100.00%> (ø)` | |
| [...nder/segment/insert/values/InsertValueContext.java](https://codecov.io/gh/apache/shardingsphere/pull/21686/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aW5mcmEvYmluZGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9pbmZyYS9iaW5kZXIvc2VnbWVudC9pbnNlcnQvdmFsdWVzL0luc2VydFZhbHVlQ29udGV4dC5qYXZh) | `76.00% <100.00%> (ø)` | |
| [...action/ShardingSphereTransactionManagerEngine.java](https://codecov.io/gh/apache/shardingsphere/pull/21686/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a2VybmVsL3RyYW5zYWN0aW9uL2NvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3RyYW5zYWN0aW9uL1NoYXJkaW5nU3BoZXJlVHJhbnNhY3Rpb25NYW5hZ2VyRW5naW5lLmphdmE=) | `85.71% <100.00%> (+2.38%)` | :arrow_up: |
| [...ardingsphere/transaction/rule/TransactionRule.java](https://codecov.io/gh/apache/shardingsphere/pull/21686/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a2VybmVsL3RyYW5zYWN0aW9uL2NvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3RyYW5zYWN0aW9uL3J1bGUvVHJhbnNhY3Rpb25SdWxlLmphdmE=) | `40.38% <100.00%> (-1.44%)` | :arrow_down: |
| [...ansaction/rule/builder/TransactionRuleBuilder.java](https://codecov.io/gh/apache/shardingsphere/pull/21686/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a2VybmVsL3RyYW5zYWN0aW9uL2NvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3RyYW5zYWN0aW9uL3J1bGUvYnVpbGRlci9UcmFuc2FjdGlvblJ1bGVCdWlsZGVyLmphdmE=) | `50.00% <100.00%> (ø)` | |
| [...r/update/AlterTransactionRuleStatementUpdater.java](https://codecov.io/gh/apache/shardingsphere/pull/21686/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a2VybmVsL3RyYW5zYWN0aW9uL2Rpc3RzcWwvaGFuZGxlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvdHJhbnNhY3Rpb24vZGlzdHNxbC9oYW5kbGVyL3VwZGF0ZS9BbHRlclRyYW5zYWN0aW9uUnVsZVN0YXRlbWVudFVwZGF0ZXIuamF2YQ==) | `90.00% <100.00%> (ø)` | |
| [...ta/at/SeataATShardingSphereTransactionManager.java](https://codecov.io/gh/apache/shardingsphere/pull/21686/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a2VybmVsL3RyYW5zYWN0aW9uL3R5cGUvYmFzZS9zZWF0YS1hdC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvdHJhbnNhY3Rpb24vYmFzZS9zZWF0YS9hdC9TZWF0YUFUU2hhcmRpbmdTcGhlcmVUcmFuc2FjdGlvbk1hbmFnZXIuamF2YQ==) | `92.00% <100.00%> (ø)` | |
| ... and [347 more](https://codecov.io/gh/apache/shardingsphere/pull/21686/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] strongduanmu merged pull request #21686: [ISSUE #21668] Fix nullPointer when encrypt value is null
Posted by GitBox <gi...@apache.org>.
strongduanmu merged PR #21686:
URL: https://github.com/apache/shardingsphere/pull/21686
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org