dbin0123 opened a new issue, #21948:
URL: https://github.com/apache/shardingsphere/issues/21948
the encryption field is empty, causing abnormal data encryption, version
5.2.1
Exception information
`java.lang.NullPointerException
at java.util.Objects.requireNonNull(Objects.java:203)
at java.util.Optional.<init>(Optional.java:96)
at java.util.Optional.of(Optional.java:108)
at
org.apache.shardingsphere.infra.binder.segment.insert.values.InsertValueContext.getLiteralValue(InsertValueContext.java:80)
at
org.apache.shardingsphere.encrypt.rewrite.parameter.rewriter.EncryptInsertValueParameterRewriter.encryptInsertValues(EncryptInsertValueParameterRewriter.java:86)
at
org.apache.shardingsphere.encrypt.rewrite.parameter.rewriter.EncryptInsertValueParameterRewriter.lambda$rewrite$1(EncryptInsertValueParameterRewriter.java:71)
at java.util.Optional.ifPresent(Optional.java:159)
at
org.apache.shardingsphere.encrypt.rewrite.parameter.rewriter.EncryptInsertValueParameterRewriter.rewrite(EncryptInsertValueParameterRewriter.java:71)
at
org.apache.shardingsphere.encrypt.rewrite.parameter.rewriter.EncryptInsertValueParameterRewriter.rewrite(EncryptInsertValueParameterRewriter.java:50)
at
org.apache.shardingsphere.encrypt.rewrite.context.EncryptSQLRewriteContextDecorator.rewriteParameters(EncryptSQLRewriteContextDecorator.java:89)
at
org.apache.shardingsphere.encrypt.rewrite.context.EncryptSQLRewriteContextDecorator.decorate(EncryptSQLRewriteContextDecorator.java:58)
at
org.apache.shardingsphere.encrypt.rewrite.context.EncryptSQLRewriteContextDecorator.decorate(EncryptSQLRewriteContextDecorator.java:44)`
Get the encrypted field literal method to save
`org.apache.shardingsphere.infra.binder.segment.insert.values.InsertValueContext.getLiteralValue`
![Uploading image.png…]()
Using the `of' method of the 'Optional' class causes a null pointer exception
--
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:
[email protected]
For queries about this service, please contact Infrastructure at:
[email protected]