W3C home > Mailing lists > Public > www-validator-cvs@w3.org > August 2007

2002/css-validator/org/w3c/css/parser CssPropertyFactory.java,1.18,1.19

From: Julien Grand-Mourcel via cvs-syncmail <cvsmail@w3.org>
Date: Tue, 07 Aug 2007 10:53:41 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1IIMh3-0005QJ-Rj@lionel-hutz.w3.org>

Update of /sources/public/2002/css-validator/org/w3c/css/parser
In directory hutz:/tmp/cvs-serv20794/org/w3c/css/parser

Modified Files:
	CssPropertyFactory.java 
Log Message:
Adding the formatting method to the application context so it can be used everywhere. (StyleSheetGenerator for instance)

Index: CssPropertyFactory.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/parser/CssPropertyFactory.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- CssPropertyFactory.java	7 Aug 2007 10:48:57 -0000	1.18
+++ CssPropertyFactory.java	7 Aug 2007 10:53:39 -0000	1.19
@@ -200,7 +200,7 @@
 		// this is an error... or a warning if it exists in another
 		// profile... FIXME
 		if (classname == null) {
-			throw new InvalidParamException("noexistence", property, format(ac.getCssVersion()), ac);
+			throw new InvalidParamException("noexistence", property, ac.getFormatedCssVersion(), ac);
 		}
 
 		CssIdent initial = new CssIdent("initial");
@@ -235,17 +235,4 @@
 			}
 		}
 	}
-
-	private String format(String cssVersion) {
-		if (!cssVersion.toLowerCase().startsWith("css"))
-			return cssVersion;
-		char number[] = cssVersion.substring(3).toCharArray();
-		String num = "CSS ";
-		for (int i = 0; i < number.length; ++i) {
-			num += number[i];
-			if (i != number.length - 1)
-				num += ".";
-		}
-		return num;
-	}
 }
Received on Tuesday, 7 August 2007 10:53:43 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:02:24 UTC