Hey,

apparently the method getColumnLabel() of class ResultSetMetaData returns the 
column
label in uppercase with Oracle 11 (using ojdbc5.jar). Therefore an 
equals("cve") in
SecurityErrataOverview.java is not sufficient anymore and leads to an empty 
"CVEs"
column in the listing of relevant security errata:

https://<hostname>/rhn/errata/RelevantSecurityErrata.do

The attached patch fixes the problem by replacing equals with 
equalsIgnoreCase().

Regards,
Johannes

-- 
SUSE LINUX Products GmbH, HRB 16746 (AG Nürnberg)
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer
>From dd9bf777412f470c7a8fee58408b495036f0d55b Mon Sep 17 00:00:00 2001
From: Johannes Renner <jren...@suse.de>
Date: Fri, 17 Aug 2012 12:06:49 +0200
Subject: [PATCH] Fix missing CVEs in patches listing with Oracle 11

---
 .../rhn/frontend/dto/SecurityErrataOverview.java   |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/java/code/src/com/redhat/rhn/frontend/dto/SecurityErrataOverview.java b/java/code/src/com/redhat/rhn/frontend/dto/SecurityErrataOverview.java
index 070d561..62a0db1 100644
--- a/java/code/src/com/redhat/rhn/frontend/dto/SecurityErrataOverview.java
+++ b/java/code/src/com/redhat/rhn/frontend/dto/SecurityErrataOverview.java
@@ -52,7 +52,7 @@ public class SecurityErrataOverview extends ErrataOverview
                 // expected errata_cves_elab returns 2 columns
                 if (columnCount < 3) {
                     for (int i = 1; i <= columnCount; i++) {
-                        if (meta.getColumnLabel(i).equals("cve")) {
+                        if (meta.getColumnLabel(i).equalsIgnoreCase("cve")) {
                             String cve = rs.getString("cve");
                             if (cve != null) {
                                 addCve(cve);
-- 
1.7.7

_______________________________________________
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Reply via email to