[GitHub] [sling-org-apache-sling-resourceresolver] jsedding commented on a diff in pull request #97: Issues/sling 11742

2023-06-07 Thread via GitHub


jsedding commented on code in PR #97:
URL: 
https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/97#discussion_r1221565468


##
src/main/java/org/apache/sling/resourceresolver/impl/VanityPathConfigurer.java:
##
@@ -0,0 +1,142 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sling.resourceresolver.impl;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import 
org.apache.sling.resourceresolver.impl.mapping.MapConfigurationProvider.VanityPathConfig;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+class VanityPathConfigurer {

Review Comment:
   Why not `VanityPathConfiguration` or `AggregateVanityPathConfiguration`? 
`Configurer` sounds like it sets the configuration (at least it does to me), 
which it doesn't. It only provides an aggregated view of the configuration that 
is already set.



##
src/main/java/org/apache/sling/resourceresolver/impl/VanityPathConfigurer.java:
##
@@ -0,0 +1,142 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sling.resourceresolver.impl;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import 
org.apache.sling.resourceresolver.impl.mapping.MapConfigurationProvider.VanityPathConfig;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+class VanityPathConfigurer {
+
+public @interface DeprecatedVanityConfig {
+
+/** This is the deprecated fallback configuration for 
resource_resolver_vanitypath_allowlist() */
+String[] resource_resolver_vanitypath_whitelist();
+
+/** This is the deprecated fallback configuration for 
resource_resolver_vanitypath_denylist() */
+String[] resource_resolver_vanitypath_blacklist();
+}
+
+private final Logger logger = LoggerFactory.getLogger(this.getClass());
+
+private volatile ResourceResolverFactoryConfig config;
+
+private volatile List vanityPathConfig;
+
+public void setConfiguration(final ResourceResolverFactoryConfig c, final 
DeprecatedVanityConfig deprecatedConfig) {
+this.config = c;
+this.vanityPathConfig = null;
+
+final List includes = 
this.configureVanityPathPrefixes(c.resource_resolver_vanitypath_allowlist(),
+deprecatedConfig == null ? null : 
deprecatedConfig.resource_resolver_vanitypath_whitelist(),
+"resource.resolver.vanitypath.allowlist",
+"resource.resolver.vanitypath.whitelist");
+
+final List excludes = 
this.configureVanityPathPrefixes(c.resource_resolver_vanitypath_denylist(),
+deprecatedConfig == null ? null : 
deprecatedConfig.resource_resolver_vanitypath_blacklist(),
+"resource.resolver.vanitypath.denylist",
+"resource.resolver.vanitypath.blacklist");
+if ( includes != null || excludes != null ) {
+this.vanityPathConfig = new ArrayList<>();
+if ( includes != null ) {
+for(final String val : includes) {
+this.vanityPathConfig.add(new VanityPathConfig(val, 
false));
+}
+}
+if ( excludes != null ) {
+for(final String val : excludes) {
+this.vanityPathConfig.add(new VanityPathConfig(val, true));
+}
+}
+Collections.sort(this.vanityPathConfig);
+}
+}
+
+

[jira] [Commented] (SLING-11844) Index definitions must not be extracted from empty nodes

2023-06-07 Thread Robert Munteanu (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-11844?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17730079#comment-17730079
 ] 

Robert Munteanu commented on SLING-11844:
-

[~abhigarg] - I filed this when I noticed extracted index definitions that look 
like this

{code}

{
"/oak:index/some-index-1": { }.
"/oak:index/some-index-2": {
"fullTextEnabled":true,
 "type":"lucene"
(etc)
}
{code}

I think the tooling should not emit empty nodes. I don't have a source 
content-package yet, but maybe you can try and reproduce based on the existing 
tests? I think just adding an empty folder inside the {{_oak_index}} folder 
will work.

> Index definitions must not be extracted from empty nodes
> 
>
> Key: SLING-11844
> URL: https://issues.apache.org/jira/browse/SLING-11844
> Project: Sling
>  Issue Type: Bug
>  Components: Content-Package to Feature Model Converter
>Reporter: Robert Munteanu
>Priority: Major
> Fix For: Content-Package to Feature Model Converter 1.3.4
>
>
> Under certain conditions, extracted index definitions will contain empty 
> nodes. These are useless and should be skipped. They can also confuse tooling 
> processing the index definitions.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[RESULT][VOTE] Release Servlets Resolver 2.9.12

2023-06-07 Thread Jörg Hoh
Hi,

The vote has passed with the following result :

+1 (binding): Jörg Hoh, Robert Munteanu, Angela Schreiber
+1 (non binding): -

I will copy this release to the Sling dist directory and
promote the artifacts to the central Maven repository.


Jörg

Am Do., 1. Juni 2023 um 11:38 Uhr schrieb Jörg Hoh :

> Hi,
>
> We solved 3 issues in this 
> release:https://issues.apache.org/jira/projects/SLING/versions/12352611
>
> Staging 
> repository:https://repository.apache.org/content/repositories/orgapachesling-2754
>
> You can use this UNIX script to download the release and verify the 
> signatures:https://raw.githubusercontent.com/apache/sling-tooling-release/master/check_staged_release.sh
> Usage:
> sh check_staged_release.sh 2754 /tmp/sling-staging
>
> Please vote to approve this release:
>
>   [ ] +1 Approve the release
>   [ ]  0 Don't care
>   [ ] -1 Don't release, because ...
>
> This majority vote is open for at least 72 hours.
>
>
>
> --
> Cheers,
> Jörg Hoh,
>
> https://cqdump.joerghoh.de
> Twitter: @joerghoh
>


-- 
Cheers,
Jörg Hoh,

https://cqdump.joerghoh.de
Twitter: @joerghoh


[GitHub] [sling-org-apache-sling-scripting-core] insideaem opened a new pull request, #22: Fix for NPE when flushBuffer is called before getWriter

2023-06-07 Thread via GitHub


insideaem opened a new pull request, #22:
URL: https://github.com/apache/sling-org-apache-sling-scripting-core/pull/22

   A NPE is thrown when flushBuffer is called before getWriter.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[jira] [Commented] (SLING-11844) Index definitions must not be extracted from empty nodes

2023-06-07 Thread Abhishek Garg (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-11844?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17730054#comment-17730054
 ] 

Abhishek Garg commented on SLING-11844:
---

Can we get a little more details under which conditions or what the index 
definitions look like with empty node types and sample input?

> Index definitions must not be extracted from empty nodes
> 
>
> Key: SLING-11844
> URL: https://issues.apache.org/jira/browse/SLING-11844
> Project: Sling
>  Issue Type: Bug
>  Components: Content-Package to Feature Model Converter
>Reporter: Robert Munteanu
>Priority: Major
> Fix For: Content-Package to Feature Model Converter 1.3.4
>
>
> Under certain conditions, extracted index definitions will contain empty 
> nodes. These are useless and should be skipped. They can also confuse tooling 
> processing the index definitions.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


Re: [VOTE] Release Servlets Resolver 2.9.12

2023-06-07 Thread Angela Schreiber
+1

angela


From: Jörg Hoh 
Sent: Thursday, June 1, 2023 11:38
To: Sling Developers List 
Subject: [VOTE] Release Servlets Resolver 2.9.12

Hi,

We solved 3 issues in this
release:https://issues.apache.org/jira/projects/SLING/versions/12352611

Staging 
repository:https://repository.apache.org/content/repositories/orgapachesling-2754

You can use this UNIX script to download the release and verify the
signatures:https://raw.githubusercontent.com/apache/sling-tooling-release/master/check_staged_release.sh
Usage:
sh check_staged_release.sh 2754 /tmp/sling-staging

Please vote to approve this release:

  [ ] +1 Approve the release
  [ ]  0 Don't care
  [ ] -1 Don't release, because ...

This majority vote is open for at least 72 hours.



--
Cheers,
Jörg Hoh,

https://cqdump.joerghoh.de
Twitter: @joerghoh


[jira] [Created] (SLING-11902) Provide alternative terminology for inequitable terms

2023-06-07 Thread Carsten Ziegeler (Jira)
Carsten Ziegeler created SLING-11902:


 Summary: Provide alternative terminology for inequitable terms
 Key: SLING-11902
 URL: https://issues.apache.org/jira/browse/SLING-11902
 Project: Sling
  Issue Type: Improvement
  Components: Discovery
Reporter: Carsten Ziegeler
 Fix For: Discovery Impl 1.2.14, Discovery Base 2.0.16, Discovery 
Oak 1.2.46


Some modules in discovery use the term white/black list which is considered 
inequitable terminology. Therefore, some more acceptable equivalents should be 
provided for these terms. The proposal is to switch to allow/deny list.




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[GitHub] [sling-org-apache-sling-jcr-contentloader] YegorKozlov commented on pull request #24: JsonReader to recognize UTC dates

2023-06-07 Thread via GitHub


YegorKozlov commented on PR #24:
URL: 
https://github.com/apache/sling-org-apache-sling-jcr-contentloader/pull/24#issuecomment-1580209846

   @enapps-enorman Agree. ISO8601#parse is much better than the regex. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [VOTE] Release Servlets Resolver 2.9.12

2023-06-07 Thread Jörg Hoh
We currently have 2 votes, can I get some more? Thanks!

Jörg


Am Do., 1. Juni 2023 um 12:17 Uhr schrieb Robert Munteanu <
romb...@apache.org>:

> On Thu, 2023-06-01 at 11:38 +0200, Jörg Hoh wrote:
> > Please vote to approve this release:
>
> +1
> Robert
>


-- 
Cheers,
Jörg Hoh,

https://cqdump.joerghoh.de
Twitter: @joerghoh