From 97792e85e1dce666dee37ee52a18d895247b1653 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Fri, 28 Jun 2019 16:55:54 -0700 Subject: [PATCH] lockmanager: disable internal QuorumLockManager methods that should never be reached Change-Id: If19f48f8c2d3fe8a38068b09d8691bc8f4eb5d46 --- .../libs/lockmanager/QuorumLockManager.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/includes/libs/lockmanager/QuorumLockManager.php b/includes/libs/lockmanager/QuorumLockManager.php index 1ef4642a84..950b283670 100644 --- a/includes/libs/lockmanager/QuorumLockManager.php +++ b/includes/libs/lockmanager/QuorumLockManager.php @@ -35,15 +35,7 @@ abstract class QuorumLockManager extends LockManager { /** @var array Map of degraded buckets */ protected $degradedBuckets = []; // (bucket index => UNIX timestamp) - final protected function doLock( array $paths, $type ) { - return $this->doLockByType( [ $type => $paths ] ); - } - - final protected function doUnlock( array $paths, $type ) { - return $this->doUnlockByType( [ $type => $paths ] ); - } - - protected function doLockByType( array $pathsByType ) { + final protected function doLockByType( array $pathsByType ) { $status = StatusValue::newGood(); $pathsToLock = []; // (bucket => type => paths) @@ -278,4 +270,12 @@ abstract class QuorumLockManager extends LockManager { * @return StatusValue */ abstract protected function releaseAllLocks(); + + final protected function doLock( array $paths, $type ) { + throw new LogicException( __METHOD__ . ': proxy class does not need this method.' ); + } + + final protected function doUnlock( array $paths, $type ) { + throw new LogicException( __METHOD__ . ': proxy class does not need this method.' ); + } } -- 2.20.1