Skip to content
Browse files

updated based on CR feedback

 NXCM-5181 - Can't install new license into expired trial.
  • Loading branch information...
1 parent f11fba9 commit 9721c1bbd59e57fbe197f535deb09ec9a3109cbf @kellyrob99 kellyrob99 committed Apr 9, 2013
Showing with 15 additions and 20 deletions.
  1. +15 −20 nexus-core/src/main/java/org/sonatype/nexus/AbstractApplicationStatusSource.java
View
35 nexus-core/src/main/java/org/sonatype/nexus/AbstractApplicationStatusSource.java
@@ -75,46 +75,41 @@ protected ReadWriteLock getLock()
*/
public SystemStatus getSystemStatus()
{
- return doGetSystemStatus(false);
- }
+ updateSystemStatusIfNeeded( false );
- /**
- * Returns the SystemStatus, forcing an update of possibly cached information, and guaranteeing its consistent state.
- */
- public SystemStatus getUpdatedSystemStatus()
- {
- return doGetSystemStatus( true );
- }
-
- public boolean setState( SystemState state )
- {
- Lock lock = getLock().writeLock();
+ Lock lock = getLock().readLock();
lock.lock();
try
{
- getSystemStatusInternal().setState( state );
-
- return true;
+ return getSystemStatusInternal();
}
finally
{
lock.unlock();
}
}
- private SystemStatus doGetSystemStatus(boolean force)
+ /**
+ * Force an update of SystemStatus.
+ */
+ public void updateSystemStatus()
{
- updateSystemStatusIfNeeded( force );
+ updateSystemStatusIfNeeded( true );
+ }
- Lock lock = getLock().readLock();
+ public boolean setState( SystemState state )
+ {
+ Lock lock = getLock().writeLock();
lock.lock();
try
{
- return getSystemStatusInternal();
+ getSystemStatusInternal().setState( state );
+
+ return true;
}
finally
{

0 comments on commit 9721c1b

Please sign in to comment.
Something went wrong with that request. Please try again.