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

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