[jboss-cvs] JBossAS SVN: r82526 - trunk/system/src/main/org/jboss/system/server/profileservice/repository.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Dec 23 09:01:56 EST 2008
Author: alesj
Date: 2008-12-23 09:01:55 -0500 (Tue, 23 Dec 2008)
New Revision: 82526
Modified:
trunk/system/src/main/org/jboss/system/server/profileservice/repository/SerializableDeploymentRepository.java
Log:
Simplify.
Modified: trunk/system/src/main/org/jboss/system/server/profileservice/repository/SerializableDeploymentRepository.java
===================================================================
--- trunk/system/src/main/org/jboss/system/server/profileservice/repository/SerializableDeploymentRepository.java 2008-12-23 13:39:34 UTC (rev 82525)
+++ trunk/system/src/main/org/jboss/system/server/profileservice/repository/SerializableDeploymentRepository.java 2008-12-23 14:01:55 UTC (rev 82526)
@@ -366,24 +366,21 @@
public int lockDeploymentContent(String vfsPath, DeploymentPhase phase)
{
if( log.isTraceEnabled() )
- log.trace("lockDeploymentContent, "+vfsPath);
- int flags = setDeploymentContentFlags(vfsPath, phase, DeploymentContentFlags.LOCKED);
- return flags;
+ log.trace("lockDeploymentContent, "+vfsPath);
+ return setDeploymentContentFlags(vfsPath, phase, DeploymentContentFlags.LOCKED);
}
public int unlockDeploymentContent(String vfsPath, DeploymentPhase phase)
{
if( log.isTraceEnabled() )
- log.trace("unlockDeploymentContent, "+vfsPath);
- int flags = clearDeploymentContentFlags(vfsPath, phase, DeploymentContentFlags.LOCKED);
- return flags;
+ log.trace("unlockDeploymentContent, "+vfsPath);
+ return clearDeploymentContentFlags(vfsPath, phase, DeploymentContentFlags.LOCKED);
}
public int getDeploymentContentFlags(String vfsPath, DeploymentPhase phase)
{
Integer flags = contentFlags.get(vfsPath);
- int iflags = flags != null ? flags.intValue() : 0;
- return iflags;
+ return flags != null ? flags : 0;
}
public synchronized int clearDeploymentContentFlags(String vfsPath,
DeploymentPhase phase,
@@ -395,8 +392,7 @@
dflags &= ~flags;
contentFlags.put(vfsPath, dflags);
}
- int iflags = dflags != null ? dflags.intValue() : 0;
- return iflags;
+ return dflags != null ? dflags : 0;
}
public boolean hasDeploymentContentFlags(String vfsPath, DeploymentPhase phase,
int flag)
@@ -404,7 +400,7 @@
Integer flags = contentFlags.get(vfsPath);
boolean hasFlag = false;
if(flags != null )
- hasFlag = (flags & flag) != 0 ? true : false;
+ hasFlag = (flags & flag) != 0;
return hasFlag;
}
public int setDeploymentContentFlags(String vfsPath, DeploymentPhase phase,
More information about the jboss-cvs-commits
mailing list