jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/Driver.java
changeset 16791 fe5141eabb0e
parent 12009 4abb694f273a
child 25429 1c4e76ec718a
equal deleted inserted replaced
16650:1872c1252909 16791:fe5141eabb0e
     1 /*
     1 /*
     2  * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1997, 2013, 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.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    36 import com.sun.codemodel.internal.CodeWriter;
    36 import com.sun.codemodel.internal.CodeWriter;
    37 import com.sun.codemodel.internal.JCodeModel;
    37 import com.sun.codemodel.internal.JCodeModel;
    38 import com.sun.codemodel.internal.writer.ZipCodeWriter;
    38 import com.sun.codemodel.internal.writer.ZipCodeWriter;
    39 import com.sun.istack.internal.NotNull;
    39 import com.sun.istack.internal.NotNull;
    40 import com.sun.istack.internal.Nullable;
    40 import com.sun.istack.internal.Nullable;
       
    41 import com.sun.istack.internal.tools.DefaultAuthenticator;
    41 import com.sun.tools.internal.xjc.generator.bean.BeanGenerator;
    42 import com.sun.tools.internal.xjc.generator.bean.BeanGenerator;
    42 import com.sun.tools.internal.xjc.model.Model;
    43 import com.sun.tools.internal.xjc.model.Model;
    43 import com.sun.tools.internal.xjc.outline.Outline;
    44 import com.sun.tools.internal.xjc.outline.Outline;
    44 import com.sun.tools.internal.xjc.reader.gbind.Expression;
    45 import com.sun.tools.internal.xjc.reader.gbind.Expression;
    45 import com.sun.tools.internal.xjc.reader.gbind.Graph;
    46 import com.sun.tools.internal.xjc.reader.gbind.Graph;
   220 
   221 
   221         final OptionsEx opt = new OptionsEx();
   222         final OptionsEx opt = new OptionsEx();
   222         opt.setSchemaLanguage(Language.XMLSCHEMA);  // disable auto-guessing
   223         opt.setSchemaLanguage(Language.XMLSCHEMA);  // disable auto-guessing
   223         try {
   224         try {
   224             opt.parseArguments(args);
   225             opt.parseArguments(args);
   225         } catch (WeAreDone _) {
   226         } catch (WeAreDone e) {
       
   227             if (opt.proxyAuth != null) {
       
   228                 DefaultAuthenticator.reset();
       
   229             }
   226             return -1;
   230             return -1;
   227         } catch(BadCommandLineException e) {
   231         } catch(BadCommandLineException e) {
       
   232             if (opt.proxyAuth != null) {
       
   233                 DefaultAuthenticator.reset();
       
   234             }
   228             e.initOptions(opt);
   235             e.initOptions(opt);
   229             throw e;
   236             throw e;
   230         }
   237         }
   231 
   238 
   232         // display a warning if the user specified the default package
   239         // display a warning if the user specified the default package
   399                 // otherwise just print a suggested workaround and
   406                 // otherwise just print a suggested workaround and
   400                 // quit without filling the user's screen
   407                 // quit without filling the user's screen
   401                 listener.message(Messages.format(Messages.STACK_OVERFLOW));
   408                 listener.message(Messages.format(Messages.STACK_OVERFLOW));
   402                 return -1;
   409                 return -1;
   403             }
   410             }
       
   411         } finally {
       
   412             if (opt.proxyAuth != null) {
       
   413                 DefaultAuthenticator.reset();
       
   414             }
   404         }
   415         }
   405     }
   416     }
   406 
   417 
   407     public static String getBuildID() {
   418     public static String getBuildID() {
   408         return Messages.format(Messages.BUILD_ID);
   419         return Messages.format(Messages.BUILD_ID);