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/03/31 12:23:12 UTC

[GitHub] [shardingsphere] soulasuna commented on a change in pull request #16523: Fix is locked schema NPE

soulasuna commented on a change in pull request #16523:
URL: https://github.com/apache/shardingsphere/pull/16523#discussion_r839542208



##########
File path: shardingsphere-mode/shardingsphere-mode-type/shardingsphere-memory-mode/shardingsphere-memory-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/memory/lock/MemoryLockContext.java
##########
@@ -56,7 +58,6 @@ public ShardingSphereLock getOrCreateSchemaLock(final String schemaName) {
     
     @Override
     public boolean isLockedSchema(final String schemaName) {
-        ShardingSphereLock shardingSphereLock = locks.get(schemaName);
-        return null != shardingSphereLock && shardingSphereLock.isLocked(schemaName);
+        return null != schemaName && null != locks.get(schemaName) && locks.get(schemaName).isLocked(schemaName);
     }

Review comment:
       I will fix.




-- 
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