summaryrefslogtreecommitdiffstats
path: root/archiva-modules
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2012-02-25 22:53:45 +0000
committerOlivier Lamy <olamy@apache.org>2012-02-25 22:53:45 +0000
commit496920391cacd0e1f220c247e723834634f6cdd6 (patch)
tree7f8272d17ea882e815ad82f183c416a866f49970 /archiva-modules
parent773d2784a5bd9393e786b911074b590ac2f5b50d (diff)
downloadarchiva-496920391cacd0e1f220c247e723834634f6cdd6.tar.gz
archiva-496920391cacd0e1f220c247e723834634f6cdd6.zip
revert some changes to use a RuntimeException
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1293719 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules')
-rw-r--r--archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/MetadataRepository.java6
-rw-r--r--archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/RepositorySession.java7
-rw-r--r--archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrMetadataRepository.java6
3 files changed, 4 insertions, 15 deletions
diff --git a/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/MetadataRepository.java b/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/MetadataRepository.java
index 4e8450070..4d484f51e 100644
--- a/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/MetadataRepository.java
+++ b/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/MetadataRepository.java
@@ -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 );
diff --git a/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/RepositorySession.java b/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/RepositorySession.java
index 07be9cc1b..31bc88435 100644
--- a/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/RepositorySession.java
+++ b/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/RepositorySession.java
@@ -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();
diff --git a/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrMetadataRepository.java b/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrMetadataRepository.java
index 11722351d..24b9632f5 100644
--- a/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrMetadataRepository.java
+++ b/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrMetadataRepository.java
@@ -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 );
}
}