Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id A25FB200C81 for ; Fri, 26 May 2017 10:23:07 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id A0F5F160BC8; Fri, 26 May 2017 08:23:07 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E3F4B160BB8 for ; Fri, 26 May 2017 10:23:06 +0200 (CEST) Received: (qmail 21767 invoked by uid 500); 26 May 2017 08:23:06 -0000 Mailing-List: contact notifications-help@freemarker.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@freemarker.incubator.apache.org Delivered-To: mailing list notifications@freemarker.incubator.apache.org Received: (qmail 21757 invoked by uid 99); 26 May 2017 08:23:06 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 May 2017 08:23:06 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 9567C180600 for ; Fri, 26 May 2017 08:23:05 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -4.222 X-Spam-Level: X-Spam-Status: No, score=-4.222 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id qkpqw5o6XHYz for ; Fri, 26 May 2017 08:23:04 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with SMTP id 47C3F5F2FD for ; Fri, 26 May 2017 08:23:04 +0000 (UTC) Received: (qmail 21748 invoked by uid 99); 26 May 2017 08:23:03 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 May 2017 08:23:03 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id AE6E4DFC2E; Fri, 26 May 2017 08:23:03 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ddekany@apache.org To: notifications@freemarker.incubator.apache.org Message-Id: <2840771647c24bba8c687fb2ef166893@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: incubator-freemarker git commit: Configuration object builder expression: Slightly improved error message for something=NoSuchClass when the class name contains no dot Date: Fri, 26 May 2017 08:23:03 +0000 (UTC) archived-at: Fri, 26 May 2017 08:23:07 -0000 Repository: incubator-freemarker Updated Branches: refs/heads/2.3-gae 017e9f580 -> f0a6f4511 Configuration object builder expression: Slightly improved error message for something=NoSuchClass when the class name contains no dot Project: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/commit/f0a6f451 Tree: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/tree/f0a6f451 Diff: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/diff/f0a6f451 Branch: refs/heads/2.3-gae Commit: f0a6f4511e79d2e7aeb3d6ba5c7c2b12b96159b8 Parents: 017e9f5 Author: ddekany Authored: Fri May 26 10:22:25 2017 +0200 Committer: ddekany Committed: Fri May 26 10:22:25 2017 +0200 ---------------------------------------------------------------------- src/main/java/freemarker/core/_ObjectBuilderSettingEvaluator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/f0a6f451/src/main/java/freemarker/core/_ObjectBuilderSettingEvaluator.java ---------------------------------------------------------------------- diff --git a/src/main/java/freemarker/core/_ObjectBuilderSettingEvaluator.java b/src/main/java/freemarker/core/_ObjectBuilderSettingEvaluator.java index 2f91b55..ae99899 100644 --- a/src/main/java/freemarker/core/_ObjectBuilderSettingEvaluator.java +++ b/src/main/java/freemarker/core/_ObjectBuilderSettingEvaluator.java @@ -879,7 +879,7 @@ public class _ObjectBuilderSettingEvaluator { throw new LegacyExceptionWrapperSettingEvaluationExpression(e); } } catch (LegacyExceptionWrapperSettingEvaluationExpression e) { - if (!canBeStaticField) { + if (!canBeStaticField || className.indexOf('.') == -1) { throw e; } // Silently try to interpret className as static filed, throw the original exception if that fails.