W3C home > Mailing lists > Public > www-validator-cvs@w3.org > April 2012

2002/css-validator/org/w3c/css/properties/css3 CssBackground.java,1.3,1.4 CssBoxShadow.java,1.5,1.6

From: Yves Lafon via cvs-syncmail <cvsmail@w3.org>
Date: Wed, 04 Apr 2012 14:36:27 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1SFRJz-0007lV-DU@lionel-hutz.w3.org>
Update of /sources/public/2002/css-validator/org/w3c/css/properties/css3
In directory hutz:/tmp/cvs-serv29832/css/properties/css3

Modified Files:
	CssBackground.java CssBoxShadow.java 
Log Message:
added @spec links

Index: CssBoxShadow.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css3/CssBoxShadow.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- CssBoxShadow.java	4 Apr 2012 14:21:10 -0000	1.5
+++ CssBoxShadow.java	4 Apr 2012 14:36:25 -0000	1.6
@@ -24,6 +24,9 @@
 import static org.w3c.css.values.CssOperator.COMMA;
 import static org.w3c.css.values.CssOperator.SPACE;
 
+/**
+ * @spec http://www.w3.org/TR/2012/WD-css3-background-20120214/#box-shadow
+ */
 
 public class CssBoxShadow extends org.w3c.css.properties.css.CssBoxShadow {
 
@@ -180,7 +183,6 @@
                         // inset can be first or last
                         if ((value.color != null || got_length != 0) &&
                                 expression.getRemainingCount() != 1) {
-                            // so we got a color, but no length, that's not valid
                             throw new InvalidParamException("unrecognize", ac);
                         }
                         break;
@@ -253,7 +255,21 @@
      * Returns a string representation of the object
      */
     public String toString() {
-        // FIXME TODO
+        if (value instanceof ArrayList) {
+            ArrayList v_list;
+            v_list = (ArrayList) value;
+            StringBuilder sb = new StringBuilder();
+            boolean isFirst = true;
+            for (Object val : v_list) {
+                if (isFirst) {
+                    isFirst = false;
+                } else {
+                    sb.append(", ");
+                }
+                sb.append(val.toString());
+            }
+            return sb.toString();
+        }
         return value.toString();
     }
 

Index: CssBackground.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css3/CssBackground.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- CssBackground.java	3 Apr 2012 14:20:54 -0000	1.3
+++ CssBackground.java	4 Apr 2012 14:36:25 -0000	1.4
@@ -21,7 +21,7 @@
 import static org.w3c.css.values.CssOperator.SPACE;
 
 /**
- * http://www.w3.org/TR/2012/WD-css3-background-20120214/
+ * @spec http://www.w3.org/TR/2012/WD-css3-background-20120214/
  *
  * @see org.w3c.css.properties.css.CssBackgroundColor
  * @see org.w3c.css.properties.css.CssBackgroundImage
@@ -731,10 +731,15 @@
             ArrayList v_list;
             v_list = (ArrayList) value;
             StringBuilder sb = new StringBuilder();
+            boolean isFirst = true;
             for (Object val : v_list) {
-                sb.append(val.toString()).append(", ");
+                if (isFirst) {
+                    isFirst = false;
+                } else {
+                    sb.append(", ");
+                }
+                sb.append(val.toString());
             }
-            sb.setLength(sb.length() - 2);
             return sb.toString();
         }
         return value.toString();
Received on Wednesday, 4 April 2012 14:36:33 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:17:49 UTC