author | prappo |
Fri, 24 Feb 2017 17:05:00 +0000 | |
changeset 43999 | 4cc44dd9f14f |
permissions | -rw-r--r-- |
43999
4cc44dd9f14f
8164625: Pooled HttpConnection should be removed during close
prappo
parents:
diff
changeset
|
1 |
/* |
4cc44dd9f14f
8164625: Pooled HttpConnection should be removed during close
prappo
parents:
diff
changeset
|
2 |
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. |
4cc44dd9f14f
8164625: Pooled HttpConnection should be removed during close
prappo
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4cc44dd9f14f
8164625: Pooled HttpConnection should be removed during close
prappo
parents:
diff
changeset
|
4 |
* |
4cc44dd9f14f
8164625: Pooled HttpConnection should be removed during close
prappo
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
4cc44dd9f14f
8164625: Pooled HttpConnection should be removed during close
prappo
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
4cc44dd9f14f
8164625: Pooled HttpConnection should be removed during close
prappo
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
4cc44dd9f14f
8164625: Pooled HttpConnection should be removed during close
prappo
parents:
diff
changeset
|
8 |
* |
4cc44dd9f14f
8164625: Pooled HttpConnection should be removed during close
prappo
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
4cc44dd9f14f
8164625: Pooled HttpConnection should be removed during close
prappo
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
4cc44dd9f14f
8164625: Pooled HttpConnection should be removed during close
prappo
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
4cc44dd9f14f
8164625: Pooled HttpConnection should be removed during close
prappo
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
4cc44dd9f14f
8164625: Pooled HttpConnection should be removed during close
prappo
parents:
diff
changeset
|
13 |
* accompanied this code). |
4cc44dd9f14f
8164625: Pooled HttpConnection should be removed during close
prappo
parents:
diff
changeset
|
14 |
* |
4cc44dd9f14f
8164625: Pooled HttpConnection should be removed during close
prappo
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
4cc44dd9f14f
8164625: Pooled HttpConnection should be removed during close
prappo
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
4cc44dd9f14f
8164625: Pooled HttpConnection should be removed during close
prappo
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
4cc44dd9f14f
8164625: Pooled HttpConnection should be removed during close
prappo
parents:
diff
changeset
|
18 |
* |
4cc44dd9f14f
8164625: Pooled HttpConnection should be removed during close
prappo
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
4cc44dd9f14f
8164625: Pooled HttpConnection should be removed during close
prappo
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
4cc44dd9f14f
8164625: Pooled HttpConnection should be removed during close
prappo
parents:
diff
changeset
|
21 |
* questions. |
4cc44dd9f14f
8164625: Pooled HttpConnection should be removed during close
prappo
parents:
diff
changeset
|
22 |
*/ |
4cc44dd9f14f
8164625: Pooled HttpConnection should be removed during close
prappo
parents:
diff
changeset
|
23 |
|
4cc44dd9f14f
8164625: Pooled HttpConnection should be removed during close
prappo
parents:
diff
changeset
|
24 |
import java.io.File; |
4cc44dd9f14f
8164625: Pooled HttpConnection should be removed during close
prappo
parents:
diff
changeset
|
25 |
|
4cc44dd9f14f
8164625: Pooled HttpConnection should be removed during close
prappo
parents:
diff
changeset
|
26 |
public final class LoggingHelper { |
4cc44dd9f14f
8164625: Pooled HttpConnection should be removed during close
prappo
parents:
diff
changeset
|
27 |
|
4cc44dd9f14f
8164625: Pooled HttpConnection should be removed during close
prappo
parents:
diff
changeset
|
28 |
/* |
4cc44dd9f14f
8164625: Pooled HttpConnection should be removed during close
prappo
parents:
diff
changeset
|
29 |
* I wish we had a support for java.util.logging in jtreg similar to what we |
4cc44dd9f14f
8164625: Pooled HttpConnection should be removed during close
prappo
parents:
diff
changeset
|
30 |
* have for security policy files: |
4cc44dd9f14f
8164625: Pooled HttpConnection should be removed during close
prappo
parents:
diff
changeset
|
31 |
* |
4cc44dd9f14f
8164625: Pooled HttpConnection should be removed during close
prappo
parents:
diff
changeset
|
32 |
* @run main/othervm/jul=logging.properties ClassUnderTest |
4cc44dd9f14f
8164625: Pooled HttpConnection should be removed during close
prappo
parents:
diff
changeset
|
33 |
*/ |
4cc44dd9f14f
8164625: Pooled HttpConnection should be removed during close
prappo
parents:
diff
changeset
|
34 |
public static void setupLogging() { |
4cc44dd9f14f
8164625: Pooled HttpConnection should be removed during close
prappo
parents:
diff
changeset
|
35 |
String path = System.getProperty("test.src") + File.separator + "logging.properties"; |
4cc44dd9f14f
8164625: Pooled HttpConnection should be removed during close
prappo
parents:
diff
changeset
|
36 |
System.setProperty("java.util.logging.config.file", path); |
4cc44dd9f14f
8164625: Pooled HttpConnection should be removed during close
prappo
parents:
diff
changeset
|
37 |
} |
4cc44dd9f14f
8164625: Pooled HttpConnection should be removed during close
prappo
parents:
diff
changeset
|
38 |
} |