]> source.dussan.org Git - archiva.git/commitdiff
revert some changes to use a RuntimeException
authorOlivier Lamy <olamy@apache.org>
Sat, 25 Feb 2012 22:53:45 +0000 (22:53 +0000)
committerOlivier Lamy <olamy@apache.org>
Sat, 25 Feb 2012 22:53:45 +0000 (22:53 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1293719 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/MetadataRepository.java
archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/RepositorySession.java
archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrMetadataRepository.java

index 4e84500700993363a0a758821ff6ead1cbc3097c..4d484f51ecf67fece1856e1bbfb9a9d7a29592b0 100644 (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 );
 
index 07be9cc1b303de8d6b1a4b2c0d256315ae276cc6..31bc8843588d76d206aa9a9628a6c659113f9dcb 100644 (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();
index 11722351d982209bdca4441a9f997209780bc925..24b9632f50a4b562eb0fdd927996f22d4882f7c0 100644 (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 );
         }
     }