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

changeset 368
0989ad8c0860
parent 286
f50545b5e2f1
child 494
2fcd3ddb57a6
equal deleted inserted replaced
366:8c0b6bccfe47 368:0989ad8c0860
1 /* 1 /*
2 * Copyright (c) 1997, 2010, 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
258 throw new IllegalArgumentException("Null dataHandler argument to setDataHandler"); 258 throw new IllegalArgumentException("Null dataHandler argument to setDataHandler");
259 } 259 }
260 this.dataHandler = dataHandler; 260 this.dataHandler = dataHandler;
261 rawContent = null; 261 rawContent = null;
262 262
263 log.log( 263 if (log.isLoggable(Level.FINE))
264 Level.FINE, 264 log.log(Level.FINE, "SAAJ0580.soap.set.Content-Type",
265 "SAAJ0580.soap.set.Content-Type", 265 new String[] { dataHandler.getContentType() });
266 new String[] { dataHandler.getContentType()});
267 setMimeHeader("Content-Type", dataHandler.getContentType()); 266 setMimeHeader("Content-Type", dataHandler.getContentType());
268 } 267 }
269 268
270 public void removeAllMimeHeaders() { 269 public void removeAllMimeHeaders() {
271 headers.removeAllHeaders(); 270 headers.removeAllHeaders();
602 // attachments are equal if they are the same reference 601 // attachments are equal if they are the same reference
603 public boolean equals(Object o) { 602 public boolean equals(Object o) {
604 return (this == o); 603 return (this == o);
605 } 604 }
606 605
606 // In JDK 8 we get a warning if we implement equals() but not hashCode().
607 // There is no intuitive value for this, the default one in Object is fine.
608 public int hashCode() {
609 return super.hashCode();
610 }
611
607 public MimeHeaders getMimeHeaders() { 612 public MimeHeaders getMimeHeaders() {
608 return headers; 613 return headers;
609 } 614 }
610 615
611 } 616 }

mercurial