From dev-return-99739-archive-asf-public=cust-asf.ponee.io@geronimo.apache.org Mon Feb 4 12:50:04 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id E1C78180651 for ; Mon, 4 Feb 2019 13:50:03 +0100 (CET) Received: (qmail 13439 invoked by uid 500); 4 Feb 2019 12:50:03 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 13425 invoked by uid 99); 4 Feb 2019 12:50:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Feb 2019 12:50:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 6CE6DC2747 for ; Mon, 4 Feb 2019 12:50:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.501 X-Spam-Level: X-Spam-Status: No, score=-109.501 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id AT_y8qgmBcxN for ; Mon, 4 Feb 2019 12:50:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 1B5685F41A for ; Mon, 4 Feb 2019 12:50:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 89643E2673 for ; Mon, 4 Feb 2019 12:50:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 20A4C243F9 for ; Mon, 4 Feb 2019 12:50:00 +0000 (UTC) Date: Mon, 4 Feb 2019 12:50:00 +0000 (UTC) From: "Romain Manni-Bucau (JIRA)" To: dev@geronimo.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Assigned] (GERONIMO-6692) OpenAPI SchemaProcessor causes a StackOverflowException when processing schema for a class field that reference's it's own class MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/GERONIMO-6692?page=3Dcom.atlas= sian.jira.plugin.system.issuetabpanels:all-tabpanel ] Romain Manni-Bucau reassigned GERONIMO-6692: -------------------------------------------- Assignee: Romain Manni-Bucau > OpenAPI SchemaProcessor causes a StackOverflowException when processing s= chema 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)=20 > Affects Versions: OpenAPI_1.0.5 > Reporter: James Meen > Assignee: Romain Manni-Bucau > Priority: Major > > A webapp being scanned by SchemaProcessor class of the Geronimo OpenAPI e= xtension has a field that references the class it is a part of, for example= ... > {code:java} > public class aClass=C2=A0 > {=C2=A0 > ...=C2=A0 > =C2=A0 public List=C2=A0getAList() {=C2=A0... } > ...=C2=A0 > } > {code} > There is no check in OpenAPI SchemaProcessor for this and it eventually c= auses a StackOverflowException. > I doubt this issue is limited to List and will probably also happen if th= e field type is singular of the same parent class. > The front-end exception the user sees is completely unrelated to the real= exception.=C2=A0 This causes a great amount of debugging time stepping thr= ough 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 t= he 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 havi= ng to debug through the schema processing).=C2=A0 A stackoverflow should no= t happen. -- This message was sent by Atlassian JIRA (v7.6.3#76005)