java/code/src/com/redhat/rhn/taskomatic/task/repomd/RepositoryWriter.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
New commits:
commit c51d755737a75b8e624f9983054f004008fe753e
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Nov 30 11:45:38 2009 +0100
checking return value of channel.getChecksum()
null as return value caused a NullPointerException in
com.redhat.rhn.taskomatic.task.ChannelRepodata
diff --git a/java/code/src/com/redhat/rhn/taskomatic/task/repomd/RepositoryWriter.java
b/java/code/src/com/redhat/rhn/taskomatic/task/repomd/RepositoryWriter.java
index 37ba643..5bba05d 100644
--- a/java/code/src/com/redhat/rhn/taskomatic/task/repomd/RepositoryWriter.java
+++ b/java/code/src/com/redhat/rhn/taskomatic/task/repomd/RepositoryWriter.java
@@ -56,7 +56,7 @@ public class RepositoryWriter {
private String pathPrefix;
private String mountPoint;
private String checksumtype;
- private String checksumname;
+ private String checksumname = null;
/**
* Constructor takes in pathprefix and mountpoint
@@ -106,7 +106,9 @@ public class RepositoryWriter {
// Get compatible checksumType
this.checksumtype = channel.getChecksumType();
- this.checksumname = channel.getChecksum().getDescription();
+ if (channel.getChecksum() != null) {
+ this.checksumname = channel.getChecksum().getDescription();
+ }
log.info("Checksum Type Value" + this.checksumtype);
Show replies by date