]> source.dussan.org Git - sonarqube.git/commitdiff
Add annotation to indicate that method will close stream
authorEvgeny Mandrikov <mandrikov@gmail.com>
Thu, 21 Jun 2012 07:05:13 +0000 (13:05 +0600)
committerEvgeny Mandrikov <mandrikov@gmail.com>
Thu, 21 Jun 2012 07:05:13 +0000 (13:05 +0600)
sonar-core/src/main/java/org/sonar/core/config/ConfigurationUtils.java

index e81ffff6ece4e83526899c99f3747a36374fd1d4..97a85cdb3d9782f43fc4f0bee5814dcd4e290550 100644 (file)
@@ -24,6 +24,8 @@ import org.apache.commons.io.FileUtils;
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.lang.text.StrSubstitutor;
 
+import javax.annotation.WillClose;
+
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.IOException;
@@ -55,7 +57,7 @@ public final class ConfigurationUtils {
   /**
    * Note that the input stream is closed in this method.
    */
-  public static Properties readInputStream(InputStream input) throws IOException {
+  public static Properties readInputStream(@WillClose InputStream input) throws IOException {
     try {
       Properties p = new Properties();
       p.load(input);