- From: Yves Lafon via cvs-syncmail <cvsmail@w3.org>
- Date: Mon, 29 Aug 2011 07:21:03 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2002/css-validator/org/w3c/css/selectors In directory hutz:/tmp/cvs-serv18238/css/selectors Modified Files: AttributeSelector.java SelectorsList.java Log Message: genericity + updated code to 5.0 stds Index: SelectorsList.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/selectors/SelectorsList.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- SelectorsList.java 12 Aug 2011 21:19:01 -0000 1.7 +++ SelectorsList.java 29 Aug 2011 07:21:01 -0000 1.8 @@ -274,9 +274,8 @@ return stringrep; } StringBuilder res = new StringBuilder(); - int selsize = selectors.size(); - for (int i = 0; i < selsize; i++) { - res.append(selectors.get(i)); + for (Selector selector : selectors) { + res.append(selector); } stringrep = res.toString(); return stringrep; Index: AttributeSelector.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/selectors/AttributeSelector.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- AttributeSelector.java 19 Apr 2006 11:28:06 -0000 1.3 +++ AttributeSelector.java 29 Aug 2011 07:21:01 -0000 1.4 @@ -22,25 +22,27 @@ /** * Creates a new attribute selector given its name + * * @param name the name of this attribute */ - public AttributeSelector(String name) { - this.name = name; + public AttributeSelector(String name) { + this.name = name; } /** * Sets the name of this attribute selector + * * @param name the name of this attribute */ public void setName(String name) { - this.name = name; + this.name = name; } /** * @see Selector#getName() */ public String getName() { - return name; + return name; } public abstract void applyAttribute(ApplContext ac, AttributeSelector attr); @@ -49,7 +51,8 @@ * @see Selector#toString() */ public String toString() { - return "[" + name + "]"; + StringBuilder sb = new StringBuilder(); + return sb.append('[').append(name).append(']').toString(); } }
Received on Monday, 29 August 2011 07:21:12 UTC