mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Gradle: code cleanup
This commit is contained in:
+5
-3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user