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 2019/09/05 07:17:53 UTC

[GitHub] [incubator-shardingsphere] tristaZero edited a comment on issue #2923: when using EncryptPreparedStatement to savebatch occours error

tristaZero edited a comment on issue #2923: when using EncryptPreparedStatement to savebatch occours error
URL: https://github.com/apache/incubator-shardingsphere/issues/2923#issuecomment-528232286
 
 
   @xiyelife Thanks for [your kind pr](https://github.com/apache/incubator-shardingsphere/pull/2977) as well. Moreover, can you make this pr become better?
   Actually, the solution in this pr can just stop NPE, but it is necessary to sovle it completely, so we should change our mind to stop NPE at beginning.
   ---
   I suggest we can create a preparedStatement upon EncryptPreparedStatement is created, i.e, we should move `preparedStatement = preparedStatementGenerator.createPreparedStatement(sqlUnit.getSql());` from execute() or executeUpdate() to all the constructors of EncryptPreparedStatement.
   ---
   Therefore once EncryptPreparedStatement is created, the preparedStatement will be created as well, then NPE will never happen.
   ---
   If you have other advices, please contact me, or maybe you can modify [your kind pr](https://github.com/apache/incubator-shardingsphere/pull/2977) to perfect it. 😉 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services