equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2006, 2012 Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
101 for (int i = 0; i < iters2; i++) |
101 for (int i = 0; i < iters2; i++) |
102 counter.getAndIncrement(); |
102 counter.getAndIncrement(); |
103 // This may or may not result in a first call to |
103 // This may or may not result in a first call to |
104 // Runtime.addShutdownHook after shutdown has already |
104 // Runtime.addShutdownHook after shutdown has already |
105 // commenced. |
105 // commenced. |
106 LogManager log = LogManager.getLogManager(); |
106 LogManager.getLogManager(); |
107 |
107 |
108 if (dojoin) { |
108 if (dojoin) { |
109 exiter.join(); |
109 exiter.join(); |
110 if (thrown[0] != null) |
110 if (thrown[0] != null) |
111 throw new Error(thrown[0]); |
111 throw new Error(thrown[0]); |
146 } |
146 } |
147 |
147 |
148 public String out() { return out; } |
148 public String out() { return out; } |
149 public String err() { return err; } |
149 public String err() { return err; } |
150 public int exitValue() { return exitValue; } |
150 public int exitValue() { return exitValue; } |
151 public Throwable throwable() { return throwable; } |
|
152 |
151 |
153 public String toString() { |
152 public String toString() { |
154 StringBuilder sb = new StringBuilder(); |
153 StringBuilder sb = new StringBuilder(); |
155 sb.append("<STDOUT>\n" + out() + "</STDOUT>\n") |
154 sb.append("<STDOUT>\n" + out() + "</STDOUT>\n") |
156 .append("<STDERR>\n" + err() + "</STDERR>\n") |
155 .append("<STDERR>\n" + err() + "</STDERR>\n") |