karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbono...@apache.org
Subject [1/2] karaf-cave git commit: [KARAF-4528] Fix CaveRepositoryMBeanImpl to avoid to throw undesired IllegalArgumentException
Date Tue, 12 Jul 2016 16:52:14 GMT
Repository: karaf-cave
Updated Branches:
  refs/heads/master d9a57d164 -> d98cd2834


[KARAF-4528] Fix CaveRepositoryMBeanImpl to avoid to throw undesired IllegalArgumentException


Project: http://git-wip-us.apache.org/repos/asf/karaf-cave/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf-cave/commit/b9ecdf13
Tree: http://git-wip-us.apache.org/repos/asf/karaf-cave/tree/b9ecdf13
Diff: http://git-wip-us.apache.org/repos/asf/karaf-cave/diff/b9ecdf13

Branch: refs/heads/master
Commit: b9ecdf134a2f53a57ebad8e08ab61e3e3118dc2e
Parents: d9a57d1
Author: rakechan <rakechan@gmail.com>
Authored: Sat Jul 9 23:24:05 2016 +0530
Committer: Jean-Baptiste Onofré <jbonofre@apache.org>
Committed: Tue Jul 12 18:46:59 2016 +0200

----------------------------------------------------------------------
 .../management/internal/CaveRepositoryMBeanImpl.java  | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf-cave/blob/b9ecdf13/server/management/src/main/java/org/apache/karaf/cave/server/management/internal/CaveRepositoryMBeanImpl.java
----------------------------------------------------------------------
diff --git a/server/management/src/main/java/org/apache/karaf/cave/server/management/internal/CaveRepositoryMBeanImpl.java
b/server/management/src/main/java/org/apache/karaf/cave/server/management/internal/CaveRepositoryMBeanImpl.java
index cb2d403..f0ab7f0 100644
--- a/server/management/src/main/java/org/apache/karaf/cave/server/management/internal/CaveRepositoryMBeanImpl.java
+++ b/server/management/src/main/java/org/apache/karaf/cave/server/management/internal/CaveRepositoryMBeanImpl.java
@@ -84,28 +84,28 @@ public class CaveRepositoryMBeanImpl extends StandardMBean implements
CaveReposi
     }
 
     public void destroyRepository(String name) throws Exception {
-        if (getCaveRepositoryService().getRepository(name) != null) {
+        if (getCaveRepositoryService().getRepository(name) == null) {
             throw new IllegalArgumentException("Cave repository " + name + " doesn't exist");
         }
         caveRepositoryService.destroy(name);
     }
 
     public void installRepository(String name) throws Exception {
-        if (getCaveRepositoryService().getRepository(name) != null) {
+        if (getCaveRepositoryService().getRepository(name) == null) {
             throw new IllegalArgumentException("Cave repository " + name + " doesn't exist");
         }
         caveRepositoryService.install(name);
     }
 
     public void uninstallRepository(String name) throws Exception {
-        if (getCaveRepositoryService().getRepository(name) != null) {
+        if (getCaveRepositoryService().getRepository(name) == null) {
             throw new IllegalArgumentException("Cave repository " + name + " doesn't exist");
         }
         caveRepositoryService.uninstall(name);
     }
 
     public void populateRepository(String name, String url, boolean generate, String filter)
throws Exception {
-        if (getCaveRepositoryService().getRepository(name) != null) {
+        if (getCaveRepositoryService().getRepository(name) == null) {
             throw new IllegalArgumentException("Cave repository " + name + " doesn't exist");
         }
         CaveRepository repository = getCaveRepositoryService().getRepository(name);
@@ -116,7 +116,7 @@ public class CaveRepositoryMBeanImpl extends StandardMBean implements
CaveReposi
     }
 
     public void proxyRepository(String name, String url, boolean generate, String filter)
throws Exception {
-        if (getCaveRepositoryService().getRepository(name) != null) {
+        if (getCaveRepositoryService().getRepository(name) == null) {
             throw new IllegalArgumentException("Cave repository " + name + " doesn't exist");
         }
         CaveRepository repository = getCaveRepositoryService().getRepository(name);
@@ -127,7 +127,7 @@ public class CaveRepositoryMBeanImpl extends StandardMBean implements
CaveReposi
     }
 
     public void updateRepository(String name) throws Exception {
-        if (getCaveRepositoryService().getRepository(name) != null) {
+        if (getCaveRepositoryService().getRepository(name) == null) {
             throw new IllegalArgumentException("Cave repository " + name + " doesn't exist");
         }
         CaveRepository caveRepository = getCaveRepositoryService().getRepository(name);
@@ -135,7 +135,7 @@ public class CaveRepositoryMBeanImpl extends StandardMBean implements
CaveReposi
     }
 
     public void uploadArtifact(String repository, String artifactUrl, boolean generate) throws
Exception {
-        if (getCaveRepositoryService().getRepository(repository) != null) {
+        if (getCaveRepositoryService().getRepository(repository) == null) {
             throw new IllegalArgumentException("Cave repository " + repository + " doesn't
exist");
         }
         CaveRepository caveRepository = getCaveRepositoryService().getRepository(repository);


Mime
View raw message