puppetlabs/aws-sdk-for-java — pull request #1 by nemecec (2014-11-28 15:38:32+00:00)
Title: InputStream instance should be closed

Streams should always be closed after we are done with them.

Otherwise, for example, GlassFish complains:

WARNING|glassfish3.1.2|
javax.enterprise.system.core.classloading.com.sun.enterprise.loader|_ThreadID=64;_ThreadName=Thread-8;|
Input stream has been finalized or forced closed without being explicitly closed;
stream instantiation reported in following stack trace

java.lang.Throwable
at com.sun.enterprise.loader.ASURLClassLoader$SentinelInputStream.(ASURLClassLoader.java:1230)
at com.sun.enterprise.loader.ASURLClassLoader$InternalJarURLConnection.getInputStream(ASURLClassLoader.java:1338)
at java.net.URLClassLoader.getResourceAsStream(URLClassLoader.java:233)
at com.sun.enterprise.loader.ASURLClassLoader.getResourceAsStream(ASURLClassLoader.java:872)
at com.amazonaws.util.VersionInfoUtils.initializeVersion(VersionInfoUtils.java:98)
at com.amazonaws.util.VersionInfoUtils.getVersion(VersionInfoUtils.java:55)
at com.amazonaws.services.simpleemail.AWSJavaMailTransport.(AWSJavaMailTransport.java:348)