--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/Driver.java Wed Jul 05 18:49:16 2017 +0200
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/Driver.java Tue Apr 09 14:51:13 2013 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -38,6 +38,7 @@
import com.sun.codemodel.internal.writer.ZipCodeWriter;
import com.sun.istack.internal.NotNull;
import com.sun.istack.internal.Nullable;
+import com.sun.istack.internal.tools.DefaultAuthenticator;
import com.sun.tools.internal.xjc.generator.bean.BeanGenerator;
import com.sun.tools.internal.xjc.model.Model;
import com.sun.tools.internal.xjc.outline.Outline;
@@ -222,9 +223,15 @@
opt.setSchemaLanguage(Language.XMLSCHEMA); // disable auto-guessing
try {
opt.parseArguments(args);
- } catch (WeAreDone _) {
+ } catch (WeAreDone e) {
+ if (opt.proxyAuth != null) {
+ DefaultAuthenticator.reset();
+ }
return -1;
} catch(BadCommandLineException e) {
+ if (opt.proxyAuth != null) {
+ DefaultAuthenticator.reset();
+ }
e.initOptions(opt);
throw e;
}
@@ -401,6 +408,10 @@
listener.message(Messages.format(Messages.STACK_OVERFLOW));
return -1;
}
+ } finally {
+ if (opt.proxyAuth != null) {
+ DefaultAuthenticator.reset();
+ }
}
}