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

Summary: Recursive @Model definitions cause StackOverFlowError
Product: platform Reporter: Jaroslav Tulach <jtulach>
Component: Html4jAssignee: Jaroslav Tulach <jtulach>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P3    
Version: 8.2   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 268314    

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