--- a/test/jdk/java/net/httpclient/RedirectMethodChange.java Tue Mar 13 17:23:42 2018 +0000
+++ b/test/jdk/java/net/httpclient/RedirectMethodChange.java Tue Mar 13 17:37:30 2018 +0000
@@ -246,8 +246,8 @@
*/
static class RedirMethodChgeHandler implements HttpTestHandler {
- volatile boolean inTest;
- volatile String expectedMethod;
+ boolean inTest;
+ String expectedMethod;
final String targetURL;
RedirMethodChgeHandler(String targetURL) {
@@ -272,7 +272,7 @@
}
@Override
- public void handle(HttpTestExchange he) throws IOException {
+ public synchronized void handle(HttpTestExchange he) throws IOException {
boolean newtest = he.getRequestURI().getPath().endsWith("/test/rmt");
if ((newtest && inTest) || (!newtest && !inTest)) {
Throwable ex = new RuntimeException("Unexpected newtest:" + newtest