From 1a3c2669bc95fa52efa6d7428145bc3b267e2f4c Mon Sep 17 00:00:00 2001 From: Daniil Ovchinnikov Date: Mon, 11 May 2020 15:56:28 +0300 Subject: [PATCH] [groovy] IDEA-209501 remove pointless assertion of bundled jar name GitOrigin-RevId: 5be31ddb2f6ad58dbe8c5ecdb8080456d01550fd --- .../org/jetbrains/plugins/groovy/bundled/bundledGroovy.kt | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/plugins/groovy/src/org/jetbrains/plugins/groovy/bundled/bundledGroovy.kt b/plugins/groovy/src/org/jetbrains/plugins/groovy/bundled/bundledGroovy.kt index e174f8d84f06..205991ad975e 100644 --- a/plugins/groovy/src/org/jetbrains/plugins/groovy/bundled/bundledGroovy.kt +++ b/plugins/groovy/src/org/jetbrains/plugins/groovy/bundled/bundledGroovy.kt @@ -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)