mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[groovy] IDEA-209501 remove pointless assertion of bundled jar name
GitOrigin-RevId: 5be31ddb2f6ad58dbe8c5ecdb8080456d01550fd
This commit is contained in:
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)
|
||||
|
||||
Reference in New Issue
Block a user