revert some changes to use a RuntimeException

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1293719 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2012-02-25 22:53:45 +00:00
parent 773d2784a5
commit 496920391c
3 changed files with 4 additions and 15 deletions

View File

@ -130,13 +130,11 @@ public interface MetadataRepository
String projectVersion )
throws MetadataResolutionException;
void save()
throws MetadataRepositoryException;
void save();
void close();
void revert()
throws MetadataRepositoryException;
void revert();
boolean canObtainAccess( Class<?> aClass );

View File

@ -65,7 +65,6 @@ public class RepositorySession
}
public void save()
throws MetadataRepositoryException
{
repository.save();
@ -73,7 +72,6 @@ public class RepositorySession
}
public void revert()
throws MetadataRepositoryException
{
repository.revert();
dirty = false;
@ -94,11 +92,6 @@ public class RepositorySession
save();
}
}
catch ( MetadataRepositoryException e )
{
// olamy use revert here ?
throw new RuntimeException( e.getMessage(), e );
}
finally
{
repository.close();

View File

@ -1021,7 +1021,6 @@ public class JcrMetadataRepository
}
public void save()
throws MetadataRepositoryException
{
try
{
@ -1029,12 +1028,11 @@ public class JcrMetadataRepository
}
catch ( RepositoryException e )
{
throw new MetadataRepositoryException( e.getMessage(), e );
throw new RuntimeException( e.getMessage(), e );
}
}
public void revert()
throws MetadataRepositoryException
{
try
{
@ -1042,7 +1040,7 @@ public class JcrMetadataRepository
}
catch ( RepositoryException e )
{
throw new MetadataRepositoryException( e.getMessage(), e );
throw new RuntimeException( e.getMessage(), e );
}
}