Gradle: code cleanup

This commit is contained in:
Vladislav.Soroka
2014-01-30 17:04:49 +04:00
parent 789eb571b6
commit f27ab12499
@@ -408,18 +408,20 @@ public class GradleExecutionHelper {
}
@Nullable
@SuppressWarnings("IOResourceOpenedButNotSafelyClosed")
public static String getBuildSrcDefaultInitScript() {
InputStream stream =
GradleProjectResolver.class.getResourceAsStream("/org/jetbrains/plugins/gradle/model/internal/buildSrcInit.gradle");
try {
InputStream stream = GradleProjectResolver.class.getResourceAsStream("/org/jetbrains/plugins/gradle/model/internal/buildSrcInit.gradle");
if (stream == null) return null;
return FileUtil.loadTextAndClose(stream);
}
catch (Exception e) {
LOG.warn("Can't use IJ gradle init script", e);
return null;
}
finally {
StreamUtil.closeStream(stream);
}
}
@Nullable