[kaffe] CVS kaffe (doogie): Use braces around assignments in conditions.

Kaffe CVS cvs-commits at kaffe.org
Fri Dec 10 13:33:41 PST 2004


PatchSet 5597 
Date: 2004/12/10 21:29:34
Author: doogie
Branch: HEAD
Tag: (none) 
Log:
Use braces around assignments in conditions.

Members: 
	ChangeLog:1.3142->1.3143 
	libraries/javalib/gnu/regexp/RE.java:1.2->1.3 
	libraries/javalib/java/util/regex/Pattern.java:1.8->1.9 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3142 kaffe/ChangeLog:1.3143
--- kaffe/ChangeLog:1.3142	Fri Dec 10 21:22:56 2004
+++ kaffe/ChangeLog	Fri Dec 10 21:29:34 2004
@@ -1,4 +1,11 @@
 2004-12-10  Adam Heath  <doogie at brainfood.com>
+
+	* libraries/javalib/gnu/regexp/RE.java,
+	  libraries/javalib/java/util/regex/Pattern.java:
+	  Use braces around assignments in conditions.
+
+2004-12-10  Adam Heath  <doogie at brainfood.com>
+
 	* libraries/javalib/gnu/crypto/der/DERReader.java,
 	  libraries/javalib/gnu/xml/util/SAXNullTransformerFactory.java,
 	  libraries/javalib/gnu/xml/xpath/Predicate.java,
Index: kaffe/libraries/javalib/gnu/regexp/RE.java
diff -u kaffe/libraries/javalib/gnu/regexp/RE.java:1.2 kaffe/libraries/javalib/gnu/regexp/RE.java:1.3
--- kaffe/libraries/javalib/gnu/regexp/RE.java:1.2	Tue Sep 28 22:45:29 2004
+++ kaffe/libraries/javalib/gnu/regexp/RE.java	Fri Dec 10 21:29:36 2004
@@ -806,7 +806,7 @@
 
   private static int getCharUnit(char[] input, int index, CharUnit unit) throws REException {
     unit.ch = input[index++];
-    if (unit.bk = (unit.ch == '\\'))
+    if ((unit.bk = (unit.ch == '\\')))
       if (index < input.length)
 	unit.ch = input[index++];
       else throw new REException(getLocalizedMessage("ends.with.backslash"),REException.REG_ESCAPE,index);
Index: kaffe/libraries/javalib/java/util/regex/Pattern.java
diff -u kaffe/libraries/javalib/java/util/regex/Pattern.java:1.8 kaffe/libraries/javalib/java/util/regex/Pattern.java:1.9
--- kaffe/libraries/javalib/java/util/regex/Pattern.java:1.8	Wed Nov 24 03:20:44 2004
+++ kaffe/libraries/javalib/java/util/regex/Pattern.java	Fri Dec 10 21:29:36 2004
@@ -190,7 +190,7 @@
     int end;
     boolean matched;
 
-    while (matched = matcher.find() && (limit <= 0 || count < limit - 1))
+    while ((matched = matcher.find()) && (limit <= 0 || count < limit - 1))
       {
 	++count;
 	end = matcher.start();




More information about the kaffe mailing list