[
https://issues.apache.org/jira/browse/GROOVY-10868?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Henrique Mota updated GROOVY-10868:
-----------------------------------
Description:
I'm having a problem with versions after 3.0.10 when generics is used in return.
{code:java}
PostgreSQLContainer postgreSQLContainer = new
PostgreSQLContainer('postgres:13.4')
.withDatabaseName(POSTGRESQL_DB)
.withUsername(POSTGRESQL_USER)
.withPassword(POSTGRESQL_PASS)
.withReuse(!IS_JENKINS_BUILD)
.withTmpFs(['/var/lib/postgresql/data': 'rw']) as PostgreSQLContainer
{code}
{code:java}
TcIntegrationSpec.groovy: 34: [Static type checking] - Cannot find matching
method
org.testcontainers.containers.PostgreSQLContainer#withUsername(java.lang.String).
Please check if the declared type is correct and if the method exists.
@ line 34, column 17.
.withUsername(POSTGRESQL_USER)
^ {code}
!image-2022-12-13-09-09-35-876.png!
I believe the problem is related to
https://issues.apache.org/jira/browse/GROOVY-10054
was:
I'm having a problem with versions after 3.0.10 when generics is used in return.
{code:java}
PostgreSQLContainer postgreSQLContainer = new
PostgreSQLContainer('postgres:13.4')
.withDatabaseName(POSTGRESQL_DB)
.withUsername(POSTGRESQL_USER)
.withPassword(POSTGRESQL_PASS)
.withReuse(!IS_JENKINS_BUILD)
.withTmpFs(['/var/lib/postgresql/data': 'rw']) as PostgreSQLContainer
{code}
{code:java}
TcIntegrationSpec.groovy: 34: [Static type checking] - Cannot find matching
method
org.testcontainers.containers.PostgreSQLContainer#withUsername(java.lang.String).
Please check if the declared type is correct and if the method exists.
@ line 34, column 17.
.withUsername(POSTGRESQL_USER)
^ {code}
!image-2022-12-13-09-09-35-876.png!
I believe the problem is related to a problem
https://issues.apache.org/jira/browse/GROOVY-10054
> Cannot find matching method when using generics
> -----------------------------------------------
>
> Key: GROOVY-10868
> URL: https://issues.apache.org/jira/browse/GROOVY-10868
> Project: Groovy
> Issue Type: Improvement
> Components: Static Type Checker
> Affects Versions: 3.0.11, 3.0.12, 3.0.13
> Reporter: Henrique Mota
> Priority: Major
> Attachments: image-2022-12-13-09-09-35-876.png
>
>
> I'm having a problem with versions after 3.0.10 when generics is used in
> return.
> {code:java}
> PostgreSQLContainer postgreSQLContainer = new
> PostgreSQLContainer('postgres:13.4')
> .withDatabaseName(POSTGRESQL_DB)
> .withUsername(POSTGRESQL_USER)
> .withPassword(POSTGRESQL_PASS)
> .withReuse(!IS_JENKINS_BUILD)
> .withTmpFs(['/var/lib/postgresql/data': 'rw']) as PostgreSQLContainer
> {code}
> {code:java}
> TcIntegrationSpec.groovy: 34: [Static type checking] - Cannot find matching
> method
> org.testcontainers.containers.PostgreSQLContainer#withUsername(java.lang.String).
> Please check if the declared type is correct and if the method exists.
> @ line 34, column 17.
> .withUsername(POSTGRESQL_USER)
> ^ {code}
> !image-2022-12-13-09-09-35-876.png!
> I believe the problem is related to
> https://issues.apache.org/jira/browse/GROOVY-10054
--
This message was sent by Atlassian Jira
(v8.20.10#820010)