From dev-return-3290-apmail-johnzon-dev-archive=johnzon.apache.org@johnzon.apache.org Sun Jul 19 04:47:06 2020 Return-Path: X-Original-To: apmail-johnzon-dev-archive@www.apache.org Delivered-To: apmail-johnzon-dev-archive@www.apache.org Received: from mailroute1-lw-us.apache.org (mailroute1-lw-us.apache.org [207.244.88.153]) by minotaur.apache.org (Postfix) with ESMTP id 5FD4F190BA for ; Sun, 19 Jul 2020 04:47:06 +0000 (UTC) Received: from mail.apache.org (localhost [127.0.0.1]) by mailroute1-lw-us.apache.org (ASF Mail Server at mailroute1-lw-us.apache.org) with SMTP id 07702123FC3 for ; Sun, 19 Jul 2020 04:47:05 +0000 (UTC) Received: (qmail 89160 invoked by uid 500); 19 Jul 2020 04:47:05 -0000 Delivered-To: apmail-johnzon-dev-archive@johnzon.apache.org Received: (qmail 89129 invoked by uid 500); 19 Jul 2020 04:47:05 -0000 Mailing-List: contact dev-help@johnzon.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@johnzon.apache.org Delivered-To: mailing list dev@johnzon.apache.org Received: (qmail 89109 invoked by uid 99); 19 Jul 2020 04:47:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 19 Jul 2020 04:47:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 3E9FF1A40E8 for ; Sun, 19 Jul 2020 04:47:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -112.191 X-Spam-Level: X-Spam-Status: No, score=-112.191 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, KAM_DMARC_STATUS=0.01, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-ec2-va.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id GskAjtrUH62D for ; Sun, 19 Jul 2020 04:47:02 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=207.244.88.153; helo=mailroute1-lw-us.apache.org; envelope-from=jira@apache.org; receiver= Received: from mailroute1-lw-us.apache.org (mailroute1-lw-us.apache.org [207.244.88.153]) by mx1-ec2-va.apache.org (ASF Mail Server at mx1-ec2-va.apache.org) with ESMTPS id 07C2ABB929 for ; Sun, 19 Jul 2020 04:47:01 +0000 (UTC) Received: from mail.apache.org (localhost [127.0.0.1]) by mailroute1-lw-us.apache.org (ASF Mail Server at mailroute1-lw-us.apache.org) with SMTP id C8304123F7D for ; Sun, 19 Jul 2020 04:47:01 +0000 (UTC) Received: (qmail 89097 invoked by uid 99); 19 Jul 2020 04:47:01 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 19 Jul 2020 04:47:01 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id D163840A55 for ; Sun, 19 Jul 2020 04:47:00 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id 3A900780253 for ; Sun, 19 Jul 2020 04:47:00 +0000 (UTC) Date: Sun, 19 Jul 2020 04:47:00 +0000 (UTC) From: "Romain Manni-Bucau (Jira)" To: dev@johnzon.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (JOHNZON-319) Properties regarding Json reader/generator ignored if no JsonProvider is set 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/JOHNZON-319?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D171= 60580#comment-17160580 ]=20 Romain Manni-Bucau commented on JOHNZON-319: -------------------------------------------- Hi Markus, Think there is no setter for that so it does not have to be set but it soun= ds doable. Case it must not be done is whzn an instance is peovided (indeed= ). In terms of consistency we tend to alias properties in the builder so we ca= n maybe extend that pattern to avoid error/logs when jsonp is not johnzon (= we must not bind any properties by default if specific). =C2=A0 Wdyt? =C2=A0 =C2=A0 > Properties regarding Json reader/generator ignored if no JsonProvider is = set > -------------------------------------------------------------------------= --- > > Key: JOHNZON-319 > URL: https://issues.apache.org/jira/browse/JOHNZON-319 > Project: Johnzon > Issue Type: Bug > Components: JSON-B > Affects Versions: 1.2.8 > Reporter: Markus Jung > Priority: Minor > Attachments: ignored-property.zip > > > JohnzonBuilder ignores properties which shouid affect the Json reader/gen= erator if no JsonProvider has been set. I noticed this using the "org.apach= e.johnzon.max-string-length" property. > JohnzonBuilder#build() looks somewhat like this behaviour is intended, bu= t a property just being ignored feels unintuitive. I'd be sending you a PR = for this, but I dont know this project well enough to decide whether or not= always initializing the generator/reader factories to ensure set propertie= s are being respected is a good idea. Maybe somebody could hint me in the r= ight direction there? > I attached an example project that demonstrates this issue, the first cal= l to Jsonb#fromJson(String, Class) should already be throwing a JsonParsing= Exception. -- This message was sent by Atlassian Jira (v8.3.4#803005)