[jira] [Comment Edited] (GROOVY-11293) Error "BUG! At this point argument array length and parameter array length should be the same"
[ https://issues.apache.org/jira/browse/GROOVY-11293?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17808994#comment-17808994 ] Alexander Kriegisch edited comment on GROOVY-11293 at 1/21/24 4:25 AM: --- Minimal reproducer: {code:groovy} import java.nio.file.FileSystems class Groovy11293 { static void main(String[] args) { FileSystems.default.getPath('root.txt') } } {code} This looks like a varargs problem. *Update:* A workaround for the varargs problem is {{FileSystems.default.getPath('root.txt', [] as String[])}}. was (Author: kriegaex): Minimal reproducer: {code:groovy} import java.nio.file.FileSystems class Groovy11293 { static void main(String[] args) { FileSystems.default.getPath('root.txt') } } {code} This looks like a varargs problem. > Error "BUG! At this point argument array length and parameter array length > should be the same" > -- > > Key: GROOVY-11293 > URL: https://issues.apache.org/jira/browse/GROOVY-11293 > Project: Groovy > Issue Type: Bug >Affects Versions: 4.0.4, 4.0.16, 4.0.18 >Reporter: Alexander Kriegisch >Priority: Major > > When I compile and run this Spock 2.3-groovy-4.0 test on JDK 17 (build target > 8), it works fine: > {code:groovy} > import com.github.marschall.memoryfilesystem.MemoryFileSystemBuilder > import com.google.common.jimfs.Configuration > import com.google.common.jimfs.Jimfs > import spock.lang.Specification > import spock.lang.Unroll > import java.nio.file.FileSystems > import java.nio.file.Files > @Grab('com.google.jimfs:jimfs:1.3.0') > @Grab('com.github.marschall:memoryfilesystem:2.8.0') > class NestedZipTest extends Specification { > @Unroll('#scenario') > def 'create nested zip file'() { > given: 'a text file on the default FS' > def sourceFS = MemoryFileSystemBuilder.newEmpty().build() > def rootTxtPath = sourceFS.getPath('root.txt') > Files.write(rootTxtPath, 'Hello root!'.bytes) > when: 'creating a zip FS on the target FS, adding two text files' > def outerZipPath = targetFS.getPath('outer.zip') > if (Files.exists(outerZipPath)) > Files.delete(outerZipPath) > def outerZipFS = FileSystems.newFileSystem(outerZipPath, [create: 'true']) > Files.write(outerZipFS.getPath('outer.txt'), 'Hello outer!'.bytes) > Files.copy(rootTxtPath, outerZipFS.getPath('from-root.txt')) > and: 'creating a zip FS inside the outer zip file, adding two text files' > def innerZipPath = outerZipFS.getPath('inner.zip') > def innerZipFS = FileSystems.newFileSystem(innerZipPath, [create: 'true']) > Files.write(innerZipFS.getPath('inner.txt'), 'Hello inner!'.bytes) > Files.copy(rootTxtPath, innerZipFS.getPath('from-root.txt')) > and: 'creating a zip FS inside the inner zip file, adding two text files' > def inner2ZipPath = innerZipFS.getPath('inner2.zip') > def inner2ZipFS = FileSystems.newFileSystem(inner2ZipPath, [create: > 'true']) > Files.write(inner2ZipFS.getPath('inner2.txt'), 'Hello inner2!'.bytes) > Files.copy(rootTxtPath, inner2ZipFS.getPath('from-root.txt')) > then: 'no errors occur' > noExceptionThrown() > cleanup: > inner2ZipFS?.close() > innerZipFS?.close() > outerZipFS?.close() > where: > scenario | targetFS > 'on disk' | FileSystems.default > 'JimFS'| > Jimfs.newFileSystem(Configuration.unix().toBuilder().setWorkingDirectory('/').build()) > 'MemoryFileSystem' | MemoryFileSystemBuilder.newEmpty().build() > } > } > {code} > Try it in the [Groovy Web > Console|https://gwc-experiment.appspot.com/?g=groovy_4_0=eNqdVVFv0zAQfs-vOMSDU2kYCC-oEmICNhASCKlDSCAeXOeSenPsyHZoC-y_4zhpnXSZ1tKHyD3ffXffd9adqGptHHBd0VK4VbOkFTOWr5iUtMJKm20hJNqtdVjRT8Fw6Q2LYHjTCJmjScQAROtSIvXHSit6LarC0rdaFaJsDHNCq4ecP7bfnZOtNb-hkqmSLmrkohB8BDK4_6qMljLZ3VyzX4wqoWlbPo0l2_sdbJKcvzdsmZJBbaGoefd9Tl_QZ2Q28jrQbH6o2TyjL0MQl8xa-IzemH8X9ZU_AG4cqtzCiBv8SQDOOzopeWw5KmaE9hAAORZAuEHmEFSAgt-ihjYdSWchEqAUv1DNgTBwPkG4BA_rVtjGs0Y6uFyQ4NriWd0YjpcLeAX39JcqXF9UtdumM7psTelsH220dlcb94W5lQfYYdESgykl7T11G0e6kKAzXRvhMB2EngH5gFLqAPeI0OXWoZ0lIWS9CmwCa6FKYIGyr7fn5Jjx2bzhDFietx5urSN1G5nqxqHx2vfFdoHDYoMD9fB9taKAtKsYN8I6mw4RZp3PjlOOEj2pkcedzEHlwWNslY1_R8Fn8KNrtOfuTIPk510FI-whh6D4XtVgi7JGGK7r7bgPU5CF0dWT2Mi-L0zlk20RyoocQ2sC2P6FPtgfodSwP1OlBJdBh4ZhD4g7RD9G3Ah7mH4sbrAdJ-4U5H-LG8BOFDeL6t5LL5uSNztS3-xUgbPpEiYkzk7QODtKZNdNFqUBjdHGgua8MZ1kSl9sONbtQL5aGb1WaR_EJTLV1PNuQMRkrymX2mI_GqO6Y3t809G-m3IGO9DdxIf4-7sfVsGD-NGXC3tDhh7DzvRzvnP2G9XPexjBhS170MDRmqaNEhs_753ul4A_W3TftLnxr-ydMMid3xUpeUr2S6GjSA63CPH5Ttost8lt8g9XIuDH]. > You can also comment out the test iterations for JimFS and MemoryFileSystem > in the {{where}} blocks, if you want to test without external dependencies. > When running the
[jira] [Comment Edited] (GROOVY-11293) Error "BUG! At this point argument array length and parameter array length should be the same"
[ https://issues.apache.org/jira/browse/GROOVY-11293?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17808994#comment-17808994 ] Alexander Kriegisch edited comment on GROOVY-11293 at 1/21/24 2:30 AM: --- Minimal reproducer: {code:groovy} import java.nio.file.FileSystems class Groovy11293 { static void main(String[] args) { FileSystems.default.getPath('root.txt') } } {code} This looks like a varargs problem. was (Author: kriegaex): Minimal reproducer: {code:groovy} import java.nio.file.FileSystems class NestedZip { static void main(String[] args) { FileSystems.default.getPath('root.txt') } } {code} This looks like a varargs problem. > Error "BUG! At this point argument array length and parameter array length > should be the same" > -- > > Key: GROOVY-11293 > URL: https://issues.apache.org/jira/browse/GROOVY-11293 > Project: Groovy > Issue Type: Bug >Affects Versions: 4.0.4, 4.0.16, 4.0.18 >Reporter: Alexander Kriegisch >Priority: Major > > When I compile and run this Spock 2.3-groovy-4.0 test on JDK 17 (build target > 8), it works fine: > {code:groovy} > import com.github.marschall.memoryfilesystem.MemoryFileSystemBuilder > import com.google.common.jimfs.Configuration > import com.google.common.jimfs.Jimfs > import spock.lang.Specification > import spock.lang.Unroll > import java.nio.file.FileSystems > import java.nio.file.Files > @Grab('com.google.jimfs:jimfs:1.3.0') > @Grab('com.github.marschall:memoryfilesystem:2.8.0') > class NestedZipTest extends Specification { > @Unroll('#scenario') > def 'create nested zip file'() { > given: 'a text file on the default FS' > def sourceFS = MemoryFileSystemBuilder.newEmpty().build() > def rootTxtPath = sourceFS.getPath('root.txt') > Files.write(rootTxtPath, 'Hello root!'.bytes) > when: 'creating a zip FS on the target FS, adding two text files' > def outerZipPath = targetFS.getPath('outer.zip') > if (Files.exists(outerZipPath)) > Files.delete(outerZipPath) > def outerZipFS = FileSystems.newFileSystem(outerZipPath, [create: 'true']) > Files.write(outerZipFS.getPath('outer.txt'), 'Hello outer!'.bytes) > Files.copy(rootTxtPath, outerZipFS.getPath('from-root.txt')) > and: 'creating a zip FS inside the outer zip file, adding two text files' > def innerZipPath = outerZipFS.getPath('inner.zip') > def innerZipFS = FileSystems.newFileSystem(innerZipPath, [create: 'true']) > Files.write(innerZipFS.getPath('inner.txt'), 'Hello inner!'.bytes) > Files.copy(rootTxtPath, innerZipFS.getPath('from-root.txt')) > and: 'creating a zip FS inside the inner zip file, adding two text files' > def inner2ZipPath = innerZipFS.getPath('inner2.zip') > def inner2ZipFS = FileSystems.newFileSystem(inner2ZipPath, [create: > 'true']) > Files.write(inner2ZipFS.getPath('inner2.txt'), 'Hello inner2!'.bytes) > Files.copy(rootTxtPath, inner2ZipFS.getPath('from-root.txt')) > then: 'no errors occur' > noExceptionThrown() > cleanup: > inner2ZipFS?.close() > innerZipFS?.close() > outerZipFS?.close() > where: > scenario | targetFS > 'on disk' | FileSystems.default > 'JimFS'| > Jimfs.newFileSystem(Configuration.unix().toBuilder().setWorkingDirectory('/').build()) > 'MemoryFileSystem' | MemoryFileSystemBuilder.newEmpty().build() > } > } > {code} > Try it in the [Groovy Web > Console|https://gwc-experiment.appspot.com/?g=groovy_4_0=eNqdVVFv0zAQfs-vOMSDU2kYCC-oEmICNhASCKlDSCAeXOeSenPsyHZoC-y_4zhpnXSZ1tKHyD3ffXffd9adqGptHHBd0VK4VbOkFTOWr5iUtMJKm20hJNqtdVjRT8Fw6Q2LYHjTCJmjScQAROtSIvXHSit6LarC0rdaFaJsDHNCq4ecP7bfnZOtNb-hkqmSLmrkohB8BDK4_6qMljLZ3VyzX4wqoWlbPo0l2_sdbJKcvzdsmZJBbaGoefd9Tl_QZ2Q28jrQbH6o2TyjL0MQl8xa-IzemH8X9ZU_AG4cqtzCiBv8SQDOOzopeWw5KmaE9hAAORZAuEHmEFSAgt-ihjYdSWchEqAUv1DNgTBwPkG4BA_rVtjGs0Y6uFyQ4NriWd0YjpcLeAX39JcqXF9UtdumM7psTelsH220dlcb94W5lQfYYdESgykl7T11G0e6kKAzXRvhMB2EngH5gFLqAPeI0OXWoZ0lIWS9CmwCa6FKYIGyr7fn5Jjx2bzhDFietx5urSN1G5nqxqHx2vfFdoHDYoMD9fB9taKAtKsYN8I6mw4RZp3PjlOOEj2pkcedzEHlwWNslY1_R8Fn8KNrtOfuTIPk510FI-whh6D4XtVgi7JGGK7r7bgPU5CF0dWT2Mi-L0zlk20RyoocQ2sC2P6FPtgfodSwP1OlBJdBh4ZhD4g7RD9G3Ah7mH4sbrAdJ-4U5H-LG8BOFDeL6t5LL5uSNztS3-xUgbPpEiYkzk7QODtKZNdNFqUBjdHGgua8MZ1kSl9sONbtQL5aGb1WaR_EJTLV1PNuQMRkrymX2mI_GqO6Y3t809G-m3IGO9DdxIf4-7sfVsGD-NGXC3tDhh7DzvRzvnP2G9XPexjBhS170MDRmqaNEhs_753ul4A_W3TftLnxr-ydMMid3xUpeUr2S6GjSA63CPH5Ttost8lt8g9XIuDH]. > You can also comment out the test iterations for JimFS and MemoryFileSystem > in the {{where}} blocks, if you want to test without external dependencies. > When running the same code on JDK 8, there is a {{MissingMethodException}}, > which is fine, because some JDK API I am calling only
[jira] [Comment Edited] (GROOVY-11293) Error "BUG! At this point argument array length and parameter array length should be the same"
[ https://issues.apache.org/jira/browse/GROOVY-11293?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17808994#comment-17808994 ] Alexander Kriegisch edited comment on GROOVY-11293 at 1/21/24 2:28 AM: --- Minimal reproducer: {code:groovy} import java.nio.file.FileSystems class NestedZip { static void main(String[] args) { FileSystems.default.getPath('root.txt') } } {code} This looks like a varargs problem. was (Author: kriegaex): Minimal reproducer: {code:groovy} import java.nio.file.FileSystems class NestedZip { static void main(String[] args) { FileSystems.default.getPath('root.txt') } } {code} > Error "BUG! At this point argument array length and parameter array length > should be the same" > -- > > Key: GROOVY-11293 > URL: https://issues.apache.org/jira/browse/GROOVY-11293 > Project: Groovy > Issue Type: Bug >Affects Versions: 4.0.4, 4.0.16, 4.0.18 >Reporter: Alexander Kriegisch >Priority: Major > > When I compile and run this Spock 2.3-groovy-4.0 test on JDK 17 (build target > 8), it works fine: > {code:groovy} > import com.github.marschall.memoryfilesystem.MemoryFileSystemBuilder > import com.google.common.jimfs.Configuration > import com.google.common.jimfs.Jimfs > import spock.lang.Specification > import spock.lang.Unroll > import java.nio.file.FileSystems > import java.nio.file.Files > @Grab('com.google.jimfs:jimfs:1.3.0') > @Grab('com.github.marschall:memoryfilesystem:2.8.0') > class NestedZipTest extends Specification { > @Unroll('#scenario') > def 'create nested zip file'() { > given: 'a text file on the default FS' > def sourceFS = MemoryFileSystemBuilder.newEmpty().build() > def rootTxtPath = sourceFS.getPath('root.txt') > Files.write(rootTxtPath, 'Hello root!'.bytes) > when: 'creating a zip FS on the target FS, adding two text files' > def outerZipPath = targetFS.getPath('outer.zip') > if (Files.exists(outerZipPath)) > Files.delete(outerZipPath) > def outerZipFS = FileSystems.newFileSystem(outerZipPath, [create: 'true']) > Files.write(outerZipFS.getPath('outer.txt'), 'Hello outer!'.bytes) > Files.copy(rootTxtPath, outerZipFS.getPath('from-root.txt')) > and: 'creating a zip FS inside the outer zip file, adding two text files' > def innerZipPath = outerZipFS.getPath('inner.zip') > def innerZipFS = FileSystems.newFileSystem(innerZipPath, [create: 'true']) > Files.write(innerZipFS.getPath('inner.txt'), 'Hello inner!'.bytes) > Files.copy(rootTxtPath, innerZipFS.getPath('from-root.txt')) > and: 'creating a zip FS inside the inner zip file, adding two text files' > def inner2ZipPath = innerZipFS.getPath('inner2.zip') > def inner2ZipFS = FileSystems.newFileSystem(inner2ZipPath, [create: > 'true']) > Files.write(inner2ZipFS.getPath('inner2.txt'), 'Hello inner2!'.bytes) > Files.copy(rootTxtPath, inner2ZipFS.getPath('from-root.txt')) > then: 'no errors occur' > noExceptionThrown() > cleanup: > inner2ZipFS?.close() > innerZipFS?.close() > outerZipFS?.close() > where: > scenario | targetFS > 'on disk' | FileSystems.default > 'JimFS'| > Jimfs.newFileSystem(Configuration.unix().toBuilder().setWorkingDirectory('/').build()) > 'MemoryFileSystem' | MemoryFileSystemBuilder.newEmpty().build() > } > } > {code} > Try it in the [Groovy Web > Console|https://gwc-experiment.appspot.com/?g=groovy_4_0=eNqdVVFv0zAQfs-vOMSDU2kYCC-oEmICNhASCKlDSCAeXOeSenPsyHZoC-y_4zhpnXSZ1tKHyD3ffXffd9adqGptHHBd0VK4VbOkFTOWr5iUtMJKm20hJNqtdVjRT8Fw6Q2LYHjTCJmjScQAROtSIvXHSit6LarC0rdaFaJsDHNCq4ecP7bfnZOtNb-hkqmSLmrkohB8BDK4_6qMljLZ3VyzX4wqoWlbPo0l2_sdbJKcvzdsmZJBbaGoefd9Tl_QZ2Q28jrQbH6o2TyjL0MQl8xa-IzemH8X9ZU_AG4cqtzCiBv8SQDOOzopeWw5KmaE9hAAORZAuEHmEFSAgt-ihjYdSWchEqAUv1DNgTBwPkG4BA_rVtjGs0Y6uFyQ4NriWd0YjpcLeAX39JcqXF9UtdumM7psTelsH220dlcb94W5lQfYYdESgykl7T11G0e6kKAzXRvhMB2EngH5gFLqAPeI0OXWoZ0lIWS9CmwCa6FKYIGyr7fn5Jjx2bzhDFietx5urSN1G5nqxqHx2vfFdoHDYoMD9fB9taKAtKsYN8I6mw4RZp3PjlOOEj2pkcedzEHlwWNslY1_R8Fn8KNrtOfuTIPk510FI-whh6D4XtVgi7JGGK7r7bgPU5CF0dWT2Mi-L0zlk20RyoocQ2sC2P6FPtgfodSwP1OlBJdBh4ZhD4g7RD9G3Ah7mH4sbrAdJ-4U5H-LG8BOFDeL6t5LL5uSNztS3-xUgbPpEiYkzk7QODtKZNdNFqUBjdHGgua8MZ1kSl9sONbtQL5aGb1WaR_EJTLV1PNuQMRkrymX2mI_GqO6Y3t809G-m3IGO9DdxIf4-7sfVsGD-NGXC3tDhh7DzvRzvnP2G9XPexjBhS170MDRmqaNEhs_753ul4A_W3TftLnxr-ydMMid3xUpeUr2S6GjSA63CPH5Ttost8lt8g9XIuDH]. > You can also comment out the test iterations for JimFS and MemoryFileSystem > in the {{where}} blocks, if you want to test without external dependencies. > When running the same code on JDK 8, there is a {{MissingMethodException}}, > which is fine, because some JDK API I am calling only exists since JDK 13. > I.e., I
[jira] [Commented] (GROOVY-11293) Error "BUG! At this point argument array length and parameter array length should be the same"
[ https://issues.apache.org/jira/browse/GROOVY-11293?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17808994#comment-17808994 ] Alexander Kriegisch commented on GROOVY-11293: -- Minimal reproducer: {code:groovy} import java.nio.file.FileSystems class NestedZip { static void main(String[] args) { FileSystems.default.getPath('root.txt') } } {code} > Error "BUG! At this point argument array length and parameter array length > should be the same" > -- > > Key: GROOVY-11293 > URL: https://issues.apache.org/jira/browse/GROOVY-11293 > Project: Groovy > Issue Type: Bug >Affects Versions: 4.0.4, 4.0.16, 4.0.18 >Reporter: Alexander Kriegisch >Priority: Major > > When I compile and run this Spock 2.3-groovy-4.0 test on JDK 17 (build target > 8), it works fine: > {code:groovy} > import com.github.marschall.memoryfilesystem.MemoryFileSystemBuilder > import com.google.common.jimfs.Configuration > import com.google.common.jimfs.Jimfs > import spock.lang.Specification > import spock.lang.Unroll > import java.nio.file.FileSystems > import java.nio.file.Files > @Grab('com.google.jimfs:jimfs:1.3.0') > @Grab('com.github.marschall:memoryfilesystem:2.8.0') > class NestedZipTest extends Specification { > @Unroll('#scenario') > def 'create nested zip file'() { > given: 'a text file on the default FS' > def sourceFS = MemoryFileSystemBuilder.newEmpty().build() > def rootTxtPath = sourceFS.getPath('root.txt') > Files.write(rootTxtPath, 'Hello root!'.bytes) > when: 'creating a zip FS on the target FS, adding two text files' > def outerZipPath = targetFS.getPath('outer.zip') > if (Files.exists(outerZipPath)) > Files.delete(outerZipPath) > def outerZipFS = FileSystems.newFileSystem(outerZipPath, [create: 'true']) > Files.write(outerZipFS.getPath('outer.txt'), 'Hello outer!'.bytes) > Files.copy(rootTxtPath, outerZipFS.getPath('from-root.txt')) > and: 'creating a zip FS inside the outer zip file, adding two text files' > def innerZipPath = outerZipFS.getPath('inner.zip') > def innerZipFS = FileSystems.newFileSystem(innerZipPath, [create: 'true']) > Files.write(innerZipFS.getPath('inner.txt'), 'Hello inner!'.bytes) > Files.copy(rootTxtPath, innerZipFS.getPath('from-root.txt')) > and: 'creating a zip FS inside the inner zip file, adding two text files' > def inner2ZipPath = innerZipFS.getPath('inner2.zip') > def inner2ZipFS = FileSystems.newFileSystem(inner2ZipPath, [create: > 'true']) > Files.write(inner2ZipFS.getPath('inner2.txt'), 'Hello inner2!'.bytes) > Files.copy(rootTxtPath, inner2ZipFS.getPath('from-root.txt')) > then: 'no errors occur' > noExceptionThrown() > cleanup: > inner2ZipFS?.close() > innerZipFS?.close() > outerZipFS?.close() > where: > scenario | targetFS > 'on disk' | FileSystems.default > 'JimFS'| > Jimfs.newFileSystem(Configuration.unix().toBuilder().setWorkingDirectory('/').build()) > 'MemoryFileSystem' | MemoryFileSystemBuilder.newEmpty().build() > } > } > {code} > Try it in the [Groovy Web > Console|https://gwc-experiment.appspot.com/?g=groovy_4_0=eNqdVVFv0zAQfs-vOMSDU2kYCC-oEmICNhASCKlDSCAeXOeSenPsyHZoC-y_4zhpnXSZ1tKHyD3ffXffd9adqGptHHBd0VK4VbOkFTOWr5iUtMJKm20hJNqtdVjRT8Fw6Q2LYHjTCJmjScQAROtSIvXHSit6LarC0rdaFaJsDHNCq4ecP7bfnZOtNb-hkqmSLmrkohB8BDK4_6qMljLZ3VyzX4wqoWlbPo0l2_sdbJKcvzdsmZJBbaGoefd9Tl_QZ2Q28jrQbH6o2TyjL0MQl8xa-IzemH8X9ZU_AG4cqtzCiBv8SQDOOzopeWw5KmaE9hAAORZAuEHmEFSAgt-ihjYdSWchEqAUv1DNgTBwPkG4BA_rVtjGs0Y6uFyQ4NriWd0YjpcLeAX39JcqXF9UtdumM7psTelsH220dlcb94W5lQfYYdESgykl7T11G0e6kKAzXRvhMB2EngH5gFLqAPeI0OXWoZ0lIWS9CmwCa6FKYIGyr7fn5Jjx2bzhDFietx5urSN1G5nqxqHx2vfFdoHDYoMD9fB9taKAtKsYN8I6mw4RZp3PjlOOEj2pkcedzEHlwWNslY1_R8Fn8KNrtOfuTIPk510FI-whh6D4XtVgi7JGGK7r7bgPU5CF0dWT2Mi-L0zlk20RyoocQ2sC2P6FPtgfodSwP1OlBJdBh4ZhD4g7RD9G3Ah7mH4sbrAdJ-4U5H-LG8BOFDeL6t5LL5uSNztS3-xUgbPpEiYkzk7QODtKZNdNFqUBjdHGgua8MZ1kSl9sONbtQL5aGb1WaR_EJTLV1PNuQMRkrymX2mI_GqO6Y3t809G-m3IGO9DdxIf4-7sfVsGD-NGXC3tDhh7DzvRzvnP2G9XPexjBhS170MDRmqaNEhs_753ul4A_W3TftLnxr-ydMMid3xUpeUr2S6GjSA63CPH5Ttost8lt8g9XIuDH]. > You can also comment out the test iterations for JimFS and MemoryFileSystem > in the {{where}} blocks, if you want to test without external dependencies. > When running the same code on JDK 8, there is a {{MissingMethodException}}, > which is fine, because some JDK API I am calling only exists since JDK 13. > I.e., I expect the {{MissingMethodException}} on JDKs 8-12 and a working test > on 13+. > What happens instead is that on JDKs 9-16, I see: *"BUG! At this point > argument array length and parameter array length should be the same"* > Because of this message coming from Groovy directly, I am opening
[jira] [Comment Edited] (GROOVY-11293) Error "BUG! At this point argument array length and parameter array length should be the same"
[ https://issues.apache.org/jira/browse/GROOVY-11293?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17808990#comment-17808990 ] Alexander Kriegisch edited comment on GROOVY-11293 at 1/21/24 1:41 AM: --- OK, I have taken Spock out of the equation, same errors on same JDKs, as described above: {code:groovy} import java.nio.file.FileSystem import java.nio.file.FileSystems import java.nio.file.Files import java.nio.file.Path class NestedZip { static void main(String[] args) { def targetFS = FileSystems.default //given: 'a text file on the source FS' FileSystem sourceFS = FileSystems.default Path rootTxtPath = sourceFS.getPath('root.txt') Files.write(rootTxtPath, 'Hello root!'.bytes) //when: 'creating a zip FS on the target FS, creating text file and copying one from the source FS' def outerZipPath = targetFS.getPath('outer.zip') if (Files.exists(outerZipPath)) Files.delete(outerZipPath) def outerZipFS = FileSystems.newFileSystem(outerZipPath, [create: 'true']) Files.write(outerZipFS.getPath('outer.txt'), 'Hello outer!'.bytes) Files.copy(rootTxtPath, outerZipFS.getPath('from-root.txt')) //and: 'creating a zip FS inside the outer zip file, creating text file and copying one from the source FS' def innerZipPath = outerZipFS.getPath('inner.zip') def innerZipFS = FileSystems.newFileSystem(innerZipPath, [create: 'true']) Files.write(innerZipFS.getPath('inner.txt'), 'Hello inner!'.bytes) Files.copy(rootTxtPath, innerZipFS.getPath('from-root.txt')) //and: 'creating a zip FS inside the inner zip file, creating text file and copying one from the source FS' def inner2ZipPath = innerZipFS.getPath('inner2.zip') def inner2ZipFS = FileSystems.newFileSystem(inner2ZipPath, [create: 'true']) Files.write(inner2ZipFS.getPath('inner2.txt'), 'Hello inner2!'.bytes) Files.copy(rootTxtPath, inner2ZipFS.getPath('from-root.txt')) //then: 'no errors occur' //noExceptionThrown() //cleanup: inner2ZipFS?.close() innerZipFS?.close() outerZipFS?.close() if (outerZipPath && Files.exists(outerZipPath)) Files.delete(outerZipPath) if (rootTxtPath && Files.exists(rootTxtPath)) Files.delete(rootTxtPath) } } {code} {code:none} Exception in thread "main" BUG! At this point argument array length and parameter array length should be the same at org.codehaus.groovy.vmplugin.v8.Selector$MethodSelector.correctCoerce(Selector.java:811) at org.codehaus.groovy.vmplugin.v8.Selector$MethodSelector.setCallSiteTarget(Selector.java:1027) at org.codehaus.groovy.vmplugin.v8.IndyInterface.fallback(IndyInterface.java:360) at org.codehaus.groovy.vmplugin.v8.IndyInterface.access$000(IndyInterface.java:50) at org.codehaus.groovy.vmplugin.v8.IndyInterface$FallbackSupplier.get(IndyInterface.java:282) at org.codehaus.groovy.vmplugin.v8.IndyInterface.lambda$fromCache$1(IndyInterface.java:304) at org.codehaus.groovy.vmplugin.v8.CacheableCallSite.getAndPut(CacheableCallSite.java:70) at org.codehaus.groovy.vmplugin.v8.IndyInterface.lambda$fromCache$2(IndyInterface.java:301) at org.codehaus.groovy.vmplugin.v8.IndyInterface.doWithCallSite(IndyInterface.java:376) at org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:298) at NestedZip.main(NestedZip.groovy:12) {code} was (Author: kriegaex): OK, I have taken Spock out of the equation, same errors on same JDKs, as described above: {code:groovy} import java.nio.file.FileSystem import java.nio.file.FileSystems import java.nio.file.Files import java.nio.file.Path class NestedZip { static void main(String[] args) { def targetFS = FileSystems.default //given: 'a text file on the source FS' FileSystem sourceFS = FileSystems.default Path rootTxtPath = sourceFS.getPath('root.txt') Files.write(rootTxtPath, 'Hello root!'.bytes) //when: 'creating a zip FS on the target FS, creating text file and copying one from the source FS' def outerZipPath = targetFS.getPath('outer.zip') if (Files.exists(outerZipPath)) Files.delete(outerZipPath) def outerZipFS = FileSystems.newFileSystem(outerZipPath, [create: 'true']) Files.write(outerZipFS.getPath('outer.txt'), 'Hello outer!'.bytes) Files.copy(rootTxtPath, outerZipFS.getPath('from-root.txt')) //and: 'creating a zip FS inside the outer zip file, creating text file and copying one from the source FS' def innerZipPath = outerZipFS.getPath('inner.zip') def innerZipFS = FileSystems.newFileSystem(innerZipPath, [create: 'true']) Files.write(innerZipFS.getPath('inner.txt'), 'Hello inner!'.bytes) Files.copy(rootTxtPath, innerZipFS.getPath('from-root.txt')) //and: 'creating a zip FS inside the inner zip file, creating text file and copying one from the
[jira] [Commented] (GROOVY-11293) Error "BUG! At this point argument array length and parameter array length should be the same"
[ https://issues.apache.org/jira/browse/GROOVY-11293?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17808990#comment-17808990 ] Alexander Kriegisch commented on GROOVY-11293: -- OK, I have taken Spock out of the equation, same errors on same JDKs, as described above: {code:groovy} import java.nio.file.FileSystem import java.nio.file.FileSystems import java.nio.file.Files import java.nio.file.Path class NestedZip { static void main(String[] args) { def targetFS = FileSystems.default //given: 'a text file on the source FS' FileSystem sourceFS = FileSystems.default Path rootTxtPath = sourceFS.getPath('root.txt') Files.write(rootTxtPath, 'Hello root!'.bytes) //when: 'creating a zip FS on the target FS, creating text file and copying one from the source FS' def outerZipPath = targetFS.getPath('outer.zip') if (Files.exists(outerZipPath)) Files.delete(outerZipPath) def outerZipFS = FileSystems.newFileSystem(outerZipPath, [create: 'true']) Files.write(outerZipFS.getPath('outer.txt'), 'Hello outer!'.bytes) Files.copy(rootTxtPath, outerZipFS.getPath('from-root.txt')) //and: 'creating a zip FS inside the outer zip file, creating text file and copying one from the source FS' def innerZipPath = outerZipFS.getPath('inner.zip') def innerZipFS = FileSystems.newFileSystem(innerZipPath, [create: 'true']) Files.write(innerZipFS.getPath('inner.txt'), 'Hello inner!'.bytes) Files.copy(rootTxtPath, innerZipFS.getPath('from-root.txt')) //and: 'creating a zip FS inside the inner zip file, creating text file and copying one from the source FS' def inner2ZipPath = innerZipFS.getPath('inner2.zip') def inner2ZipFS = FileSystems.newFileSystem(inner2ZipPath, [create: 'true']) Files.write(inner2ZipFS.getPath('inner2.txt'), 'Hello inner2!'.bytes) Files.copy(rootTxtPath, inner2ZipFS.getPath('from-root.txt')) //then: 'no errors occur' //noExceptionThrown() //cleanup: inner2ZipFS?.close() innerZipFS?.close() outerZipFS?.close() if (outerZipPath && Files.exists(outerZipPath)) Files.delete(outerZipPath) if (rootTxtPath && Files.exists(rootTxtPath)) Files.delete(rootTxtPath) } } {code} > Error "BUG! At this point argument array length and parameter array length > should be the same" > -- > > Key: GROOVY-11293 > URL: https://issues.apache.org/jira/browse/GROOVY-11293 > Project: Groovy > Issue Type: Bug >Affects Versions: 4.0.4, 4.0.16, 4.0.18 >Reporter: Alexander Kriegisch >Priority: Major > > When I compile and run this Spock 2.3-groovy-4.0 test on JDK 17 (build target > 8), it works fine: > {code:groovy} > import com.github.marschall.memoryfilesystem.MemoryFileSystemBuilder > import com.google.common.jimfs.Configuration > import com.google.common.jimfs.Jimfs > import spock.lang.Specification > import spock.lang.Unroll > import java.nio.file.FileSystems > import java.nio.file.Files > @Grab('com.google.jimfs:jimfs:1.3.0') > @Grab('com.github.marschall:memoryfilesystem:2.8.0') > class NestedZipTest extends Specification { > @Unroll('#scenario') > def 'create nested zip file'() { > given: 'a text file on the default FS' > def sourceFS = MemoryFileSystemBuilder.newEmpty().build() > def rootTxtPath = sourceFS.getPath('root.txt') > Files.write(rootTxtPath, 'Hello root!'.bytes) > when: 'creating a zip FS on the target FS, adding two text files' > def outerZipPath = targetFS.getPath('outer.zip') > if (Files.exists(outerZipPath)) > Files.delete(outerZipPath) > def outerZipFS = FileSystems.newFileSystem(outerZipPath, [create: 'true']) > Files.write(outerZipFS.getPath('outer.txt'), 'Hello outer!'.bytes) > Files.copy(rootTxtPath, outerZipFS.getPath('from-root.txt')) > and: 'creating a zip FS inside the outer zip file, adding two text files' > def innerZipPath = outerZipFS.getPath('inner.zip') > def innerZipFS = FileSystems.newFileSystem(innerZipPath, [create: 'true']) > Files.write(innerZipFS.getPath('inner.txt'), 'Hello inner!'.bytes) > Files.copy(rootTxtPath, innerZipFS.getPath('from-root.txt')) > and: 'creating a zip FS inside the inner zip file, adding two text files' > def inner2ZipPath = innerZipFS.getPath('inner2.zip') > def inner2ZipFS = FileSystems.newFileSystem(inner2ZipPath, [create: > 'true']) > Files.write(inner2ZipFS.getPath('inner2.txt'), 'Hello inner2!'.bytes) > Files.copy(rootTxtPath, inner2ZipFS.getPath('from-root.txt')) > then: 'no errors occur' > noExceptionThrown() > cleanup: > inner2ZipFS?.close() > innerZipFS?.close() > outerZipFS?.close() > where: > scenario | targetFS > 'on disk' |
[jira] [Created] (GROOVY-11293) Error "BUG! At this point argument array length and parameter array length should be the same"
Alexander Kriegisch created GROOVY-11293: Summary: Error "BUG! At this point argument array length and parameter array length should be the same" Key: GROOVY-11293 URL: https://issues.apache.org/jira/browse/GROOVY-11293 Project: Groovy Issue Type: Bug Affects Versions: 4.0.18, 4.0.16, 4.0.4 Reporter: Alexander Kriegisch When I compile and run this Spock 2.3-groovy-4.0 test on JDK 17 (build target 8), it works fine: {code:groovy} import com.github.marschall.memoryfilesystem.MemoryFileSystemBuilder import com.google.common.jimfs.Configuration import com.google.common.jimfs.Jimfs import spock.lang.Specification import spock.lang.Unroll import java.nio.file.FileSystems import java.nio.file.Files @Grab('com.google.jimfs:jimfs:1.3.0') @Grab('com.github.marschall:memoryfilesystem:2.8.0') class NestedZipTest extends Specification { @Unroll('#scenario') def 'create nested zip file'() { given: 'a text file on the default FS' def sourceFS = MemoryFileSystemBuilder.newEmpty().build() def rootTxtPath = sourceFS.getPath('root.txt') Files.write(rootTxtPath, 'Hello root!'.bytes) when: 'creating a zip FS on the target FS, adding two text files' def outerZipPath = targetFS.getPath('outer.zip') if (Files.exists(outerZipPath)) Files.delete(outerZipPath) def outerZipFS = FileSystems.newFileSystem(outerZipPath, [create: 'true']) Files.write(outerZipFS.getPath('outer.txt'), 'Hello outer!'.bytes) Files.copy(rootTxtPath, outerZipFS.getPath('from-root.txt')) and: 'creating a zip FS inside the outer zip file, adding two text files' def innerZipPath = outerZipFS.getPath('inner.zip') def innerZipFS = FileSystems.newFileSystem(innerZipPath, [create: 'true']) Files.write(innerZipFS.getPath('inner.txt'), 'Hello inner!'.bytes) Files.copy(rootTxtPath, innerZipFS.getPath('from-root.txt')) and: 'creating a zip FS inside the inner zip file, adding two text files' def inner2ZipPath = innerZipFS.getPath('inner2.zip') def inner2ZipFS = FileSystems.newFileSystem(inner2ZipPath, [create: 'true']) Files.write(inner2ZipFS.getPath('inner2.txt'), 'Hello inner2!'.bytes) Files.copy(rootTxtPath, inner2ZipFS.getPath('from-root.txt')) then: 'no errors occur' noExceptionThrown() cleanup: inner2ZipFS?.close() innerZipFS?.close() outerZipFS?.close() where: scenario | targetFS 'on disk' | FileSystems.default 'JimFS'| Jimfs.newFileSystem(Configuration.unix().toBuilder().setWorkingDirectory('/').build()) 'MemoryFileSystem' | MemoryFileSystemBuilder.newEmpty().build() } } {code} Try it in the [Groovy Web Console|https://gwc-experiment.appspot.com/?g=groovy_4_0=eNqdVVFv0zAQfs-vOMSDU2kYCC-oEmICNhASCKlDSCAeXOeSenPsyHZoC-y_4zhpnXSZ1tKHyD3ffXffd9adqGptHHBd0VK4VbOkFTOWr5iUtMJKm20hJNqtdVjRT8Fw6Q2LYHjTCJmjScQAROtSIvXHSit6LarC0rdaFaJsDHNCq4ecP7bfnZOtNb-hkqmSLmrkohB8BDK4_6qMljLZ3VyzX4wqoWlbPo0l2_sdbJKcvzdsmZJBbaGoefd9Tl_QZ2Q28jrQbH6o2TyjL0MQl8xa-IzemH8X9ZU_AG4cqtzCiBv8SQDOOzopeWw5KmaE9hAAORZAuEHmEFSAgt-ihjYdSWchEqAUv1DNgTBwPkG4BA_rVtjGs0Y6uFyQ4NriWd0YjpcLeAX39JcqXF9UtdumM7psTelsH220dlcb94W5lQfYYdESgykl7T11G0e6kKAzXRvhMB2EngH5gFLqAPeI0OXWoZ0lIWS9CmwCa6FKYIGyr7fn5Jjx2bzhDFietx5urSN1G5nqxqHx2vfFdoHDYoMD9fB9taKAtKsYN8I6mw4RZp3PjlOOEj2pkcedzEHlwWNslY1_R8Fn8KNrtOfuTIPk510FI-whh6D4XtVgi7JGGK7r7bgPU5CF0dWT2Mi-L0zlk20RyoocQ2sC2P6FPtgfodSwP1OlBJdBh4ZhD4g7RD9G3Ah7mH4sbrAdJ-4U5H-LG8BOFDeL6t5LL5uSNztS3-xUgbPpEiYkzk7QODtKZNdNFqUBjdHGgua8MZ1kSl9sONbtQL5aGb1WaR_EJTLV1PNuQMRkrymX2mI_GqO6Y3t809G-m3IGO9DdxIf4-7sfVsGD-NGXC3tDhh7DzvRzvnP2G9XPexjBhS170MDRmqaNEhs_753ul4A_W3TftLnxr-ydMMid3xUpeUr2S6GjSA63CPH5Ttost8lt8g9XIuDH]. You can also comment out the test iterations for JimFS and MemoryFileSystem in the {{where}} blocks, if you want to test without external dependencies. When running the same code on JDK 8, there is a {{MissingMethodException}}, which is fine, because some JDK API I am calling only exists since JDK 13. I.e., I expect the {{MissingMethodException}} on JDKs 8-12 and a working test on 13+. What happens instead is that on JDKs 9-16, I see: *"BUG! At this point argument array length and parameter array length should be the same"* Because of this message coming from Groovy directly, I am opening a bug here first, not in the Spock project. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (GROOVY-11292) Class without sealed parent cannot be non-sealed
[ https://issues.apache.org/jira/browse/GROOVY-11292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17808935#comment-17808935 ] ASF GitHub Bot commented on GROOVY-11292: - codecov-commenter commented on PR #2037: URL: https://github.com/apache/groovy/pull/2037#issuecomment-1902171856 ## [Codecov](https://app.codecov.io/gh/apache/groovy/pull/2037?src=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache) Report Attention: `2 lines` in your changes are missing coverage. Please review. > Comparison is base [(`ed9204d`)](https://app.codecov.io/gh/apache/groovy/commit/ed9204dc37cce76f6d099e59608a5e9aa0ac5e33?el=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache) 68.5466% compared to head [(`a6adcfc`)](https://app.codecov.io/gh/apache/groovy/pull/2037?src=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache) 68.5522%. > :exclamation: Current head a6adcfc differs from pull request most recent head cd4c71f. Consider uploading reports for the commit cd4c71f to get more accurate results Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/apache/groovy/pull/2037/graphs/tree.svg?width=650=150=pr=1r45138NfQ_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)](https://app.codecov.io/gh/apache/groovy/pull/2037?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache) ```diff @@Coverage Diff @@ ## master #2037+/- ## == + Coverage 68.5466% 68.5522% +0.0057% - Complexity 29118 29131+13 == Files1422 1422 Lines 113482 113493+11 Branches19521 19526 +5 == + Hits77788 77802+14 + Misses 29157 29155 -2 + Partials 6537 6536 -1 ``` | [Files](https://app.codecov.io/gh/apache/groovy/pull/2037?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache) | Coverage Δ | | |---|---|---| | [...ehaus/groovy/classgen/ClassCompletionVerifier.java](https://app.codecov.io/gh/apache/groovy/pull/2037?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL0NsYXNzQ29tcGxldGlvblZlcmlmaWVyLmphdmE=) | `85.3448% <100.%> (ø)` | | | [...c/main/java/org/codehaus/groovy/ast/ClassNode.java](https://app.codecov.io/gh/apache/groovy/pull/2037?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2FzdC9DbGFzc05vZGUuamF2YQ==) | `87.5969% <80.%> (-0.0593%)` | :arrow_down: | | [...aus/groovy/ast/decompiled/DecompiledClassNode.java](https://app.codecov.io/gh/apache/groovy/pull/2037?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2FzdC9kZWNvbXBpbGVkL0RlY29tcGlsZWRDbGFzc05vZGUuamF2YQ==) | `88.7755% <83.%> (-0.3549%)` | :arrow_down: | ... and [6 files with indirect coverage changes](https://app.codecov.io/gh/apache/groovy/pull/2037/indirect-changes?src=pr=tree-more_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache) > Class without sealed parent cannot be non-sealed > > > Key: GROOVY-11292 > URL: https://issues.apache.org/jira/browse/GROOVY-11292 > Project: Groovy > Issue Type: Bug >Reporter: Daniel Sun >Priority: Major > > "cannot be non-sealed as it has no sealed parent" is emitted by Groovy > compiler and just emitted when using Java 21, because Java 21 declares > \{{java.lang.ref.Reference}} \{{sealed}}. > {code:java} > startup failed: > /home/daniel/IdeaProjects/groovy/src/test/org/codehaus/groovy/util/ReferenceManagerTest.groovy: > 147: The class 'org.codehaus.groovy.util.ReferenceManagerTest$TestReference' > cannot be non-sealed as it has no sealed parent. > @ line 147, column 13. >private class TestReference >^ > 1 error > > Task :compileTestGroovy FAILED > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)
Re: [PR] GROOVY-11292: Class without sealed parent cannot be non-sealed [groovy]
codecov-commenter commented on PR #2037: URL: https://github.com/apache/groovy/pull/2037#issuecomment-1902171856 ## [Codecov](https://app.codecov.io/gh/apache/groovy/pull/2037?src=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache) Report Attention: `2 lines` in your changes are missing coverage. Please review. > Comparison is base [(`ed9204d`)](https://app.codecov.io/gh/apache/groovy/commit/ed9204dc37cce76f6d099e59608a5e9aa0ac5e33?el=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache) 68.5466% compared to head [(`a6adcfc`)](https://app.codecov.io/gh/apache/groovy/pull/2037?src=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache) 68.5522%. > :exclamation: Current head a6adcfc differs from pull request most recent head cd4c71f. Consider uploading reports for the commit cd4c71f to get more accurate results Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/apache/groovy/pull/2037/graphs/tree.svg?width=650=150=pr=1r45138NfQ_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)](https://app.codecov.io/gh/apache/groovy/pull/2037?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache) ```diff @@Coverage Diff @@ ## master #2037+/- ## == + Coverage 68.5466% 68.5522% +0.0057% - Complexity 29118 29131+13 == Files1422 1422 Lines 113482 113493+11 Branches19521 19526 +5 == + Hits77788 77802+14 + Misses 29157 29155 -2 + Partials 6537 6536 -1 ``` | [Files](https://app.codecov.io/gh/apache/groovy/pull/2037?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache) | Coverage Δ | | |---|---|---| | [...ehaus/groovy/classgen/ClassCompletionVerifier.java](https://app.codecov.io/gh/apache/groovy/pull/2037?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL0NsYXNzQ29tcGxldGlvblZlcmlmaWVyLmphdmE=) | `85.3448% <100.%> (ø)` | | | [...c/main/java/org/codehaus/groovy/ast/ClassNode.java](https://app.codecov.io/gh/apache/groovy/pull/2037?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2FzdC9DbGFzc05vZGUuamF2YQ==) | `87.5969% <80.%> (-0.0593%)` | :arrow_down: | | [...aus/groovy/ast/decompiled/DecompiledClassNode.java](https://app.codecov.io/gh/apache/groovy/pull/2037?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2FzdC9kZWNvbXBpbGVkL0RlY29tcGlsZWRDbGFzc05vZGUuamF2YQ==) | `88.7755% <83.%> (-0.3549%)` | :arrow_down: | ... and [6 files with indirect coverage changes](https://app.codecov.io/gh/apache/groovy/pull/2037/indirect-changes?src=pr=tree-more_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@groovy.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Commented] (GROOVY-11292) Class without sealed parent cannot be non-sealed
[ https://issues.apache.org/jira/browse/GROOVY-11292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17808933#comment-17808933 ] ASF GitHub Bot commented on GROOVY-11292: - daniellansun opened a new pull request, #2037: URL: https://github.com/apache/groovy/pull/2037 https://issues.apache.org/jira/browse/GROOVY-11292 > Class without sealed parent cannot be non-sealed > > > Key: GROOVY-11292 > URL: https://issues.apache.org/jira/browse/GROOVY-11292 > Project: Groovy > Issue Type: Bug >Reporter: Daniel Sun >Priority: Major > > "cannot be non-sealed as it has no sealed parent" is emitted by Groovy > compiler and just emitted when using Java 21, because Java 21 declares > \{{java.lang.ref.Reference}} \{{sealed}}. > {code:java} > startup failed: > /home/daniel/IdeaProjects/groovy/src/test/org/codehaus/groovy/util/ReferenceManagerTest.groovy: > 147: The class 'org.codehaus.groovy.util.ReferenceManagerTest$TestReference' > cannot be non-sealed as it has no sealed parent. > @ line 147, column 13. >private class TestReference >^ > 1 error > > Task :compileTestGroovy FAILED > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Updated] (GROOVY-11292) Class without sealed parent cannot be non-sealed
[ https://issues.apache.org/jira/browse/GROOVY-11292?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun updated GROOVY-11292: Issue Type: Bug (was: Improvement) > Class without sealed parent cannot be non-sealed > > > Key: GROOVY-11292 > URL: https://issues.apache.org/jira/browse/GROOVY-11292 > Project: Groovy > Issue Type: Bug >Reporter: Daniel Sun >Priority: Major > > "cannot be non-sealed as it has no sealed parent" is emitted by Groovy > compiler and just emitted when using Java 21, because Java 21 declares > \{{java.lang.ref.Reference}} \{{sealed}}. > {code:java} > startup failed: > /home/daniel/IdeaProjects/groovy/src/test/org/codehaus/groovy/util/ReferenceManagerTest.groovy: > 147: The class 'org.codehaus.groovy.util.ReferenceManagerTest$TestReference' > cannot be non-sealed as it has no sealed parent. > @ line 147, column 13. >private class TestReference >^ > 1 error > > Task :compileTestGroovy FAILED > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Updated] (GROOVY-11292) Class without sealed parent cannot be non-sealed
[ https://issues.apache.org/jira/browse/GROOVY-11292?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun updated GROOVY-11292: Description: "cannot be non-sealed as it has no sealed parent" is emitted by Groovy compiler and just emitted when using Java 21, because Java 21 declares \{{java.lang.ref.Reference}} \{{sealed}}. {code:java} startup failed: /home/daniel/IdeaProjects/groovy/src/test/org/codehaus/groovy/util/ReferenceManagerTest.groovy: 147: The class 'org.codehaus.groovy.util.ReferenceManagerTest$TestReference' cannot be non-sealed as it has no sealed parent. @ line 147, column 13. private class TestReference ^ 1 error > Task :compileTestGroovy FAILED {code} was: "cannot be non-sealed as it has no sealed parent" is emitted by Groovy compiler and just emitted when using Java 21+ {code:java} startup failed: /home/daniel/IdeaProjects/groovy/src/test/org/codehaus/groovy/util/ReferenceManagerTest.groovy: 147: The class 'org.codehaus.groovy.util.ReferenceManagerTest$TestReference' cannot be non-sealed as it has no sealed parent. @ line 147, column 13. private class TestReference ^ 1 error > Task :compileTestGroovy FAILED {code} > Class without sealed parent cannot be non-sealed > > > Key: GROOVY-11292 > URL: https://issues.apache.org/jira/browse/GROOVY-11292 > Project: Groovy > Issue Type: Improvement >Reporter: Daniel Sun >Priority: Major > > "cannot be non-sealed as it has no sealed parent" is emitted by Groovy > compiler and just emitted when using Java 21, because Java 21 declares > \{{java.lang.ref.Reference}} \{{sealed}}. > {code:java} > startup failed: > /home/daniel/IdeaProjects/groovy/src/test/org/codehaus/groovy/util/ReferenceManagerTest.groovy: > 147: The class 'org.codehaus.groovy.util.ReferenceManagerTest$TestReference' > cannot be non-sealed as it has no sealed parent. > @ line 147, column 13. >private class TestReference >^ > 1 error > > Task :compileTestGroovy FAILED > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Updated] (GROOVY-11292) Class without sealed parent cannot be non-sealed
[ https://issues.apache.org/jira/browse/GROOVY-11292?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun updated GROOVY-11292: Description: "cannot be non-sealed as it has no sealed parent" is emitted by Groovy compiler and just emitted when using Java 21+ {code:java} startup failed: /home/daniel/IdeaProjects/groovy/src/test/org/codehaus/groovy/util/ReferenceManagerTest.groovy: 147: The class 'org.codehaus.groovy.util.ReferenceManagerTest$TestReference' cannot be non-sealed as it has no sealed parent. @ line 147, column 13. private class TestReference ^ 1 error > Task :compileTestGroovy FAILED {code} was: Java 21 has more strict check for {{non-sealed}} classes, i.e. class cannot be non-sealed if it has no sealed parent. We have to align with check rule of Java 21, and declare class {{non-sealed}} by default if and only if it has {{sealed}} parent. Before the proposed improvement, {{TestReference}} will be declared {{non-sealed}} by default, but its parent {{SoftReference}} is {{non-sealed}} and {{SoftReference}}'s parent {{Reference}} is {{sealed}}, so Java 21 will emit the following error: {code:java} startup failed: /home/daniel/IdeaProjects/groovy/src/test/org/codehaus/groovy/util/ReferenceManagerTest.groovy: 147: The class 'org.codehaus.groovy.util.ReferenceManagerTest$TestReference' cannot be non-sealed as it has no sealed parent. @ line 147, column 13. private class TestReference ^ 1 error > Task :compileTestGroovy FAILED {code} > Class without sealed parent cannot be non-sealed > > > Key: GROOVY-11292 > URL: https://issues.apache.org/jira/browse/GROOVY-11292 > Project: Groovy > Issue Type: Improvement >Reporter: Daniel Sun >Priority: Major > > "cannot be non-sealed as it has no sealed parent" is emitted by Groovy > compiler and just emitted when using Java 21+ > {code:java} > startup failed: > /home/daniel/IdeaProjects/groovy/src/test/org/codehaus/groovy/util/ReferenceManagerTest.groovy: > 147: The class 'org.codehaus.groovy.util.ReferenceManagerTest$TestReference' > cannot be non-sealed as it has no sealed parent. > @ line 147, column 13. >private class TestReference >^ > 1 error > > Task :compileTestGroovy FAILED > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Created] (GROOVY-11292) Class without sealed parent cannot be non-sealed
Daniel Sun created GROOVY-11292: --- Summary: Class without sealed parent cannot be non-sealed Key: GROOVY-11292 URL: https://issues.apache.org/jira/browse/GROOVY-11292 Project: Groovy Issue Type: Improvement Reporter: Daniel Sun Java 21 has more strict check for {{non-sealed}} classes, i.e. class cannot be non-sealed if it has no sealed parent. We have to align with check rule of Java 21, and declare class {{non-sealed}} by default if and only if it has {{sealed}} parent. Before the proposed improvement, {{TestReference}} will be declared {{non-sealed}} by default, but its parent {{SoftReference}} is {{non-sealed}} and {{SoftReference}}'s parent {{Reference}} is {{sealed}}, so Java 21 will emit the following error: {code:java} startup failed: /home/daniel/IdeaProjects/groovy/src/test/org/codehaus/groovy/util/ReferenceManagerTest.groovy: 147: The class 'org.codehaus.groovy.util.ReferenceManagerTest$TestReference' cannot be non-sealed as it has no sealed parent. @ line 147, column 13. private class TestReference ^ 1 error > Task :compileTestGroovy FAILED {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)