From dev-return-101292-archive-asf-public=cust-asf.ponee.io@sling.apache.org Fri Dec 6 12:06:03 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 [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 3D31E180607 for ; Fri, 6 Dec 2019 13:06:03 +0100 (CET) Received: (qmail 52915 invoked by uid 500); 6 Dec 2019 12:06:02 -0000 Mailing-List: contact dev-help@sling.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@sling.apache.org Delivered-To: mailing list dev@sling.apache.org Received: (qmail 52903 invoked by uid 99); 6 Dec 2019 12:06:02 -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; Fri, 06 Dec 2019 12:06:02 +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 6D361E300D for ; Fri, 6 Dec 2019 12:06:01 +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 82E21780547 for ; Fri, 6 Dec 2019 12:06:00 +0000 (UTC) Date: Fri, 6 Dec 2019 12:06:00 +0000 (UTC) From: "Radu Cotescu (Jira)" To: dev@sling.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (SLING-8892) Unwrap LazyBindings.Supplier values in the RhinoJavaScriptEngine MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/SLING-8892?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16989676#comment-16989676 ] Radu Cotescu commented on SLING-8892: ------------------------------------- A first version of this enhancement was pushed in [commit e2c0d0e|https://github.com/apache/sling-org-apache-sling-scripting-javascript/commit/e2c0d0e678789e14bfd973c12e76daff71f86191], as part of SLING-8865. However, that didn't take into consideration the fact that a {{LazyBindings.Supplier}} can potentially return {{null}} and Rhino's {{ScriptContext}} cannot work with {{nulls}}. > Unwrap LazyBindings.Supplier values in the RhinoJavaScriptEngine > ---------------------------------------------------------------- > > Key: SLING-8892 > URL: https://issues.apache.org/jira/browse/SLING-8892 > Project: Sling > Issue Type: Improvement > Components: Scripting > Reporter: Radu Cotescu > Assignee: Radu Cotescu > Priority: Major > Fix For: Scripting JavaScript 3.1.2 > > > Starting with SLING-8737, {{BindingsValuesProviders}} can now take advantage of {{LazyBindings}} and provide values through {{LazyBindings.Supplier}} instances. The {{RhinoJavaScriptEngine}} should correctly unwrap these values when defining the scope for a JavaScript script. -- This message was sent by Atlassian Jira (v8.3.4#803005)