diff --git a/src/main/scala/gitbucket/core/util/EditorConfigUtil.scala b/src/main/scala/gitbucket/core/util/EditorConfigUtil.scala index 7d65447..f581e7a 100644 --- a/src/main/scala/gitbucket/core/util/EditorConfigUtil.scala +++ b/src/main/scala/gitbucket/core/util/EditorConfigUtil.scala @@ -52,7 +52,7 @@ } override def getParent: ResourcePath = { - Option(path.getParentPath).map { new JGitResourcePath(repo, revStr, _) }.getOrElse(null) + Option(path.getParentPath).map { new JGitResourcePath(repo, revStr, _) }.orNull } override def openRandomReader(): Resource.RandomReader = { @@ -70,7 +70,7 @@ private class JGitResourcePath(repo: Repository, revStr: String, path: Ec4jPath) extends ResourcePath { override def getParent: ResourcePath = { - Option(path.getParentPath).map { new JGitResourcePath(repo, revStr, _) }.getOrElse(null) + Option(path.getParentPath).map { new JGitResourcePath(repo, revStr, _) }.orNull } override def getPath: Ec4jPath = {