mirror of https://github.com/apache/archiva.git
only close session if open
getJcrSession will open one if needed, which close does not need to do. This also caused some timing issues in the REST tests as it concurrently operated on the same session
This commit is contained in:
parent
12a808a77d
commit
1e589ddd62
|
@ -1313,17 +1313,9 @@ public class JcrMetadataRepository
|
|||
public void close()
|
||||
throws MetadataRepositoryException
|
||||
{
|
||||
try
|
||||
if ( jcrSession != null && jcrSession.isLive() )
|
||||
{
|
||||
if ( getJcrSession().isLive() )
|
||||
{
|
||||
getJcrSession().logout();
|
||||
}
|
||||
}
|
||||
catch ( RepositoryException e )
|
||||
{
|
||||
log.error( e.getMessage(), e );
|
||||
throw new MetadataRepositoryException( e.getMessage(), e );
|
||||
jcrSession.logout();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue