java/code/src/com/redhat/rhn/domain/channel/ClonedChannel.java | 15 ++++++++++
1 file changed, 15 insertions(+)
New commits:
commit 11e1848cb0274990d7b9eea378f95e2f635fd78a
Author: Pradeep Kilambi <pkilambi(a)redhat.com>
Date: Thu Aug 13 13:43:33 2009 -0400
fixing the cloned channel creation to use the original channels checksum type and set
to db. Once the cloned logic is converted from perl to java we can do this more nicely.
diff --git a/java/code/src/com/redhat/rhn/domain/channel/ClonedChannel.java
b/java/code/src/com/redhat/rhn/domain/channel/ClonedChannel.java
index 8259495..35381db 100644
--- a/java/code/src/com/redhat/rhn/domain/channel/ClonedChannel.java
+++ b/java/code/src/com/redhat/rhn/domain/channel/ClonedChannel.java
@@ -14,6 +14,8 @@
*/
package com.redhat.rhn.domain.channel;
+import com.redhat.rhn.domain.common.ChecksumType;
+
/**
* ClonedChannel
* @version $Rev$
@@ -43,4 +45,17 @@ public class ClonedChannel extends Channel {
public boolean isCloned() {
return true;
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ChecksumType getChecksum() {
+ if (super.getChecksum() == null) {
+ // if the checksum type is not set use the
+ //checksum of original channel instead.
+ setChecksum(getOriginal().getChecksum());
+ }
+ return super.getChecksum();
+ }
}
Show replies by date