Client Side Tests that require a Bundle to be Deployed and Active

2018-03-16 Thread Andreas Schaefer
Hi

I have a Sling project that needs some client side testing.

Initially I used a package to deploy my dynamic configurations and then I could 
use io.wcm package deployer which will wait until the package is deployed.
Now I switched to a bundle and I am not able to wait until my bundle is 
deployed and active before the tests are executed. Right now I am waiting until 
a certain node from my configuration is created before starting with the tests 
but this is neither elegant nor reliable.

Is there a way either in Maven or in my Test Case to wait for the bundle to be 
active?

Currently I setup and start Sling with the slingstart-maven-plugin and then 
deploy the configuration bundle with the maven-sling-plugin because my 
configuration depends on other bundles to be active in order to be deployed and 
putting the bundle in the provisioning model did not work.

Thanks - Andreas Schaefer Sr.

[jira] [Commented] (SLING-7544) Make optimized alias lookup non-blocking

2018-03-16 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SLING-7544:
---

DominikSuess opened a new pull request #5: SLING-7544 - improving optimized 
alias lookup to not block during int…
URL: https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/5
 
 
   …ialization but fall back to default and enforce non traversal query for 
building up aliasmap


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Make optimized alias lookup non-blocking
> 
>
> Key: SLING-7544
> URL: https://issues.apache.org/jira/browse/SLING-7544
> Project: Sling
>  Issue Type: Improvement
>  Components: ResourceResolver
>Affects Versions: Resource Resolver 1.5.36
>Reporter: Dominik Süß
>Priority: Major
>
> The implementation of optimized alias lookup as introduced with SLING-2521 
> blocks CommonResourceResolver activation while loading aliases to fillup the 
> aliasmap. In case a corresponding index is not present yet this can lead to 
> full tree traversal while indexing is doing the same in the background.
> The proposed improvements are:
> * making loading of the aliasmap happen asynchronously
> * only use optimized handling as soon as aliasmap is built
> * wait for non traversal index (optional - forced by default, can be turned 
> off for small datasets)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] DominikSuess opened a new pull request #5: SLING-7544 - improving optimized alias lookup to not block during int…

2018-03-16 Thread GitBox
DominikSuess opened a new pull request #5: SLING-7544 - improving optimized 
alias lookup to not block during int…
URL: https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/5
 
 
   …ialization but fall back to default and enforce non traversal query for 
building up aliasmap


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[jira] [Commented] (SLING-7544) Make optimized alias lookup non-blocking

2018-03-16 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SLING-7544:
---

DominikSuess closed pull request #4: SLING-7544 - improving optimized alias 
lookup to not block during int…
URL: https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/4
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/src/main/java/org/apache/sling/resourceresolver/impl/CommonResourceResolverFactoryImpl.java
 
b/src/main/java/org/apache/sling/resourceresolver/impl/CommonResourceResolverFactoryImpl.java
index 8cef27d..5db22d5 100644
--- 
a/src/main/java/org/apache/sling/resourceresolver/impl/CommonResourceResolverFactoryImpl.java
+++ 
b/src/main/java/org/apache/sling/resourceresolver/impl/CommonResourceResolverFactoryImpl.java
@@ -537,4 +537,14 @@ public void close() {
 }
 }
 }
+
+   @Override
+   public boolean isAliasMapInitialized() {
+   return mapEntries.isAliasMapInitialized();
+   }
+
+   @Override
+   public boolean isForceNoAliasTraversal() {
+   return this.activator.isForceNoAliasTraversal();
+   }
 }
\ No newline at end of file
diff --git 
a/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverFactoryActivator.java
 
