cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anto...@apache.org
Subject svn commit: r568780 - /cocoon/trunk/blocks/cocoon-poi/cocoon-poi-impl/src/main/java/org/apache/cocoon/components/elementprocessor/impl/poi/hssf/elements/ColorCode.java
Date Thu, 23 Aug 2007 00:10:40 GMT
Author: antonio
Date: Wed Aug 22 17:10:40 2007
New Revision: 568780

URL: http://svn.apache.org/viewvc?rev=568780&view=rev
Log:
Right fix for COCOON-1440. Thanks to Carlos Chávez (cchavez@agssa.net).

Modified:
    cocoon/trunk/blocks/cocoon-poi/cocoon-poi-impl/src/main/java/org/apache/cocoon/components/elementprocessor/impl/poi/hssf/elements/ColorCode.java

Modified: cocoon/trunk/blocks/cocoon-poi/cocoon-poi-impl/src/main/java/org/apache/cocoon/components/elementprocessor/impl/poi/hssf/elements/ColorCode.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-poi/cocoon-poi-impl/src/main/java/org/apache/cocoon/components/elementprocessor/impl/poi/hssf/elements/ColorCode.java?rev=568780&r1=568779&r2=568780&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-poi/cocoon-poi-impl/src/main/java/org/apache/cocoon/components/elementprocessor/impl/poi/hssf/elements/ColorCode.java
(original)
+++ cocoon/trunk/blocks/cocoon-poi/cocoon-poi-impl/src/main/java/org/apache/cocoon/components/elementprocessor/impl/poi/hssf/elements/ColorCode.java
Wed Aug 22 17:10:40 2007
@@ -44,7 +44,6 @@
      */
 
     public ColorCode(final String value) throws IOException {
-        rgbstring = value;
         if (value == null) {
             throw new IOException("cannot process a null color code");
         }
@@ -59,7 +58,7 @@
             try {
                 _components[j] = Integer.parseInt(tokenizer.nextToken(), 16);
             } catch (Exception e) {
-                throw new IOException("cannot parse component #" + j + " ("
+                throw new IOException("Cannot parse component #" + j + " ("
                                       + e.getMessage() + ")");
             }
             if (_components[j] < 0 || _components[j] > 65535) {
@@ -68,8 +67,7 @@
             if (j > 0) {
                 constructedRgbString.append(SEPARATOR);
             }
-            constructedRgbString.append(
-                StringUtils.leftPad(Integer.toHexString(_components[j]), 4, '0').toUpperCase());
+            constructedRgbString.append(Integer.toHexString(_components[j]).toUpperCase());
         }
         rgbstring = constructedRgbString.toString();
     }



Mime
View raw message