[groovy] branch master updated: Fix failing build by workaround STC issue

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[groovy] branch master updated: Fix failing build by workaround STC issue

Daniel.Sun
This is an automated email from the ASF dual-hosted git repository.

sunlan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git


The following commit(s) were added to refs/heads/master by this push:
     new d540894  Fix failing build by workaround STC issue
d540894 is described below

commit d540894b3c647682ebd8a7adcd5068499f583b5c
Author: Daniel Sun <[hidden email]>
AuthorDate: Sun Jan 10 00:49:34 2021 +0800

    Fix failing build by workaround STC issue
   
    /home/travis/build/apache/groovy/subprojects/groovy-ginq/src/main/groovy/org/apache/groovy/ginq/provider/collection/runtime/AsciiTableMaker.groovy: 50: The argument is a method reference, but the parameter type is not a functional interface
     @ line 50, column 71.
       firstRecord).nameList.toArray(String[]::
                                     ^
    1 error
---
 .../groovy/ginq/provider/collection/runtime/AsciiTableMaker.groovy      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/subprojects/groovy-ginq/src/main/groovy/org/apache/groovy/ginq/provider/collection/runtime/AsciiTableMaker.groovy b/subprojects/groovy-ginq/src/main/groovy/org/apache/groovy/ginq/provider/collection/runtime/AsciiTableMaker.groovy
index 0c0fafc..e5dccb5 100644
--- a/subprojects/groovy-ginq/src/main/groovy/org/apache/groovy/ginq/provider/collection/runtime/AsciiTableMaker.groovy
+++ b/subprojects/groovy-ginq/src/main/groovy/org/apache/groovy/ginq/provider/collection/runtime/AsciiTableMaker.groovy
@@ -47,7 +47,7 @@ class AsciiTableMaker {
             List<String[]> list = new ArrayList<>(tableData.size() + 1)
             def firstRecord = tableData.get(0)
             if (firstRecord instanceof NamedRecord) {
-                list.add(((NamedRecord) firstRecord).nameList.toArray(String[]::new))
+                list.add(((NamedRecord) firstRecord).nameList as String[])
                 tableData.stream().forEach(e -> {
                     if (e instanceof NamedRecord) {
                         String[] record = ((List) e).stream().map(c -> c?.toString()).toArray(String[]::new)

Apache Groovy committer & PMC member

Blog: http://blog.sunlan.me
Twitter: @daniel_sun