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/22 00:26:19 UTC

[GitHub] [shardingsphere] strongduanmu commented on a diff in pull request #21686: [ISSUE #21668] Fix nullPointer when encrypt value is null

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