106 */
107 private static final boolean WARN_ON = true;
108 /*
109 * Storage for a lot of tiny objects
110 * "static volatile" keywords are for preventing heap optimization
111 */
112 private static volatile Object pool[] = null;
113 /**
114 * Temporary <code>log</code> for error messages, warnings and/or execution trace.
115 *
116 * @see #messages
117 */
118 private static String log[] = new String[1000]; // up to 1000 messages
119 /**
120 * How many <code>messages</code> were submitted to the <code>log</code>.
121 *
122 * @see #log
123 */
124 private static int messages = 0;
125
126 private static final String className = "nsk.stress.except.except011.except011oops";
127
128 /**
129 * Re-call to the method <code>run(out)</code> (ignore <code>args[]</code>),
130 * and print the test summary - either test passed of failed.
131 */
132 public static int run(String args[], PrintStream out) {
133 if (args.length > 0) {
134 if (args[0].toLowerCase().startsWith("-v"))
135 TRACE_ON = true;
136 }
137
138 int exitCode = run(out);
139 pool = null;
140 System.gc();
141 // Print the log[] and the test summary:
142 try {
143 for (int i = 0; i < messages; i++)
144 out.println(log[i]);
145 if (exitCode == 0) {
146 if (TRACE_ON)
|
106 */
107 private static final boolean WARN_ON = true;
108 /*
109 * Storage for a lot of tiny objects
110 * "static volatile" keywords are for preventing heap optimization
111 */
112 private static volatile Object pool[] = null;
113 /**
114 * Temporary <code>log</code> for error messages, warnings and/or execution trace.
115 *
116 * @see #messages
117 */
118 private static String log[] = new String[1000]; // up to 1000 messages
119 /**
120 * How many <code>messages</code> were submitted to the <code>log</code>.
121 *
122 * @see #log
123 */
124 private static int messages = 0;
125
126 private static final String className = "nsk.stress.except.except011oops";
127
128 /**
129 * Re-call to the method <code>run(out)</code> (ignore <code>args[]</code>),
130 * and print the test summary - either test passed of failed.
131 */
132 public static int run(String args[], PrintStream out) {
133 if (args.length > 0) {
134 if (args[0].toLowerCase().startsWith("-v"))
135 TRACE_ON = true;
136 }
137
138 int exitCode = run(out);
139 pool = null;
140 System.gc();
141 // Print the log[] and the test summary:
142 try {
143 for (int i = 0; i < messages; i++)
144 out.println(log[i]);
145 if (exitCode == 0) {
146 if (TRACE_ON)
|