Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 347573
Collapse All | Expand All

(-)src/org/eclipse/swt/internal/graphics/ImageFactory.java (-1 / +10 lines)
Lines 11-16 Link Here
11
 ******************************************************************************/
11
 ******************************************************************************/
12
package org.eclipse.swt.internal.graphics;
12
package org.eclipse.swt.internal.graphics;
13
13
14
import java.io.IOException;
14
import java.io.InputStream;
15
import java.io.InputStream;
15
16
16
import org.eclipse.rwt.RWT;
17
import org.eclipse.rwt.RWT;
Lines 18-23 Link Here
18
import org.eclipse.rwt.internal.util.*;
19
import org.eclipse.rwt.internal.util.*;
19
import org.eclipse.rwt.internal.util.SharedInstanceBuffer.IInstanceCreator;
20
import org.eclipse.rwt.internal.util.SharedInstanceBuffer.IInstanceCreator;
20
import org.eclipse.rwt.resources.IResourceManager;
21
import org.eclipse.rwt.resources.IResourceManager;
22
import org.eclipse.swt.SWT;
23
import org.eclipse.swt.SWTException;
21
import org.eclipse.swt.graphics.Device;
24
import org.eclipse.swt.graphics.Device;
22
import org.eclipse.swt.graphics.Image;
25
import org.eclipse.swt.graphics.Image;
23
26
Lines 67-73 Link Here
67
70
68
  private Image createImage( String path, ClassLoader imageLoader ) {
71
  private Image createImage( String path, ClassLoader imageLoader ) {
69
    InputStream inputStream = getInputStream( path, imageLoader );
72
    InputStream inputStream = getInputStream( path, imageLoader );
70
    return createImage( null, path, inputStream );
73
    Image result = createImage( null, path, inputStream );
74
    try {
75
      inputStream.close();
76
    } catch( IOException ioe ) {
77
      throw new SWTException( SWT.ERROR_IO, ioe.getMessage() );
78
    }
79
    return result;
71
  }
80
  }
72
81
73
  private static Image createImageInstance( Device device, InternalImage internalImage ) {
82
  private static Image createImageInstance( Device device, InternalImage internalImage ) {

Return to bug 347573