- From: Yves Lafon via cvs-syncmail <cvsmail@w3.org>
- Date: Tue, 03 Apr 2012 14:20:56 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2002/css-validator/org/w3c/www/mime
In directory hutz:/tmp/cvs-serv18166/w3c/www/mime
Modified Files:
MimeType.java
Log Message:
prepared to replace '/' instances from 'Operator' as in CSS2 to a 'switch' per css3. adapted some classes because of that (expect breakage on font before it's rewritten), fixed 'background' to be in sync with the http://www.w3.org/TR/2012/WD-css3-background-20120214/ spec
Index: MimeType.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/www/mime/MimeType.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- MimeType.java 29 Aug 2011 07:21:02 -0000 1.5
+++ MimeType.java 3 Apr 2012 14:20:54 -0000 1.6
@@ -174,7 +174,7 @@
public String toString () {
if ( external == null ) {
- StringBuffer sb = new StringBuffer (type) ;
+ StringBuilder sb = new StringBuilder(type) ;
sb.append((char) '/') ;
sb.append (subtype) ;
if ( pnames != null ) {
@@ -202,10 +202,10 @@
if (name != null) {
if ( pnames != null ) {
String lname = name.toLowerCase();
- for (int i = 0 ; i < pnames.length ; i++) {
- if ( pnames[i].equals(name) )
- return true ;
- }
+ for (String pname : pnames) {
+ if (pname.equals(name))
+ return true;
+ }
}
}
return false ;
Received on Tuesday, 3 April 2012 14:21:07 UTC