You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@groovy.apache.org by Mirco Colletta <mi...@gmail.com> on 2025/05/03 14:55:01 UTC
non-sealed error
Hi all,
I've encountered this strange error from groovy STC (4.0.26) moving from
JavaFx 23 to JavaFx 24 (and jdk 24)
"...ResizableRegion cannot be non-sealed as it has no sealed parent"
but my class does not use explicitly a non-sealed keyword
"""
import javafx.scene.layout.Region
...
class ResizableRegion extends Region {...}
"""
this is the hierarchy of the Region class:
javafx.scene.Node *(sealed from jfx24)*
javafx.scene.Parent *(non-sealed from jfx24)*
javafx.scene.layout.Region
I'm a little confused, it seems that groovy applies automatically a wrong
"non-sealed" to my class but I don't know why.
Any idea or possible workarounds?
Thanks in advance,
Mirco
Re: non-sealed error
Posted by Daniel Sun <su...@apache.org>.
Please create a JIRA ticket to track the issue.
Cheers,
Daniel Sun
On 2025/05/10 14:39:44 Mirco Colletta wrote:
> Hi Paul,
> I've tried with the 5.0.0-alpha12 but unfortunately I get the same error :-(
> The ony difference is that the error this time came in a class definition
> deeper in the hierarchy:
>
> javafx.scene.Node (sealed from jfx24)
> javafx.scene.Parent (non-sealed from jfx24)
> javafx.scene.layout.Region
> ResizableRegion extends Region (my class, error with 4.x)
> ControllerEditor extends ResizableRegion(my class, error with 5.x)
>
> Forgive me but I don't know how to include the latest groovy snapshot
> versions, I use the maven artifacts with gradle.
>
> Thanks,
> Mirco
>
> Il Mar 6 Mag 2025, 13:52 Paul King <pa...@asert.com.au> ha scritto:
>
> > Hi Mirco,
> >
> > I have seen this recently too on JDK24 and thought we had fixed it,
> > but I can't see it tracked explicitly in Jira or in recent commit
> > messages.
> >
> > If you can check against 4.0.27-SNAPSHOT or 5.0.0-SNAPSHOT, that would
> > be great. I'll keep looking in the meantime.
> >
> > Cheers, Paul.
> >
> > On Sun, May 4, 2025 at 12:55 AM Mirco Colletta <mi...@gmail.com> wrote:
> > >
> > > Hi all,
> > > I've encountered this strange error from groovy STC (4.0.26) moving from
> > JavaFx 23 to JavaFx 24 (and jdk 24)
> > >
> > > "...ResizableRegion cannot be non-sealed as it has no sealed parent"
> > >
> > > but my class does not use explicitly a non-sealed keyword
> > > """
> > > import javafx.scene.layout.Region
> > > ...
> > > class ResizableRegion extends Region {...}
> > > """
> > >
> > > this is the hierarchy of the Region class:
> > > javafx.scene.Node (sealed from jfx24)
> > > javafx.scene.Parent (non-sealed from jfx24)
> > > javafx.scene.layout.Region
> > >
> > > I'm a little confused, it seems that groovy applies automatically a
> > wrong "non-sealed" to my class but I don't know why.
> > >
> > > Any idea or possible workarounds?
> > >
> > > Thanks in advance,
> > > Mirco
> > >
> >
>
Re: non-sealed error
Posted by Mirco Colletta <mi...@gmail.com>.
Hi Paul,
I've tried with the 5.0.0-alpha12 but unfortunately I get the same error :-(
The ony difference is that the error this time came in a class definition
deeper in the hierarchy:
javafx.scene.Node (sealed from jfx24)
javafx.scene.Parent (non-sealed from jfx24)
javafx.scene.layout.Region
ResizableRegion extends Region (my class, error with 4.x)
ControllerEditor extends ResizableRegion(my class, error with 5.x)
Forgive me but I don't know how to include the latest groovy snapshot
versions, I use the maven artifacts with gradle.
Thanks,
Mirco
Il Mar 6 Mag 2025, 13:52 Paul King <pa...@asert.com.au> ha scritto:
> Hi Mirco,
>
> I have seen this recently too on JDK24 and thought we had fixed it,
> but I can't see it tracked explicitly in Jira or in recent commit
> messages.
>
> If you can check against 4.0.27-SNAPSHOT or 5.0.0-SNAPSHOT, that would
> be great. I'll keep looking in the meantime.
>
> Cheers, Paul.
>
> On Sun, May 4, 2025 at 12:55 AM Mirco Colletta <mi...@gmail.com> wrote:
> >
> > Hi all,
> > I've encountered this strange error from groovy STC (4.0.26) moving from
> JavaFx 23 to JavaFx 24 (and jdk 24)
> >
> > "...ResizableRegion cannot be non-sealed as it has no sealed parent"
> >
> > but my class does not use explicitly a non-sealed keyword
> > """
> > import javafx.scene.layout.Region
> > ...
> > class ResizableRegion extends Region {...}
> > """
> >
> > this is the hierarchy of the Region class:
> > javafx.scene.Node (sealed from jfx24)
> > javafx.scene.Parent (non-sealed from jfx24)
> > javafx.scene.layout.Region
> >
> > I'm a little confused, it seems that groovy applies automatically a
> wrong "non-sealed" to my class but I don't know why.
> >
> > Any idea or possible workarounds?
> >
> > Thanks in advance,
> > Mirco
> >
>
Re: non-sealed error
Posted by Mirco Colletta <mi...@gmail.com>.
Hi Paul,
thank you.
In the meantime I made a text search for "non-seal" inside the groovy repo
and found among the results this interesting flle:
https://github.com/apache/groovy/blob/master/src/test/groovy/bugs/Groovy11292.groovy
It seems that this test is very similar to my case with the current JavaFx
24 class hierarchy.
So maybe the problem is solved on the main branch but not yet ported to the
current 4.x release?
Thanks again
Mirco
Il Mar 6 Mag 2025, 13:52 Paul King <pa...@asert.com.au> ha scritto:
> Hi Mirco,
>
> I have seen this recently too on JDK24 and thought we had fixed it,
> but I can't see it tracked explicitly in Jira or in recent commit
> messages.
>
> If you can check against 4.0.27-SNAPSHOT or 5.0.0-SNAPSHOT, that would
> be great. I'll keep looking in the meantime.
>
> Cheers, Paul.
>
> On Sun, May 4, 2025 at 12:55 AM Mirco Colletta <mi...@gmail.com> wrote:
> >
> > Hi all,
> > I've encountered this strange error from groovy STC (4.0.26) moving from
> JavaFx 23 to JavaFx 24 (and jdk 24)
> >
> > "...ResizableRegion cannot be non-sealed as it has no sealed parent"
> >
> > but my class does not use explicitly a non-sealed keyword
> > """
> > import javafx.scene.layout.Region
> > ...
> > class ResizableRegion extends Region {...}
> > """
> >
> > this is the hierarchy of the Region class:
> > javafx.scene.Node (sealed from jfx24)
> > javafx.scene.Parent (non-sealed from jfx24)
> > javafx.scene.layout.Region
> >
> > I'm a little confused, it seems that groovy applies automatically a
> wrong "non-sealed" to my class but I don't know why.
> >
> > Any idea or possible workarounds?
> >
> > Thanks in advance,
> > Mirco
> >
>
Re: non-sealed error
Posted by Paul King <pa...@asert.com.au>.
Hi Mirco,
I have seen this recently too on JDK24 and thought we had fixed it,
but I can't see it tracked explicitly in Jira or in recent commit
messages.
If you can check against 4.0.27-SNAPSHOT or 5.0.0-SNAPSHOT, that would
be great. I'll keep looking in the meantime.
Cheers, Paul.
On Sun, May 4, 2025 at 12:55 AM Mirco Colletta <mi...@gmail.com> wrote:
>
> Hi all,
> I've encountered this strange error from groovy STC (4.0.26) moving from JavaFx 23 to JavaFx 24 (and jdk 24)
>
> "...ResizableRegion cannot be non-sealed as it has no sealed parent"
>
> but my class does not use explicitly a non-sealed keyword
> """
> import javafx.scene.layout.Region
> ...
> class ResizableRegion extends Region {...}
> """
>
> this is the hierarchy of the Region class:
> javafx.scene.Node (sealed from jfx24)
> javafx.scene.Parent (non-sealed from jfx24)
> javafx.scene.layout.Region
>
> I'm a little confused, it seems that groovy applies automatically a wrong "non-sealed" to my class but I don't know why.
>
> Any idea or possible workarounds?
>
> Thanks in advance,
> Mirco
>