[ 
https://issues.apache.org/jira/browse/GERONIMO-6692?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16760812#comment-16760812
 ] 

Romain Manni-Bucau commented on GERONIMO-6692:
----------------------------------------------

[~jmeen] should be fine now since we lazily initialize the components model

> OpenAPI SchemaProcessor causes a StackOverflowException when processing 
> schema for a class field that reference's it's own class
> --------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: GERONIMO-6692
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-6692
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>    Affects Versions: OpenAPI_1.0.5
>            Reporter: James Meen
>            Assignee: Romain Manni-Bucau
>            Priority: Major
>             Fix For: OpenAPI_1.0.6
>
>
> A webapp being scanned by SchemaProcessor class of the Geronimo OpenAPI 
> extension has a field that references the class it is a part of, for 
> example...
> {code:java}
> public class aClass 
> { 
> ... 
>   public List<aClass> getAList() { ... }
> ... 
> }
> {code}
> There is no check in OpenAPI SchemaProcessor for this and it eventually 
> causes a StackOverflowException.
> I doubt this issue is limited to List and will probably also happen if the 
> field type is singular of the same parent class.
> The front-end exception the user sees is completely unrelated to the real 
> exception.  This causes a great amount of debugging time stepping through to 
> determine the root cause for a relatively large application.
> Propose to somehow either support this when mapping to an OpenAPI model.
> Also, failing the possibility of a solution as above, this case should be 
> detected by the schema processor and handled accordingly either skipping the 
> field and/or raising a suitable warning/exception in a way that the user 
> knows what/why it is failing or excluded (ultimately to save the user having 
> to debug through the schema processing).  A stackoverflow should not happen.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to