java/code/src/com/redhat/rhn/frontend/xmlrpc/system/SystemHandler.java | 13 ++++++++--
java/spacewalk-java.spec | 5 +++
rel-eng/packages/spacewalk-java | 2 -
3 files changed, 16 insertions(+), 4 deletions(-)
New commits:
commit 52a65aad86a4bf5525c90af39a5bcc0882d44c61
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu May 24 23:03:47 2012 +0200
Automatic commit of package [spacewalk-java] release [1.8.74-1].
diff --git a/java/spacewalk-java.spec b/java/spacewalk-java.spec
index 6a13730..0a7d734 100644
--- a/java/spacewalk-java.spec
+++ b/java/spacewalk-java.spec
@@ -22,7 +22,7 @@ Name: spacewalk-java
Summary: Spacewalk Java site packages
Group: Applications/Internet
License: GPLv2
-Version: 1.8.73
+Version: 1.8.74
Release: 1%{?dist}
URL:
https://fedorahosted.org/spacewalk
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -605,6 +605,9 @@ fi
%{jardir}/postgresql-jdbc.jar
%changelog
+* Thu May 24 2012 Miroslav Suchý <msuchy(a)redhat.com> 1.8.74-1
+- 825024 - API *must* check for compatible channels in system.setBaseChannel()
+
* Thu May 24 2012 Miroslav Suchý <msuchy(a)redhat.com> 1.8.73-1
- 820987 - fix error during backporting
- 820987 - do not guess creator name
diff --git a/rel-eng/packages/spacewalk-java b/rel-eng/packages/spacewalk-java
index 31e94e1..cbff66e 100644
--- a/rel-eng/packages/spacewalk-java
+++ b/rel-eng/packages/spacewalk-java
@@ -1 +1 @@
-1.8.73-1 java/
+1.8.74-1 java/
commit b3227d5e7a56944b7e9b62529ffba7a69d03963e
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu May 24 23:03:03 2012 +0200
825024 - API *must* check for compatible channels in system.setBaseChannel()
backported from hosted commit 7fa497ea87861b69cfa30e50418f24347a275fa3
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/system/SystemHandler.java
b/java/code/src/com/redhat/rhn/frontend/xmlrpc/system/SystemHandler.java
index 0bd4298..df662fd 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/system/SystemHandler.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/system/SystemHandler.java
@@ -84,6 +84,7 @@ import com.redhat.rhn.frontend.xmlrpc.BaseHandler;
import com.redhat.rhn.frontend.xmlrpc.InvalidActionTypeException;
import com.redhat.rhn.frontend.xmlrpc.InvalidChannelLabelException;
import com.redhat.rhn.frontend.xmlrpc.InvalidChannelListException;
+import com.redhat.rhn.frontend.xmlrpc.InvalidChannelException;
import com.redhat.rhn.frontend.xmlrpc.InvalidEntitlementException;
import com.redhat.rhn.frontend.xmlrpc.InvalidPackageException;
import com.redhat.rhn.frontend.xmlrpc.InvalidProfileLabelException;
@@ -414,7 +415,11 @@ public class SystemHandler extends BaseHandler {
Server server = lookupServer(loggedInUser, sid);
UpdateBaseChannelCommand cmd =
new UpdateBaseChannelCommand(loggedInUser, server, new
Long(cid.longValue()));
- cmd.store();
+ ValidatorError ve = cmd.store();
+ if (ve != null) {
+ throw new InvalidChannelException(
+ LocalizationService.getInstance().getMessage(ve.getKey(),
ve.getValues()));
+ }
return 1;
}
@@ -465,7 +470,11 @@ public class SystemHandler extends BaseHandler {
throw new InvalidChannelLabelException();
}
}
- cmd.store();
+ ValidatorError ve = cmd.store();
+ if (ve != null) {
+ throw new InvalidChannelException(
+ LocalizationService.getInstance().getMessage(ve.getKey(),
ve.getValues()));
+ }
return 1;
}