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