src/share/jaxws_classes/com/sun/xml/internal/ws/util/JAXWSUtils.java

changeset 368
0989ad8c0860
parent 286
f50545b5e2f1
child 637
9c07ef4934dd
     1.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/JAXWSUtils.java	Thu Apr 04 19:05:24 2013 -0700
     1.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/JAXWSUtils.java	Tue Apr 09 14:51:13 2013 +0100
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 1997, 2010, 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 @@ -92,7 +92,7 @@
    1.11  
    1.12      private static String escapeSpace( String url ) {
    1.13          // URLEncoder didn't work.
    1.14 -        StringBuffer buf = new StringBuffer();
    1.15 +        StringBuilder buf = new StringBuilder();
    1.16          for (int i = 0; i < url.length(); i++) {
    1.17              // TODO: not sure if this is the only character that needs to be escaped.
    1.18              if (url.charAt(i) == ' ')
    1.19 @@ -109,8 +109,8 @@
    1.20          try {
    1.21              URL baseURL = new File(".").getCanonicalFile().toURL();
    1.22              return new URL(baseURL, name).toExternalForm();
    1.23 -        } catch( IOException e ) {
    1.24 -            ; // ignore
    1.25 +        } catch( IOException e) {
    1.26 +            //ignore
    1.27          }
    1.28          return name;
    1.29      }
    1.30 @@ -118,6 +118,7 @@
    1.31      /**
    1.32       * Checks if the system ID is absolute.
    1.33       */
    1.34 +    @SuppressWarnings("ResultOfObjectAllocationIgnored")
    1.35      public static  void checkAbsoluteness(String systemId) {
    1.36          // we need to be able to handle system IDs like "urn:foo", which java.net.URL can't process,
    1.37          // but OTOH we also need to be able to process system IDs like "file://a b c/def.xsd",
    1.38 @@ -125,10 +126,10 @@
    1.39          // eventually we need a proper URI class that works for us.
    1.40          try {
    1.41              new URL(systemId);
    1.42 -        } catch( MalformedURLException _ ) {
    1.43 +        } catch( MalformedURLException mue) {
    1.44              try {
    1.45                  new URI(systemId);
    1.46 -            } catch (URISyntaxException e ) {
    1.47 +            } catch (URISyntaxException e) {
    1.48                  throw new IllegalArgumentException("system ID '"+systemId+"' isn't absolute",e);
    1.49              }
    1.50          }

mercurial