This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 257348 - Recursive @Model definitions cause StackOverFlowError
Summary: Recursive @Model definitions cause StackOverFlowError
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Html4j (show other bugs)
Version: 8.2
Hardware: PC Linux
: P3 normal (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
Depends on:
Blocks: 268314
  Show dependency tree
 
Reported: 2015-12-31 07:11 UTC by Jaroslav Tulach
Modified: 2016-10-03 04:30 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2015-12-31 07:11:59 UTC
I have an AST model:

@Model(className = "AST", properties = {
    @Property(name = "children", type = AST.class, array = true),
    @Property(name = "kind", type = SyntaxKind.class),
    @Property(name = "type", type = Type.class),
})
class ASTCntrl {
}

and it works OK, even if it references AST recursively. However, if I change:

    @Property(name = "type", type = AST.class),

I get stack overflow after calling "new AST()" as the constructor tries to initializes type = new AST().
Comment 1 Jaroslav Tulach 2015-12-31 07:20:55 UTC
Will be part of 1.3 version:
http://hg.netbeans.org/html4j/rev/3ef632633f36