java/code/src/com/redhat/rhn/domain/channel/ClonedChannel.java | 15 ++++++++++ 1 file changed, 15 insertions(+)
New commits: commit 1949d15abbc1dae321a1b54431602b89892c7f32 Author: Pradeep Kilambi pkilambi@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(); + } }