src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/AttachmentPartImpl.java

changeset 368
0989ad8c0860
parent 286
f50545b5e2f1
child 494
2fcd3ddb57a6
     1.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/AttachmentPartImpl.java	Thu Apr 04 19:05:24 2013 -0700
     1.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/AttachmentPartImpl.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 @@ -260,10 +260,9 @@
    1.11          this.dataHandler = dataHandler;
    1.12          rawContent = null;
    1.13  
    1.14 -        log.log(
    1.15 -            Level.FINE,
    1.16 -            "SAAJ0580.soap.set.Content-Type",
    1.17 -            new String[] { dataHandler.getContentType()});
    1.18 +        if (log.isLoggable(Level.FINE))
    1.19 +            log.log(Level.FINE, "SAAJ0580.soap.set.Content-Type",
    1.20 +                    new String[] { dataHandler.getContentType() });
    1.21          setMimeHeader("Content-Type", dataHandler.getContentType());
    1.22      }
    1.23  
    1.24 @@ -604,6 +603,12 @@
    1.25          return (this == o);
    1.26      }
    1.27  
    1.28 +    // In JDK 8 we get a warning if we implement equals() but not hashCode().
    1.29 +    // There is no intuitive value for this, the default one in Object is fine.
    1.30 +    public int hashCode() {
    1.31 +        return super.hashCode();
    1.32 +    }
    1.33 +
    1.34      public MimeHeaders getMimeHeaders() {
    1.35          return headers;
    1.36      }

mercurial