[groovy] IDEA-209501 remove pointless assertion of bundled jar name

GitOrigin-RevId: 5be31ddb2f6ad58dbe8c5ecdb8080456d01550fd
This commit is contained in:
Daniil Ovchinnikov
2020-05-11 13:12:29 +00:00
committed by intellij-monorepo-bot
parent e3bd504aba
commit 1a3c2669bc
@@ -1,4 +1,4 @@
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
@file:JvmName("BundledGroovy")
package org.jetbrains.plugins.groovy.bundled
@@ -13,7 +13,6 @@ import com.intellij.psi.search.GlobalSearchScope
import com.intellij.psi.search.GlobalSearchScopesCore
import groovy.lang.GroovyObject
import org.jetbrains.plugins.groovy.config.AbstractConfigUtils.UNDEFINED_VERSION
import org.jetbrains.plugins.groovy.config.GroovyConfigUtils
import java.io.File
import java.util.jar.Attributes.Name.IMPLEMENTATION_VERSION
@@ -25,9 +24,7 @@ val bundledGroovyFile: File by lazy(::doGetBundledGroovyFile)
private fun doGetBundledGroovyFile(): File {
val jarPath = PathManager.getJarPathForClass(GroovyObject::class.java) ?: error("Cannot find JAR containing groovy classes")
val jar = File(jarPath)
assert(GroovyConfigUtils.GROOVY_ALL_JAR_PATTERN.matcher(jar.name).matches()) { "Incorrect path to groovy JAR: " + jarPath }
return jar
return File(jarPath)
}
val bundledGroovyJarRoot: VirtualFile? by lazy(::doGetBundledGroovyRoot)