mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-25 15:41:21 +02:00
final is cleaner.
This commit is contained in:
@@ -33,7 +33,6 @@ public class Kits extends AsyncStorageObjectHolder<com.earth2me.essentials.setti
|
|||||||
@Override
|
@Override
|
||||||
public Kit getKit(String kitName) throws Exception
|
public Kit getKit(String kitName) throws Exception
|
||||||
{
|
{
|
||||||
Kit kit;
|
|
||||||
acquireReadLock();
|
acquireReadLock();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -42,18 +41,17 @@ public class Kits extends AsyncStorageObjectHolder<com.earth2me.essentials.setti
|
|||||||
{
|
{
|
||||||
throw new Exception(_("kitError2"));
|
throw new Exception(_("kitError2"));
|
||||||
}
|
}
|
||||||
kit = getData().getKits().get(kitName.toLowerCase(Locale.ENGLISH));
|
final Kit kit = getData().getKits().get(kitName.toLowerCase(Locale.ENGLISH));
|
||||||
if (kit == null)
|
if (kit == null)
|
||||||
{
|
{
|
||||||
throw new Exception(_("kitError2"));
|
throw new Exception(_("kitError2"));
|
||||||
}
|
}
|
||||||
|
return kit;
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
unlock();
|
unlock();
|
||||||
}
|
}
|
||||||
return kit;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Reference in New Issue
Block a user