[groovy] IDEA-330543: Update bundled groovy to 3.0.19

Required for migration to JBR 21

GitOrigin-RevId: bf73e7dbe92f9a652fae04ff2c58c84885057e87
This commit is contained in:
Konstantin Nisht
2023-08-23 16:49:38 +02:00
committed by intellij-monorepo-bot
parent 5ecc4133e1
commit 60b1305cad
8 changed files with 100 additions and 78 deletions

View File

@@ -1,18 +1,18 @@
<component name="libraryTable">
<library name="org.codehaus.groovy:groovy" type="repository">
<properties include-transitive-deps="false" maven-id="org.codehaus.groovy:groovy:3.0.13">
<properties include-transitive-deps="false" maven-id="org.codehaus.groovy:groovy:3.0.19">
<verification>
<artifact url="file://$MAVEN_REPOSITORY$/org/codehaus/groovy/groovy/3.0.13/groovy-3.0.13.jar">
<sha256sum>044569c20b1438263470585627da1b2c9722f1fb8d89f94e78c0ff219abd0146</sha256sum>
<artifact url="file://$MAVEN_REPOSITORY$/org/codehaus/groovy/groovy/3.0.19/groovy-3.0.19.jar">
<sha256sum>7ad326b0a7e49791f552313e35df7406c1a46bb6faf7908c2ecbb74daeff23fb</sha256sum>
</artifact>
</verification>
</properties>
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/codehaus/groovy/groovy/3.0.13/groovy-3.0.13.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/codehaus/groovy/groovy/3.0.19/groovy-3.0.19.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/codehaus/groovy/groovy/3.0.13/groovy-3.0.13-sources.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/codehaus/groovy/groovy/3.0.19/groovy-3.0.19-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@@ -1,18 +1,18 @@
<component name="libraryTable">
<library name="org.codehaus.groovy:groovy-ant" type="repository">
<properties include-transitive-deps="false" maven-id="org.codehaus.groovy:groovy-ant:3.0.13">
<properties include-transitive-deps="false" maven-id="org.codehaus.groovy:groovy-ant:3.0.19">
<verification>
<artifact url="file://$MAVEN_REPOSITORY$/org/codehaus/groovy/groovy-ant/3.0.13/groovy-ant-3.0.13.jar">
<sha256sum>6b98dcf1309448d48b5a9762e94073fbee17cc45ff2b91b3d74a34b4945517c7</sha256sum>
<artifact url="file://$MAVEN_REPOSITORY$/org/codehaus/groovy/groovy-ant/3.0.19/groovy-ant-3.0.19.jar">
<sha256sum>4bb1ef7f1dc01950e910b7dbc04010a999fc11f41a6dda02a7228036dd0a2379</sha256sum>
</artifact>
</verification>
</properties>
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/codehaus/groovy/groovy-ant/3.0.13/groovy-ant-3.0.13.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/codehaus/groovy/groovy-ant/3.0.19/groovy-ant-3.0.19.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/codehaus/groovy/groovy-ant/3.0.13/groovy-ant-3.0.13-sources.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/codehaus/groovy/groovy-ant/3.0.19/groovy-ant-3.0.19-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@@ -1,18 +1,18 @@
<component name="libraryTable">
<library name="org.codehaus.groovy:groovy-json" type="repository">
<properties include-transitive-deps="false" maven-id="org.codehaus.groovy:groovy-json:3.0.13">
<properties include-transitive-deps="false" maven-id="org.codehaus.groovy:groovy-json:3.0.19">
<verification>
<artifact url="file://$MAVEN_REPOSITORY$/org/codehaus/groovy/groovy-json/3.0.13/groovy-json-3.0.13.jar">
<sha256sum>921972defd8a89a5ab442f5ae57b1760755d7fe339dce46fe140e79a6e63e066</sha256sum>
<artifact url="file://$MAVEN_REPOSITORY$/org/codehaus/groovy/groovy-json/3.0.19/groovy-json-3.0.19.jar">
<sha256sum>6f4b1f79e8745b1546b96d248f50f1122e0697b6d33bbdd3af362ebc8fd19df3</sha256sum>
</artifact>
</verification>
</properties>
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/codehaus/groovy/groovy-json/3.0.13/groovy-json-3.0.13.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/codehaus/groovy/groovy-json/3.0.19/groovy-json-3.0.19.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/codehaus/groovy/groovy-json/3.0.13/groovy-json-3.0.13-sources.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/codehaus/groovy/groovy-json/3.0.19/groovy-json-3.0.19-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@@ -1,18 +1,18 @@
<component name="libraryTable">
<library name="org.codehaus.groovy:groovy-jsr223" type="repository">
<properties include-transitive-deps="false" maven-id="org.codehaus.groovy:groovy-jsr223:3.0.13">
<properties include-transitive-deps="false" maven-id="org.codehaus.groovy:groovy-jsr223:3.0.19">
<verification>
<artifact url="file://$MAVEN_REPOSITORY$/org/codehaus/groovy/groovy-jsr223/3.0.13/groovy-jsr223-3.0.13.jar">
<sha256sum>d834f8d0e07fa73f5a59f700903180c1d834acde8ca03dd79641ef1460c82a4e</sha256sum>
<artifact url="file://$MAVEN_REPOSITORY$/org/codehaus/groovy/groovy-jsr223/3.0.19/groovy-jsr223-3.0.19.jar">
<sha256sum>3a01fc77e1813aa032fd1db371d6f436e5c6fa6ee78f0f538002522e584fd522</sha256sum>
</artifact>
</verification>
</properties>
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/codehaus/groovy/groovy-jsr223/3.0.13/groovy-jsr223-3.0.13.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/codehaus/groovy/groovy-jsr223/3.0.19/groovy-jsr223-3.0.19.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/codehaus/groovy/groovy-jsr223/3.0.13/groovy-jsr223-3.0.13-sources.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/codehaus/groovy/groovy-jsr223/3.0.19/groovy-jsr223-3.0.19-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@@ -1,18 +1,18 @@
<component name="libraryTable">
<library name="org.codehaus.groovy:groovy-templates" type="repository">
<properties include-transitive-deps="false" maven-id="org.codehaus.groovy:groovy-templates:3.0.13">
<properties include-transitive-deps="false" maven-id="org.codehaus.groovy:groovy-templates:3.0.19">
<verification>
<artifact url="file://$MAVEN_REPOSITORY$/org/codehaus/groovy/groovy-templates/3.0.13/groovy-templates-3.0.13.jar">
<sha256sum>abfb7190631a35fc96e023bfcd4658f3f7d4ae76c488ef1b972a54b29809ddc2</sha256sum>
<artifact url="file://$MAVEN_REPOSITORY$/org/codehaus/groovy/groovy-templates/3.0.19/groovy-templates-3.0.19.jar">
<sha256sum>5d094c043aa9beaa090b75c6ab4e9bbb07de0d7b3e39f292f12c50ddae0f8f3d</sha256sum>
</artifact>
</verification>
</properties>
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/codehaus/groovy/groovy-templates/3.0.13/groovy-templates-3.0.13.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/codehaus/groovy/groovy-templates/3.0.19/groovy-templates-3.0.19.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/codehaus/groovy/groovy-templates/3.0.13/groovy-templates-3.0.13-sources.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/codehaus/groovy/groovy-templates/3.0.19/groovy-templates-3.0.19-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@@ -1,18 +1,18 @@
<component name="libraryTable">
<library name="org.codehaus.groovy:groovy-xml" type="repository">
<properties include-transitive-deps="false" maven-id="org.codehaus.groovy:groovy-xml:3.0.13">
<properties include-transitive-deps="false" maven-id="org.codehaus.groovy:groovy-xml:3.0.19">
<verification>
<artifact url="file://$MAVEN_REPOSITORY$/org/codehaus/groovy/groovy-xml/3.0.13/groovy-xml-3.0.13.jar">
<sha256sum>8faea983f0d871bd2d2f28150747edf9047dd4d716700a0276eaa905a5cd0816</sha256sum>
<artifact url="file://$MAVEN_REPOSITORY$/org/codehaus/groovy/groovy-xml/3.0.19/groovy-xml-3.0.19.jar">
<sha256sum>1527f7c7778dda9c87c8c905b81aba865e5dc7b92932bf2d04b85e96b3f8ad9e</sha256sum>
</artifact>
</verification>
</properties>
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/codehaus/groovy/groovy-xml/3.0.13/groovy-xml-3.0.13.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/codehaus/groovy/groovy-xml/3.0.19/groovy-xml-3.0.19.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/codehaus/groovy/groovy-xml/3.0.13/groovy-xml-3.0.13-sources.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/codehaus/groovy/groovy-xml/3.0.19/groovy-xml-3.0.19-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@@ -1,18 +1,4 @@
/*
* Copyright 2000-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.ide.highlighter.custom
import com.intellij.lang.cacheBuilder.WordOccurrence
@@ -458,6 +444,7 @@ IDENTIFIER ('foo')
def expectedWords = ['a', 'b', 'c', 'd', 'e$', 'foo']
scanner.processWords(text, { WordOccurrence w ->
assert w instanceof WordOccurrence // groovy 3.0.19 bug
words.add(w.baseText.subSequence(w.start, w.end))
} as Processor)
assert words == expectedWords

View File

@@ -1,4 +1,4 @@
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package org.jetbrains.plugins.groovy.lang.highlighting
import com.intellij.codeInspection.InspectionProfileEntry
@@ -15,6 +15,7 @@ import org.jetbrains.plugins.groovy.codeInspection.assignment.GroovyAssignabilit
import org.jetbrains.plugins.groovy.util.Slow
import static org.assertj.core.api.Assertions.assertThat
/**
* Character and char are skipped intentionally.
* Double and Double[] are skipped intentionally.
@@ -90,27 +91,24 @@ class GrAssignAutoTest extends GrHighlightingTestBase {
}
''',
typesXTypes,
[],
["boolean -> int", "boolean -> double", "boolean -> short", "boolean -> byte",
"List -> boolean[]", "List -> int[]", "List -> double[]", "List -> String[]", "List -> Integer[]", "List -> List[]", "List -> Object[]", "List -> Thread[]",
"List<BigDecimal> -> int[]", "List<BigDecimal> -> Integer[]", "List<BigDecimal> -> List[]", "List<BigDecimal> -> Thread[]",
"List<BigInteger> -> int[]", "List<BigInteger> -> double[]", "List<BigInteger> -> Integer[]", "List<BigInteger> -> List[]", "List<BigInteger> -> Thread[]",
"List<Integer> -> List[]", "List<Integer> -> Thread[]",
"List<String> -> int[]", "List<String> -> double[]", "List<String> -> Integer[]", "List<String> -> List[]", "List<String> -> Thread[]",
"List<Object> -> int[]", "List<Object> -> double[]", "List<Object> -> Integer[]", "List<Object> -> List[]", "List<Object> -> Thread[]",
"List<Thread> -> int[]", "List<Thread> -> double[]", "List<Thread> -> Integer[]", "List<Thread> -> List[]",
['List<BigDecimal> -> boolean[]', 'List<BigDecimal> -> double[]', 'List<BigDecimal> -> String[]', 'List<BigDecimal> -> Object[]', 'List<BigInteger> -> boolean[]', 'List<BigInteger> -> String[]','List<BigInteger> -> Object[]',
'List<Integer> -> boolean[]', 'List<Integer> -> int[]', 'List<Integer> -> double[]', 'List<Integer> -> String[]', 'List<Integer> -> Integer[]', 'List<Integer> -> Object[]',
'List<String> -> boolean[]', 'List<String> -> String[]', 'List<String> -> Object[]',
'List<Object> -> boolean[]', 'List<Object> -> String[]', 'List<Object> -> Object[]', 'List<Thread> -> boolean[]',
'List<Thread> -> String[]','List<Thread> -> Object[]', 'List<Thread> -> Thread[]',
'Set<String> -> boolean[]', 'Set<String> -> String[]', 'Set<String> -> Object[]',
'Set<Integer> -> boolean[]', 'Set<Integer> -> int[]', 'Set<Integer> -> double[]', 'Set<Integer> -> String[]', 'Set<Integer> -> Integer[]', 'Set<Integer> -> Object[]',
'Set<Object> -> boolean[]', 'Set<Object> -> String[]', 'Set<Object> -> Object[]',
'Set<Thread> -> boolean[]', 'Set<Thread> -> String[]', 'Set<Thread> -> Object[]', 'Set<Thread> -> Thread[]'],
["boolean -> int", "boolean -> double", "boolean -> short", "boolean -> byte", "boolean[] -> String[]", "boolean[] -> Object[]",
"boolean[] -> int[]", "boolean[] -> double[]",
"int[] -> boolean[]",
"double[] -> boolean[]",
"Integer[] -> String[]",
"List[] -> String[]",
"Object[] -> String[]",
"Thread[] -> String[]",
"Set -> boolean[]", "Set -> int[]", "Set -> double[]", "Set -> String[]", "Set -> Integer[]", "Set -> List[]", "Set -> Object[]", "Set -> Thread[]",
"Set<String> -> int[]", "Set<String> -> double[]", "Set<String> -> Integer[]", "Set<String> -> List[]", "Set<String> -> Thread[]",
"Set<Integer> -> List[]", "Set<Integer> -> Thread[]",
"Set<Object> -> int[]", "Set<Object> -> double[]", "Set<Object> -> Integer[]", "Set<Object> -> List[]", "Set<Object> -> Thread[]",
"Set<Thread> -> int[]", "Set<Thread> -> double[]", "Set<Thread> -> Integer[]", "Set<Thread> -> List[]"]
"int[] -> boolean[]", "int[] -> String[]", "int[] -> Integer[]", "int[] -> Object[]",
"double[] -> boolean[]", "double[] -> Integer[]", "double[] -> Object[]", "double[] -> String[]",
"Integer[] -> String[]", "Integer[] -> boolean[]", "Integer[] -> int[]", "Integer[] -> double[]",
"String[] -> boolean[]",
"List[] -> String[]", "List[] -> boolean[]",
"Object[] -> String[]", "Object[] -> boolean[]",
"Thread[] -> String[]", "Thread[] -> boolean[]"]
}
@@ -123,14 +121,33 @@ class GrAssignAutoTest extends GrHighlightingTestBase {
''',
typesXTypes,
[],
['boolean -> int', 'boolean -> double', 'boolean -> short', 'boolean -> byte',
'boolean[] -> int[]', 'boolean[] -> double[]',
'int[] -> boolean[]',
'double[] -> boolean[]',
'Integer[] -> String[]',
'List[] -> String[]',
'Object[] -> String[]',
'Thread[] -> String[]']
["boolean -> int",
"boolean -> double",
"boolean -> short",
"boolean -> byte",
"boolean[] -> int[]",
"boolean[] -> double[]",
"boolean[] -> String[]",
"boolean[] -> Object[]",
"int[] -> boolean[]",
"int[] -> String[]",
"int[] -> Integer[]",
"int[] -> Object[]",
"double[] -> boolean[]",
"double[] -> String[]",
"double[] -> Integer[]",
"double[] -> Object[]",
"String[] -> boolean[]",
"Integer[] -> boolean[]",
"Integer[] -> int[]",
"Integer[] -> double[]",
"Integer[] -> String[]",
"List[] -> boolean[]",
"List[] -> String[]",
"Object[] -> boolean[]",
"Object[] -> String[]",
"Thread[] -> boolean[]",
"Thread[] -> String[]"]
}
void testParameterMethodCall() {
@@ -145,7 +162,7 @@ class GrAssignAutoTest extends GrHighlightingTestBase {
''',
typesXTypes,
['int -> double[]', 'short -> int[]', 'short -> double[]', 'byte -> int[]', 'byte -> double[]', 'short -> Integer[]', 'byte -> Integer[]'],
['int[] -> double[]']
[]
}
void testReturnAssignValue() {
@@ -175,10 +192,28 @@ class GrAssignAutoTest extends GrHighlightingTestBase {
}
''',
valuesXTypes,
['[0L] -> BigInteger', '(Void)null -> Object'],
['[0L] -> BigInteger', '(Void)null -> Object', '[1] -> int', '[1] -> double', '[0L] -> double', '[1.2f] -> double', '["str"] -> int', '["str"] -> double', '["str"] -> short', '["str"] -> byte', 'new ArrayList<>() -> boolean[]', 'new ArrayList<>() -> String[]', 'new ArrayList<>() -> Object[]'],
[
'[] -> int', '[] -> double', '[] -> short', '[] -> byte',
'new ArrayList<>() -> int[]', 'new ArrayList<>() -> double[]', 'new ArrayList<>() -> Integer[]', 'new ArrayList<>() -> List[]', 'new ArrayList<>() -> Thread[]'
"[1] -> List<Object>", "[1] -> Set", "[1] -> Set<Integer>", "[1] -> Set<Object>",
"[0L] -> List<Object>",
"[0L] -> Set",
"[0L] -> Set<Object>",
"[1.1] -> List<Object>",
"[1.1] -> Set",
"[1.1] -> Set<Object>",
"[1.2f] -> List<Object>",
"[1.2f] -> Set",
"[1.2f] -> Set<Object>",
"[\"str\"] -> List<Object>",
"[\"str\"] -> Set",
"[\"str\"] -> Set<String>",
"[\"str\"] -> Set<Object>",
"[new Object()] -> Set",
"[new Object()] -> Set<Object>",
"[new Thread()] -> List<Object>",
"[new Thread()] -> Set",
"[new Thread()] -> Set<Object>",
"[new Thread()] -> Set<Thread>"
]
}