From fb305e0ad40090ff909e75b2c49bb9d407632dae Mon Sep 17 00:00:00 2001 From: jrose Date: Sat, 9 Apr 2011 21:38:40 -0700 Subject: [PATCH] 7019529: JSR292: java/dyn/ClassValueTest.java depends on sub-test execution order Summary: Test should not use static variables, because they may contain stale values. Reviewed-by: twisti --- test/java/lang/invoke/ClassValueTest.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/java/lang/invoke/ClassValueTest.java b/test/java/lang/invoke/ClassValueTest.java index 59c5a658c..121c260df 100644 --- a/test/java/lang/invoke/ClassValueTest.java +++ b/test/java/lang/invoke/ClassValueTest.java @@ -52,9 +52,9 @@ public class ClassValueTest { static String nameForCV1(Class type) { return "CV1:" + type.getName(); } - static int countForCV1; - static final ClassValue CV1 = new CV1(); - private static class CV1 extends ClassValue { + int countForCV1; + final ClassValue CV1 = new CV1(); + private class CV1 extends ClassValue { protected String computeValue(Class type) { countForCV1++; return nameForCV1(type); @@ -103,8 +103,8 @@ public class ClassValueTest { static String nameForCVN(Class type, int n) { return "CV[" + n + "]" + type.getName(); } - static int countForCVN; - static class CVN extends ClassValue { + int countForCVN; + class CVN extends ClassValue { final int n; CVN(int n) { this.n = n; } protected String computeValue(Class type) { -- GitLab