java/code/src/com/redhat/rhn/common/db/datasource/xml/config_queries.xml | 6 ++-- java/code/src/org/cobbler/CobblerObject.java | 14 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-)
New commits: commit 92e0bcca067526ec3c5d812ca83be39e345ea603 Author: Johannes Renner jrenner@suse.de Date: Tue Nov 29 16:17:34 2011 +0100
Fix query to determine config channels in SSM
diff --git a/java/code/src/com/redhat/rhn/common/db/datasource/xml/config_queries.xml b/java/code/src/com/redhat/rhn/common/db/datasource/xml/config_queries.xml index 38ae5a4..3e6784e 100644 --- a/java/code/src/com/redhat/rhn/common/db/datasource/xml/config_queries.xml +++ b/java/code/src/com/redhat/rhn/common/db/datasource/xml/config_queries.xml @@ -2096,8 +2096,8 @@ SELECT CC.id, CC.name FROM rhnSet RS LEFT OUTER JOIN rhnServerConfigChannel SCC ON RS.element = SCC.server_id WHERE RS.label = 'system_list' - AND SCC.config_channel_id = XXX.config_channel_id - AND SCC.server_id = null) ) + AND SCC.config_channel_id is null + AND SCC.server_id is null) ) ORDER BY UPPER(CC.name) </query> <elaborator name="ssm_channel_elab" /> @@ -2126,7 +2126,7 @@ SELECT CC.id, CC.name FROM rhnSet RS LEFT OUTER JOIN rhnServerConfigChannel SCC ON RS.element = SCC.server_id WHERE RS.label = 'system_list' - AND SCC.config_channel_id = XXX.config_channel_id + AND SCC.config_channel_id is null AND SCC.server_id is null) ) ORDER BY UPPER(CC.name) </query>
commit cd6114a6363e54c537d2df56d4802befc51e43f9 Author: Tomas Lestach tlestach@redhat.com Date: Mon Dec 5 13:57:10 2011 +0100
fix checkstyle issues
diff --git a/java/code/src/org/cobbler/CobblerObject.java b/java/code/src/org/cobbler/CobblerObject.java index 647dbfa..c40e46a 100644 --- a/java/code/src/org/cobbler/CobblerObject.java +++ b/java/code/src/org/cobbler/CobblerObject.java @@ -339,12 +339,14 @@ public abstract class CobblerObject { for (String key : map.keySet()) { if (map.get(key) == null) { string.append(key + " "); - } else if(map.get(key) instanceof List<?>){ + } + else if (map.get(key) instanceof List<?>) { List<String> values = (List)map.get(key); for (String value : values) { string.append(key + "=" + value + " "); } - } else { + } + else { string.append(key + "=" + map.get(key) + " "); } } @@ -386,13 +388,15 @@ public abstract class CobblerObject { String[] split = option.split("="); if (split.length == 1) { toRet.put(split[0], null); - } else if (split.length == 2) { + } + else if (split.length == 2) { if (toRet.containsKey(split[0])) { List<String> list = (List)toRet.get(split[0]); list.add(split[1]); toRet.put(split[0], list); - } else { - toRet.put(split[0],new ArrayList<String>(Arrays.asList(split[1]))); + } + else { + toRet.put(split[0], new ArrayList<String>(Arrays.asList(split[1]))); } } }
spacewalk-commits@lists.fedorahosted.org