src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/Options.java

changeset 368
0989ad8c0860
parent 286
f50545b5e2f1
child 408
b0610cd08440
     1.1 --- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/Options.java	Thu Apr 04 19:05:24 2013 -0700
     1.2 +++ b/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/Options.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 @@ -36,6 +36,7 @@
    1.11  import java.net.URLClassLoader;
    1.12  import java.nio.charset.Charset;
    1.13  import java.nio.charset.IllegalCharsetNameException;
    1.14 +import java.text.MessageFormat;
    1.15  import java.util.ArrayList;
    1.16  import java.util.List;
    1.17  import java.util.StringTokenizer;
    1.18 @@ -92,6 +93,12 @@
    1.19       */
    1.20      public boolean nocompile;
    1.21  
    1.22 +    /**
    1.23 +     * Disable secure xml processing.
    1.24 +     * -XdisableSecureXmlProcessing
    1.25 +     */
    1.26 +    public boolean disableSecureXmlProcessing = false;
    1.27 +
    1.28      public enum Target {
    1.29          V2_0, V2_1, V2_2;
    1.30  
    1.31 @@ -180,13 +187,6 @@
    1.32          return compatibilityMode == EXTENSION;
    1.33      }
    1.34  
    1.35 -    /**
    1.36 -     * Target direcoty when producing files.
    1.37 -     */
    1.38 -    public File targetDir = new File(".");
    1.39 -
    1.40 -
    1.41 -
    1.42      public boolean debug = false;
    1.43  
    1.44      /**
    1.45 @@ -213,7 +213,10 @@
    1.46      public void removeGeneratedFiles(){
    1.47          for(File file : generatedFiles){
    1.48              if (file.getName().endsWith(".java")) {
    1.49 -                file.delete();
    1.50 +                boolean deleted = file.delete();
    1.51 +                if (verbose && !deleted) {
    1.52 +                    System.out.println(MessageFormat.format("{0} could not be deleted.", file));
    1.53 +                }
    1.54              }
    1.55          }
    1.56          generatedFiles.clear();
    1.57 @@ -235,7 +238,10 @@
    1.58          synchronized (generatedFiles) {
    1.59              for (File file : generatedFiles) {
    1.60                  if (file.getName().endsWith(".java")) {
    1.61 -                    file.delete();
    1.62 +                    boolean deleted = file.delete();
    1.63 +                    if (verbose && !deleted) {
    1.64 +                        System.out.println(MessageFormat.format("{0} could not be deleted.", file));
    1.65 +                    }
    1.66                  }
    1.67              }
    1.68              generatedFiles.clear();
    1.69 @@ -348,6 +354,9 @@
    1.70                  throw new BadCommandLineException(WscompileMessages.WSCOMPILE_UNSUPPORTED_ENCODING(encoding));
    1.71              }
    1.72              return 2;
    1.73 +        } else if (args[i].equals("-XdisableSecureXmlProcessing")) {
    1.74 +            disableSecureXmlProcessing= true;
    1.75 +            return 1;
    1.76          }
    1.77          return 0;
    1.78      }

mercurial