b/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverFactoryActivator.java
index 5984363..03f6870 100644
--- 
a/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverFactoryActivator.java
+++ 
b/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverFactoryActivator.java
@@ -196,6 +196,10 @@ public boolean isVanityPathEnabled() {
 public boolean isOptimizeAliasResolutionEnabled() {
 return this.config.resource_resolver_optimize_alias_resolution();
 }
+
+   public boolean isForceNoAliasTraversal() {
+   return  this.config.force_no_alias_traversal();
+   }
 
 public boolean isLogUnclosedResourceResolvers() {
 return this.config.resource_resolver_log_unclosed();
diff --git 
a/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverFactoryConfig.java
 
b/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverFactoryConfig.java
index a0aa53f..360a864 100644
--- 
a/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverFactoryConfig.java
+++ 
b/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverFactoryConfig.java
@@ -148,6 +148,12 @@
  " the alias resolution by creating an internal cache of 
aliases. This might have an impact on the startup time"+
  " and on the alias update time if the number of aliases 
is huge (over 1).")
 boolean resource_resolver_optimize_alias_resolution() default true;
+
+
+@AttributeDefinition(name = "Force no traversal for optimized alias 
lookup",
+description = "When enabled the lookup of alias map for optimized 
resolution enforces retry until an index is present"+
+ "and does not traverse repository.")
+   boolean force_no_alias_traversal() default true;
 
 @AttributeDefinition(name = "Allowed Vanity Path Location",
 description ="This setting can contain a list of path prefixes, e.g. 
/libs/, /content/. If " +
diff --git 
a/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverImpl.java
 
b/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverImpl.java
index 66eba96..75d35ed 100644
--- 
a/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverImpl.java
+++ 
b/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverImpl.java
@@ -474,7 +474,7 @@ public String map(final HttpServletRequest request, final 
String resourcePath) {
 while (path != null) {
 String alias = null;
 if (current != null && !path.endsWith(JCR_CONTENT_LEAF)) {
-if (factory.isOptimizeAliasResolutionEnabled()) {
+if (factory.isOptimizeAliasResolutionEnabled() && 
factory.isAliasMapInitialized()) {
 logger.debug("map: Optimize Alias Resolution is 
Enabled");
 String parentPath = ResourceUtil.getParent(path);
 if (parentPath != null) {
@@ -987,7 +987,7 @@ private Resource getChildInternal(final Resource parent, 
final String childName)
 
 // we do not have a child with the exact name, so we look for
 // a child, whose alias matches the childName
-if (factory.isOptimizeAliasResolutionEnabled()){
+if 

[GitHub] DominikSuess closed pull request #4: SLING-7544 - improving optimized alias lookup to not block during int…

2018-03-16 Thread GitBox
DominikSuess closed pull request #4: SLING-7544 - improving optimized alias 
lookup to not block during int…
URL: https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/4
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/src/main/java/org/apache/sling/resourceresolver/impl/CommonResourceResolverFactoryImpl.java
 
b/src/main/java/org/apache/sling/resourceresolver/impl/CommonResourceResolverFactoryImpl.java
index 8cef27d..5db22d5 100644
--- 
a/src/main/java/org/apache/sling/resourceresolver/impl/CommonResourceResolverFactoryImpl.java
+++ 
b/src/main/java/org/apache/sling/resourceresolver/impl/CommonResourceResolverFactoryImpl.java
@@ -537,4 +537,14 @@ public void close() {
 }
 }
 }
+
+   @Override
+   public boolean isAliasMapInitialized() {
+   return mapEntries.isAliasMapInitialized();
+   }
+
+   @Override
+   public boolean isForceNoAliasTraversal() {
+   return this.activator.isForceNoAliasTraversal();
+   }
 }
\ No newline at end of file
diff --git 
a/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverFactoryActivator.java
 
b/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverFactoryActivator.java
index 5984363..03f6870 100644
--- 
a/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverFactoryActivator.java
+++ 
b/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverFactoryActivator.java
@@ -196,6 +196,10 @@ public boolean isVanityPathEnabled() {
 public boolean isOptimizeAliasResolutionEnabled() {
 return this.config.resource_resolver_optimize_alias_resolution();
 }
+
+   public boolean isForceNoAliasTraversal() {
+   return  this.config.force_no_alias_traversal();
+   }
 
 public boolean isLogUnclosedResourceResolvers() {
 return this.config.resource_resolver_log_unclosed();
diff --git 
a/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverFactoryConfig.java
 
b/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverFactoryConfig.java
index a0aa53f..360a864 100644
--- 
a/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverFactoryConfig.java
+++ 
b/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverFactoryConfig.java
@@ -148,6 +148,12 @@
  " the alias resolution by creating an internal cache of 
aliases. This might have an impact on the startup time"+
  " and on the alias update time if the number of aliases 
is huge (over 1).")
 boolean resource_resolver_optimize_alias_resolution() default true;
+
+
+@AttributeDefinition(name = "Force no traversal for optimized alias 
lookup",
+description = "When enabled the lookup of alias map for optimized 
resolution enforces retry until an index is present"+
+ "and does not traverse repository.")
+   boolean force_no_alias_traversal() default true;
 
 @AttributeDefinition(name = "Allowed Vanity Path Location",
 description ="This setting can contain a list of path prefixes, e.g. 
/libs/, /content/. If " +
diff --git 
a/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverImpl.java
 
b/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverImpl.java
index 66eba96..75d35ed 100644
--- 
a/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverImpl.java
+++ 
b/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverImpl.java
@@ -474,7 +474,7 @@ public String map(final HttpServletRequest request, final 
String resourcePath) {
 while (path != null) {
 String alias = null;
 if (current != null && !path.endsWith(JCR_CONTENT_LEAF)) {
-if (factory.isOptimizeAliasResolutionEnabled()) {
+if (factory.isOptimizeAliasResolutionEnabled() && 
factory.isAliasMapInitialized()) {
 logger.debug("map: Optimize Alias Resolution is 
Enabled");
 String parentPath = ResourceUtil.getParent(path);
 if (parentPath != null) {
@@ -987,7 +987,7 @@ private Resource getChildInternal(final Resource parent, 
final String childName)
 
 // we do not have a child with the exact name, so we look for
 // a child, whose alias matches the childName
-if (factory.isOptimizeAliasResolutionEnabled()){
+if (factory.isOptimizeAliasResolutionEnabled() && 
factory.isAliasMapInitialized()){
 logger.debug("getChildInternal: Optimize Alias Resolution is 
Enabled");
 //optimization made in SLING-2521
 final Map

[jira] [Comment Edited] (SLING-2759) Provide an OpenId Connect Authentication Handler

2018-03-16 Thread HDW (JIRA)

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

HDW edited comment on SLING-2759 at 3/16/18 3:58 PM:
-

Hi all,

I am an undergraduate of University of Moratuwa. I am interested in this 
project.I have worked on OpenID Connect certification process previously. There 
are three main specifications for OpenID Connect.

[1] - [http://openid.net/specs/openid-connect-core-1_0.html]

[2] - [https://openid.net/specs/openid-connect-discovery-1_0.html]

[3] - [http://openid.net/specs/openid-connect-registration-1_0.html]

[1] specification is for the basic three flows: Basic, Implicit and Hybrid.  
[2]specification is about  OIDC discovery and  [3] specification is about 
dynamic client registration. 

So I would like to know the scope of the gsoc project? Should we try to 
implement all three specifications? 

 


was (Author: hdw):
Hi all,

I am an undergraduate of University of Moratuwa. I am interested in this 
project.I have worked on OpenID Connect certification process previously. There 
are three main specifications for OpenID Connect.

[1] - http://openid.net/specs/openid-connect-core-1_0.html

[2] - https://openid.net/specs/openid-connect-discovery-1_0.html

[3] - [http://openid.net/specs/openid-connect-registration-1_0.html]

[1] specification is for the basic three flows: Basic, Implicit and Hybrid.  
[2]specification is about  OIDC discovery and  [3] specification is about 
dynamic client registration. 

So I would like to know the scope of the gsoc project? Should we try to 
implement all three specificarions? 

 

> Provide an OpenId Connect Authentication Handler
> 
>
> Key: SLING-2759
> URL: https://issues.apache.org/jira/browse/SLING-2759
> Project: Sling
>  Issue Type: Wish
>  Components: Authentication
>Reporter: Antonio Sanso
>Priority: Major
>  Labels: gsoc2018
>
> It would be nice to provide an OpenId Connect [0] Authentication Handler.
> Ideally this would leverage Apache Oltu OpenId Connect support [1] and 
> pluggable login module [2]
> [0] http://openid.net/connect/
> [1] https://issues.apache.org/jira/browse/AMBER-24
> [2] https://issues.apache.org/jira/browse/SLING-2623



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SLING-2759) Provide an OpenId Connect Authentication Handler

2018-03-16 Thread Hasini Dilanka Witharana (JIRA)

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

Hasini Dilanka Witharana commented on SLING-2759:
-

Hi all,

I am an undergraduate of University of Moratuwa. I am interested in this 
project.I have worked on OpenID Connect certification process previously. There 
are three main specifications for OpenID Connect.

[1] - http://openid.net/specs/openid-connect-core-1_0.html

[2] - https://openid.net/specs/openid-connect-discovery-1_0.html

[3] - [http://openid.net/specs/openid-connect-registration-1_0.html]

[1] specification is for the basic three flows: Basic, Implicit and Hybrid.  
[2]specification is about  OIDC discovery and  [3] specification is about 
dynamic client registration. 

So I would like to know the scope of the gsoc project? Should we try to 
implement all three specificarions? 

 

> Provide an OpenId Connect Authentication Handler
> 
>
> Key: SLING-2759
> URL: https://issues.apache.org/jira/browse/SLING-2759
> Project: Sling
>  Issue Type: Wish
>  Components: Authentication
>Reporter: Antonio Sanso
>Priority: Major
>  Labels: gsoc2018
>
> It would be nice to provide an OpenId Connect [0] Authentication Handler.
> Ideally this would leverage Apache Oltu OpenId Connect support [1] and 
> pluggable login module [2]
> [0] http://openid.net/connect/
> [1] https://issues.apache.org/jira/browse/AMBER-24
> [2] https://issues.apache.org/jira/browse/SLING-2623



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SLING-7544) Make optimized alias lookup non-blocking

2018-03-16 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on SLING-7544:
---

DominikSuess opened a new pull request #4: SLING-7544 - improving optimized 
alias lookup to not block during int…
URL: https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/4
 
 
   …ialization but fall back to default and enforce non traversal query for 
building up aliasmap


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Make optimized alias lookup non-blocking
> 
>
> Key: SLING-7544
> URL: https://issues.apache.org/jira/browse/SLING-7544
> Project: Sling
>  Issue Type: Improvement
>  Components: ResourceResolver
>Affects Versions: Resource Resolver 1.5.36
>Reporter: Dominik Süß
>Priority: Major
>
> The implementation of optimized alias lookup as introduced with SLING-2521 
> blocks CommonResourceResolver activation while loading aliases to fillup the 
> aliasmap. In case a corresponding index is not present yet this can lead to 
> full tree traversal while indexing is doing the same in the background.
> The proposed improvements are:
> * making loading of the aliasmap happen asynchronously
> * only use optimized handling as soon as aliasmap is built
> * wait for non traversal index (optional - forced by default, can be turned 
> off for small datasets)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] DominikSuess opened a new pull request #4: SLING-7544 - improving optimized alias lookup to not block during int…

2018-03-16 Thread GitBox
DominikSuess opened a new pull request #4: SLING-7544 - improving optimized 
alias lookup to not block during int…
URL: https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/4
 
 
   …ialization but fall back to default and enforce non traversal query for 
building up aliasmap


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[jira] [Created] (SLING-7544) Make optimized alias lookup non-blocking

2018-03-16 Thread JIRA
Dominik Süß created SLING-7544:
--

 Summary: Make optimized alias lookup non-blocking
 Key: SLING-7544
 URL: https://issues.apache.org/jira/browse/SLING-7544
 Project: Sling
  Issue Type: Improvement
  Components: ResourceResolver
Affects Versions: Resource Resolver 1.5.36
Reporter: Dominik Süß


The implementation of optimized alias lookup as introduced with SLING-2521 
blocks CommonResourceResolver activation while loading aliases to fillup the 
aliasmap. In case a corresponding index is not present yet this can lead to 
full tree traversal while indexing is doing the same in the background.

The proposed improvements are:
* making loading of the aliasmap happen asynchronously
* only use optimized handling as soon as aliasmap is built
* wait for non traversal index (optional - forced by default, can be turned off 
for small datasets)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (SLING-2536) JcrResourceBundle breaks the contract of getLocale

2018-03-16 Thread Carsten Ziegeler (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-2536?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Carsten Ziegeler resolved SLING-2536.
-
Resolution: Won't Fix

> JcrResourceBundle breaks the contract of getLocale
> --
>
> Key: SLING-2536
> URL: https://issues.apache.org/jira/browse/SLING-2536
> Project: Sling
>  Issue Type: Bug
>  Components: Extensions, i18n
>Affects Versions: i18n 2.2.2
>Reporter: Endolf
>Priority: Major
>
> The javadoc for getLocale state that it should return the locale of this 
> bundle or the locale of the fallback. Currently JcrResourceBundle always 
> returns the requested locale even if there is no mix:language for that locale.
> e.g. Only a mix:language with a jcr:language en is in the jcr, a request for 
> a resource bundle of sv will return a ResourceBundle object where getLocale 
> returns sv. This should return en according to the javadoc.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


Re: [Sling Feature Model] Expanded requirements

2018-03-16 Thread David Bosschaert
Hi all,

In the mean time some additional requirements surfaced, which I added in
[1].

I also updated the feature model format, mostly based on existing
requirements. It can be found at [2]. Once it's matured we should create a
JSON Schema for it (or something similar)...

Main additions are:
* Support for variables
* Comments can now also be put in the document by using a key that starts
with a hash '#'. This is because most JSON editors don't support the JSMin
(/* */ and //) style comments and show these as errors.
* Some small additions that make it possible to 100% roundtrip between the
provisioning and the feature model which is especially important during the
phase where users are migrating.

Best regards,

David

[1]
https://github.com/apache/sling-whiteboard/commit/2dcab0e45866ce51f732ac525ebf100a82737099
[2]
https://github.com/apache/sling-whiteboard/blob/master/featuremodel/design/feature-model.json


[jira] [Resolved] (SLING-7542) Avoid shared session/resource resolver usage

2018-03-16 Thread Carsten Ziegeler (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-7542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Carsten Ziegeler resolved SLING-7542.
-
Resolution: Fixed

Resolved in rev dc13b3c - the resource resolver is only created if needed in 
the change event handling

> Avoid shared session/resource resolver usage
> 
>
> Key: SLING-7542
> URL: https://issues.apache.org/jira/browse/SLING-7542
> Project: Sling
>  Issue Type: Bug
>  Components: i18n
>Affects Versions: i18n 2.5.12
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
>Priority: Major
> Fix For: i18n 2.5.14
>
>
> The i18n code is currently using a shared session, while all operations seem 
> to be just reading, the session is refreshed from time to time and a refresh 
> is actually considered a write operation.
>  Therefore we need to change the code to not share a session/resource resolver



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (SLING-7543) Reduce reloading of bundles

2018-03-16 Thread Carsten Ziegeler (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-7543?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Carsten Ziegeler resolved SLING-7543.
-
Resolution: Fixed

Resolved in rev dc13b3c as part of SLING-7542

> Reduce reloading of bundles
> ---
>
> Key: SLING-7543
> URL: https://issues.apache.org/jira/browse/SLING-7543
> Project: Sling
>  Issue Type: Improvement
>  Components: i18n
>Affects Versions: i18n 2.5.12
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
>Priority: Major
> Fix For: i18n 2.5.14
>
>
> When changes are reported via the ResourceChangeListener this can lead to 
> several reload operations either for all bundles or for a specific bundle. 
> This can be optimized by doing a reload only once for a change set



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Closed] (SLING-7523) Java Use object with trailing whitespace in the package declaration freezes the SightlyJavaCompilerService

2018-03-16 Thread Radu Cotescu (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-7523?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Radu Cotescu closed SLING-7523.
---

> Java Use object with trailing whitespace in the package declaration freezes 
> the SightlyJavaCompilerService
> --
>
> Key: SLING-7523
> URL: https://issues.apache.org/jira/browse/SLING-7523
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Affects Versions: Scripting Sightly Engine 1.0.10, Scripting HTL Engine 
> 1.0.20
>Reporter: Radu Cotescu
>Assignee: Radu Cotescu
>Priority: Major
> Fix For: Scripting HTL Engine 1.0.52-1.3.1, Scripting HTL Testing 
> 1.0.8-1.3.1
>
>
> A Java Use object with a trailing whitespace in the package declaration will 
> freeze the {{SightlyJavaCompilerService}}, by generating a catastrophic 
> backtracking when attempting to match the package declaration line.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Closed] (SLING-7476) Exceptions should be logged correctly

2018-03-16 Thread Radu Cotescu (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-7476?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Radu Cotescu closed SLING-7476.
---

> Exceptions should be logged correctly
> -
>
> Key: SLING-7476
> URL: https://issues.apache.org/jira/browse/SLING-7476
> Project: Sling
>  Issue Type: Bug
>  Components: XSS Protection API
>Affects Versions: XSS Protection API 2.0.4
>Reporter: Tobias Bocanegra
>Assignee: Radu Cotescu
>Priority: Major
> Fix For: XSS Protection API 2.0.6
>
>
> when filtering a source that is larger than 200k, the xss api fails with:
> {noformat}
> java.lang.RuntimeException: Unable to scan input
>   at 
> org.apache.sling.xss.impl.HtmlToHtmlContentContext.filter(HtmlToHtmlContentContext.java:73)
>   at 
> org.apache.sling.xss.impl.XSSFilterImpl.filter(XSSFilterImpl.java:190)
>   at 
> org.apache.sling.xss.impl.XSSFilterImpl.filter(XSSFilterImpl.java:123)
>   at org.apache.sling.xss.impl.XSSAPIImpl.filterHTML(XSSAPIImpl.java:466)
>   at 
> org.apache.sling.xss.impl.XSSAPIImplTest.testFilterLargeHTML(XSSAPIImplTest.java:223)
> {noformat}
> Test:
> {code}
> @Test
> public void testFilterLargeHTML() {
> final int SIZE = 21;
> StringBuilder b = new StringBuilder(SIZE);
> while (b.length() < SIZE) {
> b.append("Lorem ipsum dolor sit amet, consectetur adipiscing 
> elit. Donec at enim et dui egestas accumsan amet.");
> }
> String source = b.toString();
> TestCase.assertEquals("Filtering large source", source, 
> xssAPI.filterHTML(source));
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (SLING-7543) Reduce reloading of bundles

2018-03-16 Thread Carsten Ziegeler (JIRA)
Carsten Ziegeler created SLING-7543:
---

 Summary: Reduce reloading of bundles
 Key: SLING-7543
 URL: https://issues.apache.org/jira/browse/SLING-7543
 Project: Sling
  Issue Type: Improvement
  Components: i18n
Affects Versions: i18n 2.5.12
Reporter: Carsten Ziegeler
Assignee: Carsten Ziegeler
 Fix For: i18n 2.5.14


When changes are reported via the ResourceChangeListener this can lead to 
several reload operations either for all bundles or for a specific bundle. This 
can be optimized by doing a reload only once for a change set



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[RESULT][VOTE] Release Apache Sling XSS Protection API 2.0.6

2018-03-16 Thread Radu Cotescu
Hi,

The vote passes with four +1 from Daniel Klco, Stefan Seifert, Carsten
Ziegeler and Jason E Bailey (non-binding).

Thanks,
Radu


[jira] [Created] (SLING-7542) Avoid shared session/resource resolver usage

2018-03-16 Thread Carsten Ziegeler (JIRA)
Carsten Ziegeler created SLING-7542:
---

 Summary: Avoid shared session/resource resolver usage
 Key: SLING-7542
 URL: https://issues.apache.org/jira/browse/SLING-7542
 Project: Sling
  Issue Type: Bug
  Components: i18n
Affects Versions: i18n 2.5.12
Reporter: Carsten Ziegeler
Assignee: Carsten Ziegeler
 Fix For: i18n 2.5.14


The i18n code is currently using a shared session, while all operations seem to 
be just reading, the session is refreshed from time to time and a refresh is 
actually considered a write operation.

 Therefore we need to change the code to not share a session/resource resolver



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[RESULT][VOTE] Release Apache Sling Scripting HTL Engine 1.0.52-1.3.1, Apache Sling Scripting HTL Testing 1.0.8-1.3.1

2018-03-16 Thread Radu Cotescu
Hi,

The vote passes with three +1 from Radu Cotescu, Karl Pauls and Stefan Egli.

Thanks,
Radu


Re: [VOTE] Release Apache Sling XSS Protection API 2.0.6

2018-03-16 Thread Radu Cotescu
Hi Olli,

I have no sane explanation as to why there seem to be arbitrary limits for
those methods instead of the min / max values for the corresponding data
types. Nonetheless, we can open another issue and have them corrected.

Cheers,
Radu

On Fri, 9 Mar 2018 at 17:38 Oliver Lietz  wrote:

> On Wednesday 07 March 2018 14:19:49 Radu Cotescu wrote:
> > Hi,
>
> Hi Radu,
>
> > We solved 1 issue in this release:
> > https://issues.apache.org/jira/projects/SLING/versions/12342876
>
> while looking at the fix for SLING-7476 I stumbled upon those hardcoded
> values
> for min and max, e.g. -20 and 20 (which seem to be
> arbitrary)
> and wondered why we do not use Integer.MIN_VALUE and Integer.MAX_VALUE
> instead. Any reason for this?
>
> Thanks,
> O.
>