mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-12 16:35:52 +01:00
Add null check
This commit is contained in:
@@ -134,6 +134,7 @@ class InitializeListener extends ServletContextListener with SystemSettingsServi
|
|||||||
val cl = Thread.currentThread.getContextClassLoader
|
val cl = Thread.currentThread.getContextClassLoader
|
||||||
try {
|
try {
|
||||||
using(cl.getResourceAsStream("plugins/plugins.json")){ pluginsFile =>
|
using(cl.getResourceAsStream("plugins/plugins.json")){ pluginsFile =>
|
||||||
|
if(pluginsFile != null){
|
||||||
val pluginsJson = IOUtils.toString(pluginsFile, "UTF-8")
|
val pluginsJson = IOUtils.toString(pluginsFile, "UTF-8")
|
||||||
|
|
||||||
FileUtils.forceMkdir(PluginRepository.LocalRepositoryDir)
|
FileUtils.forceMkdir(PluginRepository.LocalRepositoryDir)
|
||||||
@@ -156,6 +157,7 @@ class InitializeListener extends ServletContextListener with SystemSettingsServi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} catch {
|
} catch {
|
||||||
case e: Exception => logger.error("Error in extracting bundled plugin", e)
|
case e: Exception => logger.error("Error in extracting bundled plugin", e)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user