Menu

#6 Multiple Stringcompare

open
nobody
None
5
2006-12-21
2006-12-21
No

Index: gov/nasa/jpf/tools/GenPeer.java

--- gov/nasa/jpf/tools/GenPeer.java (revision 210)
+++ gov/nasa/jpf/tools/GenPeer.java (working copy)
@@ -163,7 +163,7 @@
pw.print(INDENT);
pw.print(rt);

- if ((rt == REF_TYPE) && (rt != t)) {
+ if (REF_TYPE.equals(rt) && (rt != t)) {
pw.print(" r");
pw.print(t);
pw.print(" = ");
Index: gov/nasa/jpf/tools/GenPeerDispatcher.java
===================================================================
--- gov/nasa/jpf/tools/GenPeerDispatcher.java (revision 210)
+++ gov/nasa/jpf/tools/GenPeerDispatcher.java (working copy)
@@ -483,9 +483,9 @@
for (int i = 0; i < mths.length; i++) {
Method m = mths[i];

- if (((condPrefix == IS_COND_DETERMINISTIC) &&
+ if ((IS_COND_DETERMINISTIC.equals(condPrefix) &&
isMJIDetermCondCandidate(m)) ||
- ((condPrefix == IS_COND_EXECUTABLE) &&
+ (IS_COND_EXECUTABLE.equals(condPrefix) &&
isMJIExecCondCandidate(m))) {
printCaseConst(m);

@@ -497,7 +497,7 @@

iprintln(3, "default:");

- if (condPrefix == IS_COND_EXECUTABLE) {
+ if (IS_COND_EXECUTABLE.equals(condPrefix)) {
iprintln(4,
"throw new JPFVMException(\"no isExecutable() condition: \" + mi.getName());");
} else {

Discussion


Log in to post a comment.