1.1 --- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/Driver.java Thu Apr 04 19:05:24 2013 -0700 1.2 +++ b/src/share/jaxws_classes/com/sun/tools/internal/xjc/Driver.java Tue Apr 09 14:51:13 2013 +0100 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -38,6 +38,7 @@ 1.11 import com.sun.codemodel.internal.writer.ZipCodeWriter; 1.12 import com.sun.istack.internal.NotNull; 1.13 import com.sun.istack.internal.Nullable; 1.14 +import com.sun.istack.internal.tools.DefaultAuthenticator; 1.15 import com.sun.tools.internal.xjc.generator.bean.BeanGenerator; 1.16 import com.sun.tools.internal.xjc.model.Model; 1.17 import com.sun.tools.internal.xjc.outline.Outline; 1.18 @@ -222,9 +223,15 @@ 1.19 opt.setSchemaLanguage(Language.XMLSCHEMA); // disable auto-guessing 1.20 try { 1.21 opt.parseArguments(args); 1.22 - } catch (WeAreDone _) { 1.23 + } catch (WeAreDone e) { 1.24 + if (opt.proxyAuth != null) { 1.25 + DefaultAuthenticator.reset(); 1.26 + } 1.27 return -1; 1.28 } catch(BadCommandLineException e) { 1.29 + if (opt.proxyAuth != null) { 1.30 + DefaultAuthenticator.reset(); 1.31 + } 1.32 e.initOptions(opt); 1.33 throw e; 1.34 } 1.35 @@ -401,6 +408,10 @@ 1.36 listener.message(Messages.format(Messages.STACK_OVERFLOW)); 1.37 return -1; 1.38 } 1.39 + } finally { 1.40 + if (opt.proxyAuth != null) { 1.41 + DefaultAuthenticator.reset(); 1.42 + } 1.43 } 1.44 } 1.45