mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-09 15:05:44 +01:00
fix possible npes
This commit is contained in:
@@ -35,6 +35,8 @@ package sonia.scm.plugin;
|
||||
|
||||
//~--- non-JDK imports --------------------------------------------------------
|
||||
|
||||
import com.google.common.io.Closeables;
|
||||
|
||||
import org.sonatype.aether.artifact.Artifact;
|
||||
import org.sonatype.aether.graph.DependencyFilter;
|
||||
import org.sonatype.aether.graph.DependencyNode;
|
||||
@@ -118,7 +120,7 @@ public class AetherDependencyFilter implements DependencyFilter
|
||||
}
|
||||
finally
|
||||
{
|
||||
scanner.close();
|
||||
Closeables.closeQuietly(scanner);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -29,10 +29,13 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
package sonia.scm.util;
|
||||
|
||||
//~--- non-JDK imports --------------------------------------------------------
|
||||
|
||||
import com.google.common.io.Closeables;
|
||||
import com.google.inject.Singleton;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
@@ -232,7 +235,7 @@ public class DebugServlet extends HttpServlet
|
||||
}
|
||||
finally
|
||||
{
|
||||
writer.close();
|
||||
Closeables.closeQuietly(writer);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user