java/code/src/com/redhat/rhn/domain/channel/Channel.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit 7c8a5a673b6388c11848a54b7790148a318f288f
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Dec 2 12:19:13 2009 +0100
checking return value of channel.getChecksum()
null as return value caused a NullPointerException in
com.redhat.rhn.taskomatic.task.ChannelRepodata (for cloned channels)
related to c51d755737a75b8e624f9983054f004008fe753e
diff --git a/java/code/src/com/redhat/rhn/domain/channel/Channel.java
b/java/code/src/com/redhat/rhn/domain/channel/Channel.java
index a636567..27267cc 100644
--- a/java/code/src/com/redhat/rhn/domain/channel/Channel.java
+++ b/java/code/src/com/redhat/rhn/domain/channel/Channel.java
@@ -898,9 +898,9 @@ public class Channel extends BaseDomainHelper implements Comparable {
// IF its custom use the one set at channel creation time
if (toConsider.isCustom()) {
- String checksumOut = toConsider.getChecksum().getLabel();
- if (checksumOut != null) {
- return checksumOut;
+ ChecksumType checksumOut = toConsider.getChecksum();
+ if ((checksumOut != null) && (checksumOut.getLabel() != null)) {
+ return checksumOut.getLabel();
}
else {
// default to sha1 if its not available in the db
Show replies by date