- From: Yves Lafon via cvs-syncmail <cvsmail@w3.org>
- Date: Tue, 01 May 2012 12:59:21 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2002/css-validator/org/w3c/css/properties/css2/font In directory hutz:/tmp/cvs-serv3464/css2/font Modified Files: FontWeight.java Log Message: fixing old codecss2/font/FontWeight.java Index: FontWeight.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css2/font/FontWeight.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- FontWeight.java 5 Jan 2010 13:49:47 -0000 1.3 +++ FontWeight.java 1 May 2012 12:59:18 -0000 1.4 @@ -8,8 +8,6 @@ */ package org.w3c.css.properties.css2.font; -import java.util.Vector; - import org.w3c.css.parser.CssStyle; import org.w3c.css.properties.css.CssProperty; import org.w3c.css.util.ApplContext; @@ -20,6 +18,8 @@ import org.w3c.css.values.CssOperator; import org.w3c.css.values.CssValue; +import java.util.Vector; + /** */ public class FontWeight extends CssProperty implements FontConstant { @@ -69,9 +69,9 @@ getPropertyName(), ac); } } else if (val instanceof CssNumber) { - Object valf = val.get(); - if(valf instanceof Integer) { - int vali = ((Integer) valf).intValue(); + CssNumber num = (CssNumber) val; + if(num.isInteger()) { + int vali = num.getInt(); if(isCorrectWeight(vali)) { // verify the entire part number values.addElement(val); } @@ -156,7 +156,7 @@ /** * Compares two properties for equality. * - * @param value The other property. + * @param property The other property. */ public boolean equals(CssProperty property) { // @@TODO
Received on Tuesday, 1 May 2012 12:59:24 UTC