[jira] [Commented] (MYFACES-4273) JarFile never released in oam.view.facelets.util.ClassPath

2018-12-10 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16715078#comment-16715078
 ] 

ASF GitHub Bot commented on MYFACES-4273:
-

wtlucy opened a new pull request #36: MYFACES-4273 close() JarFile in Classpath 
2.2.x
URL: https://github.com/apache/myfaces/pull/36
 
 
   https://issues.apache.org/jira/browse/MYFACES-4273


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


> JarFile never released in oam.view.facelets.util.ClassPath
> --
>
> Key: MYFACES-4273
> URL: https://issues.apache.org/jira/browse/MYFACES-4273
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.0.24, 2.1.18, 2.2.12, 2.3.2, 3.0.0-SNAPSHOT
>Reporter: Bill Lucy
>Assignee: Bill Lucy
>Priority: Minor
>
> JarFiles opened in ClassPath._searchResource() aren't ever closed.  This can 
> cause a leak, and in some environments that causes problems removing apps 
> after shutdown.



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


[jira] [Commented] (MYFACES-4273) JarFile never released in oam.view.facelets.util.ClassPath

2018-12-10 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16715088#comment-16715088
 ] 

ASF GitHub Bot commented on MYFACES-4273:
-

wtlucy closed pull request #38: MYFACES-4273 close() JarFile in Classpath 2.0.x
URL: https://github.com/apache/myfaces/pull/38
 
 
   

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/impl/src/main/java/org/apache/myfaces/view/facelets/util/Classpath.java 
b/impl/src/main/java/org/apache/myfaces/view/facelets/util/Classpath.java
index c82b1b0da..9b59644e6 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/util/Classpath.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/util/Classpath.java
@@ -84,37 +84,47 @@ private static void _searchResource(Set result, 
ClassLoader loader, String
 conn.setDefaultUseCaches(false);
 
 JarFile jar = null;
-if (conn instanceof JarURLConnection)
+try 
 {
-try
+if (conn instanceof JarURLConnection)
 {
-jar = ((JarURLConnection) conn).getJarFile();
+try
+{
+jar = ((JarURLConnection) conn).getJarFile();
+}
+
+catch (Throwable e)
+{
+// This can happen if the classloader provided us a 
URL that it thinks exists
+// but really doesn't.  In particular, if a JAR 
contains META-INF/MANIFEST.MF
+// but not META-INF/, some classloaders may 
incorrectly report that META-INF/
+// exists and we'll end up here.  Just ignore this 
case.
+
+continue;
+}
 }
-
-catch (Throwable e)
+else
 {
-// This can happen if the classloader provided us a URL 
that it thinks exists
-// but really doesn't.  In particular, if a JAR contains 
META-INF/MANIFEST.MF
-// but not META-INF/, some classloaders may incorrectly 
report that META-INF/
-// exists and we'll end up here.  Just ignore this case.
-
-continue;
+jar = _getAlternativeJarFile(url);
 }
+
+if (jar != null)
+{
+_searchJar(loader, result, jar, prefix, suffix);
+}
+else
+{
+if (!_searchDir(result, new 
File(URLDecoder.decode(url.getFile(), "UTF-8")), suffix))
+{
+_searchFromURL(result, prefix, suffix, url);
+}
+}
 }
-else
-{
-jar = _getAlternativeJarFile(url);
-}
-
-if (jar != null)
-{
-_searchJar(loader, result, jar, prefix, suffix);
-}
-else
+finally 
 {
-if (!_searchDir(result, new 
File(URLDecoder.decode(url.getFile(), "UTF-8")), suffix))
+if (jar != null) 
 {
-_searchFromURL(result, prefix, suffix, url);
+jar.close();
 }
 }
 }


 


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


> JarFile never released in oam.view.facelets.util.ClassPath
> --
>
> Key: MYFACES-4273
> URL: https://issues.apache.org/jira/browse/MYFACES-4273
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.0.24, 2.1.18, 2.2.12, 2.3.2, 3.0.0-SNAPSHOT
>Reporter: Bill Lucy
>Assignee: Bill Lucy
>Priority: Minor
>
> JarFiles opened in ClassPath._searchResource() aren't ever closed.  This can 
> cause a leak, and in some environments that causes problems removing apps 
> after shutdown.



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


[jira] [Commented] (MYFACES-4273) JarFile never released in oam.view.facelets.util.ClassPath

2018-12-10 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16715085#comment-16715085
 ] 

ASF GitHub Bot commented on MYFACES-4273:
-

wtlucy closed pull request #37: MYFACES-4273 close() JarFile in Classpath 2.1.x
URL: https://github.com/apache/myfaces/pull/37
 
 
   

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/impl/src/main/java/org/apache/myfaces/view/facelets/util/Classpath.java 
b/impl/src/main/java/org/apache/myfaces/view/facelets/util/Classpath.java
index c82b1b0da..9b59644e6 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/util/Classpath.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/util/Classpath.java
@@ -84,37 +84,47 @@ private static void _searchResource(Set result, 
ClassLoader loader, String
 conn.setDefaultUseCaches(false);
 
 JarFile jar = null;
-if (conn instanceof JarURLConnection)
+try 
 {
-try
+if (conn instanceof JarURLConnection)
 {
-jar = ((JarURLConnection) conn).getJarFile();
+try
+{
+jar = ((JarURLConnection) conn).getJarFile();
+}
+
+catch (Throwable e)
+{
+// This can happen if the classloader provided us a 
URL that it thinks exists
+// but really doesn't.  In particular, if a JAR 
contains META-INF/MANIFEST.MF
+// but not META-INF/, some classloaders may 
incorrectly report that META-INF/
+// exists and we'll end up here.  Just ignore this 
case.
+
+continue;
+}
 }
-
-catch (Throwable e)
+else
 {
-// This can happen if the classloader provided us a URL 
that it thinks exists
-// but really doesn't.  In particular, if a JAR contains 
META-INF/MANIFEST.MF
-// but not META-INF/, some classloaders may incorrectly 
report that META-INF/
-// exists and we'll end up here.  Just ignore this case.
-
-continue;
+jar = _getAlternativeJarFile(url);
 }
+
+if (jar != null)
+{
+_searchJar(loader, result, jar, prefix, suffix);
+}
+else
+{
+if (!_searchDir(result, new 
File(URLDecoder.decode(url.getFile(), "UTF-8")), suffix))
+{
+_searchFromURL(result, prefix, suffix, url);
+}
+}
 }
-else
-{
-jar = _getAlternativeJarFile(url);
-}
-
-if (jar != null)
-{
-_searchJar(loader, result, jar, prefix, suffix);
-}
-else
+finally 
 {
-if (!_searchDir(result, new 
File(URLDecoder.decode(url.getFile(), "UTF-8")), suffix))
+if (jar != null) 
 {
-_searchFromURL(result, prefix, suffix, url);
+jar.close();
 }
 }
 }


 


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


> JarFile never released in oam.view.facelets.util.ClassPath
> --
>
> Key: MYFACES-4273
> URL: https://issues.apache.org/jira/browse/MYFACES-4273
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.0.24, 2.1.18, 2.2.12, 2.3.2, 3.0.0-SNAPSHOT
>Reporter: Bill Lucy
>Assignee: Bill Lucy
>Priority: Minor
>
> JarFiles opened in ClassPath._searchResource() aren't ever closed.  This can 
> cause a leak, and in some environments that causes problems removing apps 
> after shutdown.



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


[jira] [Commented] (MYFACES-4273) JarFile never released in oam.view.facelets.util.ClassPath

2018-12-10 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16715084#comment-16715084
 ] 

ASF GitHub Bot commented on MYFACES-4273:
-

wtlucy opened a new pull request #37: MYFACES-4273 close() JarFile in Classpath 
2.1.x
URL: https://github.com/apache/myfaces/pull/37
 
 
   https://issues.apache.org/jira/browse/MYFACES-4267


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


> JarFile never released in oam.view.facelets.util.ClassPath
> --
>
> Key: MYFACES-4273
> URL: https://issues.apache.org/jira/browse/MYFACES-4273
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.0.24, 2.1.18, 2.2.12, 2.3.2, 3.0.0-SNAPSHOT
>Reporter: Bill Lucy
>Assignee: Bill Lucy
>Priority: Minor
>
> JarFiles opened in ClassPath._searchResource() aren't ever closed.  This can 
> cause a leak, and in some environments that causes problems removing apps 
> after shutdown.



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


[jira] [Commented] (MYFACES-4273) JarFile never released in oam.view.facelets.util.ClassPath

2018-12-10 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16715079#comment-16715079
 ] 

ASF GitHub Bot commented on MYFACES-4273:
-

wtlucy closed pull request #36: MYFACES-4273 close() JarFile in Classpath 2.2.x
URL: https://github.com/apache/myfaces/pull/36
 
 
   

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/impl/src/main/java/org/apache/myfaces/view/facelets/util/Classpath.java 
b/impl/src/main/java/org/apache/myfaces/view/facelets/util/Classpath.java
index c82b1b0da..9b59644e6 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/util/Classpath.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/util/Classpath.java
@@ -84,37 +84,47 @@ private static void _searchResource(Set result, 
ClassLoader loader, String
 conn.setDefaultUseCaches(false);
 
 JarFile jar = null;
-if (conn instanceof JarURLConnection)
+try 
 {
-try
+if (conn instanceof JarURLConnection)
 {
-jar = ((JarURLConnection) conn).getJarFile();
+try
+{
+jar = ((JarURLConnection) conn).getJarFile();
+}
+
+catch (Throwable e)
+{
+// This can happen if the classloader provided us a 
URL that it thinks exists
+// but really doesn't.  In particular, if a JAR 
contains META-INF/MANIFEST.MF
+// but not META-INF/, some classloaders may 
incorrectly report that META-INF/
+// exists and we'll end up here.  Just ignore this 
case.
+
+continue;
+}
 }
-
-catch (Throwable e)
+else
 {
-// This can happen if the classloader provided us a URL 
that it thinks exists
-// but really doesn't.  In particular, if a JAR contains 
META-INF/MANIFEST.MF
-// but not META-INF/, some classloaders may incorrectly 
report that META-INF/
-// exists and we'll end up here.  Just ignore this case.
-
-continue;
+jar = _getAlternativeJarFile(url);
 }
+
+if (jar != null)
+{
+_searchJar(loader, result, jar, prefix, suffix);
+}
+else
+{
+if (!_searchDir(result, new 
File(URLDecoder.decode(url.getFile(), "UTF-8")), suffix))
+{
+_searchFromURL(result, prefix, suffix, url);
+}
+}
 }
-else
-{
-jar = _getAlternativeJarFile(url);
-}
-
-if (jar != null)
-{
-_searchJar(loader, result, jar, prefix, suffix);
-}
-else
+finally 
 {
-if (!_searchDir(result, new 
File(URLDecoder.decode(url.getFile(), "UTF-8")), suffix))
+if (jar != null) 
 {
-_searchFromURL(result, prefix, suffix, url);
+jar.close();
 }
 }
 }


 


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


> JarFile never released in oam.view.facelets.util.ClassPath
> --
>
> Key: MYFACES-4273
> URL: https://issues.apache.org/jira/browse/MYFACES-4273
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.0.24, 2.1.18, 2.2.12, 2.3.2, 3.0.0-SNAPSHOT
>Reporter: Bill Lucy
>Assignee: Bill Lucy
>Priority: Minor
>
> JarFiles opened in ClassPath._searchResource() aren't ever closed.  This can 
> cause a leak, and in some environments that causes problems removing apps 
> after shutdown.



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


[jira] [Commented] (MYFACES-4273) JarFile never released in oam.view.facelets.util.ClassPath

2018-12-10 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16715010#comment-16715010
 ] 

ASF GitHub Bot commented on MYFACES-4273:
-

wtlucy closed pull request #35: MYFACES-4273 close() JarFile in Classpath 2.3.x
URL: https://github.com/apache/myfaces/pull/35
 
 
   

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/impl/src/main/java/org/apache/myfaces/view/facelets/util/Classpath.java 
b/impl/src/main/java/org/apache/myfaces/view/facelets/util/Classpath.java
index c82b1b0da..85789169e 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/util/Classpath.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/util/Classpath.java
@@ -83,39 +83,28 @@ private static void _searchResource(Set result, 
ClassLoader loader, String
 conn.setUseCaches(false);
 conn.setDefaultUseCaches(false);
 
-JarFile jar = null;
-if (conn instanceof JarURLConnection)
+try (JarFile jar = (conn instanceof JarURLConnection) ? 
+((JarURLConnection) conn).getJarFile() : 
_getAlternativeJarFile(url))
 {
-try
+if (jar != null)
 {
-jar = ((JarURLConnection) conn).getJarFile();
+_searchJar(loader, result, jar, prefix, suffix);
 }
-
-catch (Throwable e)
+else
 {
-// This can happen if the classloader provided us a URL 
that it thinks exists
-// but really doesn't.  In particular, if a JAR contains 
META-INF/MANIFEST.MF
-// but not META-INF/, some classloaders may incorrectly 
report that META-INF/
-// exists and we'll end up here.  Just ignore this case.
-
-continue;
+if (!_searchDir(result, new 
File(URLDecoder.decode(url.getFile(), "UTF-8")), suffix))
+{
+_searchFromURL(result, prefix, suffix, url);
+}
 }
 }
-else
+catch (Throwable e) 
 {
-jar = _getAlternativeJarFile(url);
-}
-
-if (jar != null)
-{
-_searchJar(loader, result, jar, prefix, suffix);
-}
-else
-{
-if (!_searchDir(result, new 
File(URLDecoder.decode(url.getFile(), "UTF-8")), suffix))
-{
-_searchFromURL(result, prefix, suffix, url);
-}
+// This can happen if the classloader provided us a URL that 
it thinks exists
+// but really doesn't.  In particular, if a JAR contains 
META-INF/MANIFEST.MF
+// but not META-INF/, some classloaders may incorrectly report 
that META-INF/
+// exists and we'll end up here.  Just ignore this case.
+continue;
 }
 }
 }


 


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


> JarFile never released in oam.view.facelets.util.ClassPath
> --
>
> Key: MYFACES-4273
> URL: https://issues.apache.org/jira/browse/MYFACES-4273
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.0.24, 2.1.18, 2.2.12, 2.3.2, 3.0.0-SNAPSHOT
>Reporter: Bill Lucy
>Assignee: Bill Lucy
>Priority: Minor
>
> JarFiles opened in ClassPath._searchResource() aren't ever closed.  This can 
> cause a leak, and in some environments that causes problems removing apps 
> after shutdown.



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


[jira] [Commented] (MYFACES-4273) JarFile never released in oam.view.facelets.util.ClassPath

2018-12-10 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16714998#comment-16714998
 ] 

ASF GitHub Bot commented on MYFACES-4273:
-

wtlucy opened a new pull request #35: MYFACES-4273 close() JarFile in Classpath 
2.3.x
URL: https://github.com/apache/myfaces/pull/35
 
 
   https://issues.apache.org/jira/browse/MYFACES-4267


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


> JarFile never released in oam.view.facelets.util.ClassPath
> --
>
> Key: MYFACES-4273
> URL: https://issues.apache.org/jira/browse/MYFACES-4273
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.0.24, 2.1.18, 2.2.12, 2.3.2, 3.0.0-SNAPSHOT
>Reporter: Bill Lucy
>Assignee: Bill Lucy
>Priority: Minor
>
> JarFiles opened in ClassPath._searchResource() aren't ever closed.  This can 
> cause a leak, and in some environments that causes problems removing apps 
> after shutdown.



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


[jira] [Commented] (MYFACES-4273) JarFile never released in oam.view.facelets.util.ClassPath

2018-12-10 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16714983#comment-16714983
 ] 

ASF GitHub Bot commented on MYFACES-4273:
-

wtlucy closed pull request #34: MYFACES-4273 close() JarFile in Classpath
URL: https://github.com/apache/myfaces/pull/34
 
 
   

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/impl/src/main/java/org/apache/myfaces/view/facelets/util/Classpath.java 
b/impl/src/main/java/org/apache/myfaces/view/facelets/util/Classpath.java
index f570b127d..d457fa9df 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/util/Classpath.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/util/Classpath.java
@@ -83,39 +83,28 @@ private static void _searchResource(Set result, 
ClassLoader loader, String
 conn.setUseCaches(false);
 conn.setDefaultUseCaches(false);
 
-JarFile jar = null;
-if (conn instanceof JarURLConnection)
+try (JarFile jar = (conn instanceof JarURLConnection) ? 
+((JarURLConnection) conn).getJarFile() : 
_getAlternativeJarFile(url))
 {
-try
+if (jar != null)
 {
-jar = ((JarURLConnection) conn).getJarFile();
+_searchJar(loader, result, jar, prefix, suffix);
 }
-
-catch (Throwable e)
+else
 {
-// This can happen if the classloader provided us a URL 
that it thinks exists
-// but really doesn't.  In particular, if a JAR contains 
META-INF/MANIFEST.MF
-// but not META-INF/, some classloaders may incorrectly 
report that META-INF/
-// exists and we'll end up here.  Just ignore this case.
-
-continue;
+if (!_searchDir(result, new 
File(URLDecoder.decode(url.getFile(), "UTF-8")), suffix))
+{
+_searchFromURL(result, prefix, suffix, url);
+}
 }
 }
-else
+catch (Throwable e) 
 {
-jar = _getAlternativeJarFile(url);
-}
-
-if (jar != null)
-{
-_searchJar(loader, result, jar, prefix, suffix);
-}
-else
-{
-if (!_searchDir(result, new 
File(URLDecoder.decode(url.getFile(), "UTF-8")), suffix))
-{
-_searchFromURL(result, prefix, suffix, url);
-}
+// This can happen if the classloader provided us a URL that 
it thinks exists
+// but really doesn't.  In particular, if a JAR contains 
META-INF/MANIFEST.MF
+// but not META-INF/, some classloaders may incorrectly report 
that META-INF/
+// exists and we'll end up here.  Just ignore this case.
+continue;
 }
 }
 }


 


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


> JarFile never released in oam.view.facelets.util.ClassPath
> --
>
> Key: MYFACES-4273
> URL: https://issues.apache.org/jira/browse/MYFACES-4273
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.0.24, 2.1.18, 2.2.12, 2.3.2, 3.0.0-SNAPSHOT
>Reporter: Bill Lucy
>Assignee: Bill Lucy
>Priority: Minor
>
> JarFiles opened in ClassPath._searchResource() aren't ever closed.  This can 
> cause a leak, and in some environments that causes problems removing apps 
> after shutdown.



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


[jira] [Commented] (MYFACES-4273) JarFile never released in oam.view.facelets.util.ClassPath

2018-12-10 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16714944#comment-16714944
 ] 

ASF GitHub Bot commented on MYFACES-4273:
-

wtlucy commented on issue #34: MYFACES-4273 close() JarFile in Classpath
URL: https://github.com/apache/myfaces/pull/34#issuecomment-445860323
 
 
   Yeah, it's the same logic.  I'll put this fix in 2.2, 2.3, and 3.0.


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


> JarFile never released in oam.view.facelets.util.ClassPath
> --
>
> Key: MYFACES-4273
> URL: https://issues.apache.org/jira/browse/MYFACES-4273
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.0.24, 2.1.18, 2.2.12, 2.3.2, 3.0.0-SNAPSHOT
>Reporter: Bill Lucy
>Assignee: Bill Lucy
>Priority: Minor
>
> JarFiles opened in ClassPath._searchResource() aren't ever closed.  This can 
> cause a leak, and in some environments that causes problems removing apps 
> after shutdown.



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


[jira] [Commented] (MYFACES-4273) JarFile never released in oam.view.facelets.util.ClassPath

2018-12-10 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16714878#comment-16714878
 ] 

ASF GitHub Bot commented on MYFACES-4273:
-

tandraschko commented on issue #34: MYFACES-4273 close() JarFile in Classpath
URL: https://github.com/apache/myfaces/pull/34#issuecomment-445849921
 
 
   looks good if it still works the same :)


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


> JarFile never released in oam.view.facelets.util.ClassPath
> --
>
> Key: MYFACES-4273
> URL: https://issues.apache.org/jira/browse/MYFACES-4273
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.0.24, 2.1.18, 2.2.12, 2.3.2, 3.0.0-SNAPSHOT
>Reporter: Bill Lucy
>Assignee: Bill Lucy
>Priority: Minor
>
> JarFiles opened in ClassPath._searchResource() aren't ever closed.  This can 
> cause a leak, and in some environments that causes problems removing apps 
> after shutdown.



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


[jira] [Commented] (MYFACES-4273) JarFile never released in oam.view.facelets.util.ClassPath

2018-12-06 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16712007#comment-16712007
 ] 

ASF GitHub Bot commented on MYFACES-4273:
-

tandraschko commented on issue #34: MYFACES-4273 close() JarFile in Classpath
URL: https://github.com/apache/myfaces/pull/34#issuecomment-445023033
 
 
   basically +1
   however a try/resource statement would be a bit nicer probably :)


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


> JarFile never released in oam.view.facelets.util.ClassPath
> --
>
> Key: MYFACES-4273
> URL: https://issues.apache.org/jira/browse/MYFACES-4273
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.0.24, 2.1.18, 2.2.12, 2.3.2, 3.0.0-SNAPSHOT
>Reporter: Bill Lucy
>Assignee: Bill Lucy
>Priority: Minor
>
> JarFiles opened in ClassPath._searchResource() aren't ever closed.  This can 
> cause a leak, and in some environments that causes problems removing apps 
> after shutdown.



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


[jira] [Commented] (MYFACES-4273) JarFile never released in oam.view.facelets.util.ClassPath

2018-12-05 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16710679#comment-16710679
 ] 

ASF GitHub Bot commented on MYFACES-4273:
-

wtlucy opened a new pull request #34: MYFACES-4273 close() JarFile in Classpath
URL: https://github.com/apache/myfaces/pull/34
 
 
   see https://issues.apache.org/jira/browse/MYFACES-4273


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


> JarFile never released in oam.view.facelets.util.ClassPath
> --
>
> Key: MYFACES-4273
> URL: https://issues.apache.org/jira/browse/MYFACES-4273
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.0.24, 2.1.18, 2.2.12, 2.3.2, 3.0.0-SNAPSHOT
>Reporter: Bill Lucy
>Assignee: Bill Lucy
>Priority: Minor
>
> JarFiles opened in ClassPath._searchResource() aren't ever closed.  This can 
> cause a leak, and in some environments that causes problems removing apps 
> after shutdown.



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


[jira] [Commented] (MYFACES-4267) transient attribute is not inherited from template to final page.

2018-12-05 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4267?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16710654#comment-16710654
 ] 

ASF GitHub Bot commented on MYFACES-4267:
-

wtlucy closed pull request #33: MYFACES-4267 transient template inheritance 
issue - 2.2.x
URL: https://github.com/apache/myfaces/pull/33
 
 
   

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/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java
 
b/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java
index b4c66ae07..8b5d92e7a 100644
--- 
a/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java
+++ 
b/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java
@@ -2117,25 +2117,22 @@ public UIViewRoot restoreView(FacesContext context, 
String viewId)
 {
 view = 
context.getApplication().getViewHandler().createView(context, viewId);
 }
-// If the view is not transient, then something is wrong. 
Throw an exception.
-if (!view.isTransient())
+context.setViewRoot (view); 
+boolean oldContextEventState = context.isProcessingEvents();
+try 
 {
-throw new FacesException ("unable to create view \"" + 
viewId + "\"");
-} 
-else
-{
-context.setViewRoot (view); 
-boolean oldContextEventState = 
context.isProcessingEvents();
-try 
-{
-context.setProcessingEvents (true);
-vdl.buildView (context, view);
-}
-finally
+context.setProcessingEvents (true);
+vdl.buildView (context, view);
+// If the view is not transient, then something is wrong. 
Throw an exception.
+if (!view.isTransient())
 {
-context.setProcessingEvents (oldContextEventState);
+throw new FacesException ("unable to create view \"" + 
viewId + "\"");
 } 
 }
+finally
+{
+context.setProcessingEvents (oldContextEventState);
+} 
 }
 catch (Throwable e)
 {
diff --git 
a/impl/src/test/java/org/apache/myfaces/view/facelets/stateless/StatelessTest.java
 
b/impl/src/test/java/org/apache/myfaces/view/facelets/stateless/StatelessTest.java
new file mode 100644
index 0..c270b6f5d
--- /dev/null
+++ 
b/impl/src/test/java/org/apache/myfaces/view/facelets/stateless/StatelessTest.java
@@ -0,0 +1,93 @@
+/*
+ * 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.myfaces.view.facelets.stateless;
+
+import javax.faces.application.StateManager;
+import javax.faces.component.UICommand;
+import javax.faces.component.UIComponent;
+import javax.faces.render.ResponseStateManager; 
+
+import org.apache.myfaces.mc.test.core.AbstractMyFacesRequestTestCase;
+import org.apache.myfaces.shared.config.MyfacesConfig;
+import org.junit.Assert;
+import org.junit.Ignore;
+import org.junit.Test;
+
+/**
+ *
+ * @author lu4242
+ */
+public class StatelessTest extends AbstractMyFacesRequestTestCase
+{
+
+@Override
+protected boolean isScanAnnotations()
+{
+return true;
+}
+
+@Override
+protected void setUpWebConfigParams() throws Exception
+{
+super.setUpWebConfigParams();
+
servletContext.addInitParameter("org.apache.myfaces.annotation.SCAN_PACKAGES","org.apache.myfaces.view.facelets.stateless");
+
servletContext.addInitParameter(StateManager.STATE_SAVING_METHOD_PARAM_NAME, 

[jira] [Commented] (MYFACES-4267) transient attribute is not inherited from template to final page.

2018-12-05 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4267?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16710652#comment-16710652
 ] 

ASF GitHub Bot commented on MYFACES-4267:
-

wtlucy closed pull request #32: MYFACES-4267 transient template inheritance 
issue - 2.3.x
URL: https://github.com/apache/myfaces/pull/32
 
 
   

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/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java
 
b/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java
index 8ab562dad..693071949 100644
--- 
a/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java
+++ 
b/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java
@@ -2124,25 +2124,23 @@ public UIViewRoot restoreView(FacesContext context, 
String viewId)
 {
 view = 
context.getApplication().getViewHandler().createView(context, viewId);
 }
-// If the view is not transient, then something is wrong. 
Throw an exception.
-if (!view.isTransient())
+context.setViewRoot (view); 
+boolean oldContextEventState = context.isProcessingEvents();
+try 
 {
-throw new FacesException ("unable to create view \"" + 
viewId + "\"");
-} 
-else
-{
-context.setViewRoot (view); 
-boolean oldContextEventState = 
context.isProcessingEvents();
-try 
-{
-context.setProcessingEvents (true);
-vdl.buildView (context, view);
-}
-finally
+context.setProcessingEvents (true);
+vdl.buildView (context, view);
+// If the view is not transient, then something is wrong. 
Throw an exception.
+if (!view.isTransient())
 {
-context.setProcessingEvents (oldContextEventState);
+throw new FacesException ("unable to create view \"" + 
viewId + "\"");
 } 
+
 }
+finally
+{
+context.setProcessingEvents (oldContextEventState);
+} 
 }
 catch (Throwable e)
 {
diff --git 
a/impl/src/test/java/org/apache/myfaces/view/facelets/stateless/StatelessTest.java
 
b/impl/src/test/java/org/apache/myfaces/view/facelets/stateless/StatelessTest.java
index 18e5eac83..9c937e9f1 100644
--- 
a/impl/src/test/java/org/apache/myfaces/view/facelets/stateless/StatelessTest.java
+++ 
b/impl/src/test/java/org/apache/myfaces/view/facelets/stateless/StatelessTest.java
@@ -21,6 +21,8 @@
 import javax.faces.application.StateManager;
 import javax.faces.component.UICommand;
 import javax.faces.component.UIComponent;
+import javax.faces.render.ResponseStateManager; 
+
 import org.apache.myfaces.mc.test.core.AbstractMyFacesRequestTestCase;
 import org.apache.myfaces.shared.config.MyfacesConfig;
 import org.junit.Assert;
@@ -45,87 +47,47 @@ protected void setUpWebConfigParams() throws Exception
 {
 super.setUpWebConfigParams();
 
servletContext.addInitParameter("org.apache.myfaces.annotation.SCAN_PACKAGES","org.apache.myfaces.view.facelets.stateless");
-
servletContext.addInitParameter(StateManager.STATE_SAVING_METHOD_PARAM_NAME, 
StateManager.STATE_SAVING_METHOD_CLIENT);
+
servletContext.addInitParameter(StateManager.STATE_SAVING_METHOD_PARAM_NAME, 
StateManager.STATE_SAVING_METHOD_SERVER);
 servletContext.addInitParameter("javax.faces.PARTIAL_STATE_SAVING", 
"true");
 
servletContext.addInitParameter(MyfacesConfig.INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS,
 "auto");
 
servletContext.addInitParameter("org.apache.myfaces.STRICT_JSF_2_REFRESH_TARGET_AJAX",
 "true");
 }
 
+/**
+ * Verify that a view with a template that has transient set can be 
restored
+ * 
+ * @throws Exception
+ */
 @Test
-public void postWithoutPrependFormId() throws Exception
+public void restoreStatelessTemplateView() throws Exception
 {
 startViewRequest("/stateless.xhtml");
 processLifecycleExecuteAndRender();
-
-Assert.assertTrue(facesContext.getViewRoot().isTransient());
-
-UIComponent form = facesContext.getViewRoot().findComponent("form1");
-UIComponent formButton = 

[jira] [Commented] (MYFACES-4267) transient attribute is not inherited from template to final page.

2018-12-05 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4267?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16710651#comment-16710651
 ] 

ASF GitHub Bot commented on MYFACES-4267:
-

wtlucy closed pull request #28: MYFACES-4267 transient template inheritance 
issue
URL: https://github.com/apache/myfaces/pull/28
 
 
   

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/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java
 
b/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java
index cd417632c..20113ff27 100644
--- 
a/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java
+++ 
b/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java
@@ -2085,24 +2085,22 @@ public UIViewRoot restoreView(FacesContext context, 
String viewId)
 {
 view = viewHandler.createView(context, viewId);
 }
-// If the view is not transient, then something is wrong. 
Throw an exception.
-if (!view.isTransient())
+context.setViewRoot (view); 
+boolean oldContextEventState = context.isProcessingEvents();
+try 
 {
-throw new FacesException ("unable to create view \"" + 
viewId + '"');
-} 
-else
-{
-context.setViewRoot (view); 
-boolean oldContextEventState = 
context.isProcessingEvents();
-try 
+context.setProcessingEvents (true);
+vdl.buildView (context, view);
+
+// If the view is not transient, then something is wrong. 
Throw an exception.
+if (!view.isTransient())
 {
-context.setProcessingEvents (true);
-vdl.buildView (context, view);
+throw new FacesException ("unable to create view \"" + 
viewId + "\"");
 }
-finally
-{
-context.setProcessingEvents(oldContextEventState);
-} 
+}
+finally
+{
+context.setProcessingEvents(oldContextEventState);
 }
 }
 catch (Throwable e)
diff --git 
a/impl/src/test/java/org/apache/myfaces/view/facelets/stateless/StatelessTest.java
 
b/impl/src/test/java/org/apache/myfaces/view/facelets/stateless/StatelessTest.java
index d4f070276..fbb7e71b6 100644
--- 
a/impl/src/test/java/org/apache/myfaces/view/facelets/stateless/StatelessTest.java
+++ 
b/impl/src/test/java/org/apache/myfaces/view/facelets/stateless/StatelessTest.java
@@ -20,6 +20,8 @@
 
 import javax.faces.application.StateManager;
 import javax.faces.component.UIComponent;
+import javax.faces.render.ResponseStateManager;
+
 import org.apache.myfaces.config.MyfacesConfig;
 import org.apache.myfaces.test.core.AbstractMyFacesRequestTestCase;
 import org.junit.Assert;
@@ -42,87 +44,47 @@ protected void setUpWebConfigParams() throws Exception
 {
 super.setUpWebConfigParams();
 
servletContext.addInitParameter("org.apache.myfaces.annotation.SCAN_PACKAGES","org.apache.myfaces.view.facelets.stateless");
-
servletContext.addInitParameter(StateManager.STATE_SAVING_METHOD_PARAM_NAME, 
StateManager.STATE_SAVING_METHOD_CLIENT);
+
servletContext.addInitParameter(StateManager.STATE_SAVING_METHOD_PARAM_NAME, 
StateManager.STATE_SAVING_METHOD_SERVER);
 servletContext.addInitParameter("javax.faces.PARTIAL_STATE_SAVING", 
"true");
 
servletContext.addInitParameter(MyfacesConfig.INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS,
 "auto");
 
servletContext.addInitParameter("org.apache.myfaces.STRICT_JSF_2_REFRESH_TARGET_AJAX",
 "true");
 }
 
+/**
+ * Verify that a view with a template that has transient set can be 
restored
+ * 
+ * @throws Exception
+ */
 @Test
-public void postWithoutPrependFormId() throws Exception
+public void restoreStatelessTemplateView() throws Exception
 {
 startViewRequest("/stateless.xhtml");
 processLifecycleExecuteAndRender();
-
-Assert.assertTrue(facesContext.getViewRoot().isTransient());
-
-UIComponent form = facesContext.getViewRoot().findComponent("form1");
-UIComponent formButton = 
facesContext.getViewRoot().findComponent("form1:smt");
-
-client.submit(formButton);
-
-

[jira] [Commented] (MYFACES-4267) transient attribute is not inherited from template to final page.

2018-11-29 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4267?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16703431#comment-16703431
 ] 

ASF GitHub Bot commented on MYFACES-4267:
-

wtlucy opened a new pull request #33: MYFACES-4267 transient template 
inheritance issue - 2.2.x
URL: https://github.com/apache/myfaces/pull/33
 
 
   https://issues.apache.org/jira/browse/MYFACES-4267


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


> transient attribute is not inherited from template to final page.
> -
>
> Key: MYFACES-4267
> URL: https://issues.apache.org/jira/browse/MYFACES-4267
> Project: MyFaces Core
>  Issue Type: Bug
>  Components: Extension Feature
>Affects Versions: 2.3.2
>Reporter: Antgar
>Priority: Major
> Fix For: 2.3.3, 3.0.0-SNAPSHOT
>
>
> After upgrading from Myfaces 2.2 to 2.3, templated transient views stop to 
> work, raising "unable to create views" exceptions.
> f:view transient attribute defined in a template seems not to be inherited by 
> the final page correctly. With myfaces 2.2 it worked correctly, but in 2.3, 
> there is a new check 
> {code:java}
> if (!view.isTransient()) ...
> {code}
> on FaceletViewDeclarationLanguage line 2128. On page restoring, transient 
> appears as false.
> A workaround is to set transient="true" on the final page too. Other option 
> is to use a block 
> {code:java}
> 
> {code}
> on the final page (f:metadata doc says it shouldn't be used in templates).



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


[jira] [Commented] (MYFACES-4267) transient attribute is not inherited from template to final page.

2018-11-29 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4267?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16703390#comment-16703390
 ] 

ASF GitHub Bot commented on MYFACES-4267:
-

wtlucy opened a new pull request #32: MYFACES-4267 transient template 
inheritance issue
URL: https://github.com/apache/myfaces/pull/32
 
 
   https://issues.apache.org/jira/browse/MYFACES-4267


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


> transient attribute is not inherited from template to final page.
> -
>
> Key: MYFACES-4267
> URL: https://issues.apache.org/jira/browse/MYFACES-4267
> Project: MyFaces Core
>  Issue Type: Bug
>  Components: Extension Feature
>Affects Versions: 2.3.2
>Reporter: Antgar
>Priority: Major
> Fix For: 2.3.3, 3.0.0-SNAPSHOT
>
>
> After upgrading from Myfaces 2.2 to 2.3, templated transient views stop to 
> work, raising "unable to create views" exceptions.
> f:view transient attribute defined in a template seems not to be inherited by 
> the final page correctly. With myfaces 2.2 it worked correctly, but in 2.3, 
> there is a new check 
> {code:java}
> if (!view.isTransient()) ...
> {code}
> on FaceletViewDeclarationLanguage line 2128. On page restoring, transient 
> appears as false.
> A workaround is to set transient="true" on the final page too. Other option 
> is to use a block 
> {code:java}
> 
> {code}
> on the final page (f:metadata doc says it shouldn't be used in templates).



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


[jira] [Commented] (MYFACES-4267) transient attribute is not inherited from template to final page.

2018-11-26 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4267?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16699308#comment-16699308
 ] 

ASF GitHub Bot commented on MYFACES-4267:
-

wtlucy opened a new pull request #28: MYFACES-4267 transient template 
inheritance issue
URL: https://github.com/apache/myfaces/pull/28
 
 
   https://issues.apache.org/jira/browse/MYFACES-4267


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


> transient attribute is not inherited from template to final page.
> -
>
> Key: MYFACES-4267
> URL: https://issues.apache.org/jira/browse/MYFACES-4267
> Project: MyFaces Core
>  Issue Type: Bug
>  Components: Extension Feature
>Affects Versions: 2.3.2
>Reporter: Antgar
>Priority: Major
> Fix For: 2.3.3, 3.0.0-SNAPSHOT
>
>
> After upgrading from Myfaces 2.2 to 2.3, templated transient views stop to 
> work, raising "unable to create views" exceptions.
> f:view transient attribute defined in a template seems not to be inherited by 
> the final page correctly. With myfaces 2.2 it worked correctly, but in 2.3, 
> there is a new check 
> {code:java}
> if (!view.isTransient()) ...
> {code}
> on FaceletViewDeclarationLanguage line 2128. On page restoring, transient 
> appears as false.
> A workaround is to set transient="true" on the final page too. Other option 
> is to use a block 
> {code:java}
> 
> {code}
> on the final page (f:metadata doc says it shouldn't be used in templates).



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


[jira] [Commented] (MYFACES-4266) Ajax update fails due to invalid characters in response XML (DoS)

2018-11-26 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16698621#comment-16698621
 ] 

ASF GitHub Bot commented on MYFACES-4266:
-

tandraschko closed pull request #27: MYFACES-4266: Ajax update fails due to 
invalid characters in response XML (DoS)
URL: https://github.com/apache/myfaces/pull/27
 
 
   

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/impl/src/main/java/org/apache/myfaces/context/PartialResponseWriterImpl.java 
b/impl/src/main/java/org/apache/myfaces/context/PartialResponseWriterImpl.java
index 0566f9998..a29529132 100644
--- 
a/impl/src/main/java/org/apache/myfaces/context/PartialResponseWriterImpl.java
+++ 
b/impl/src/main/java/org/apache/myfaces/context/PartialResponseWriterImpl.java
@@ -29,6 +29,7 @@
 import javax.faces.context.ResponseWriter;
 
 import org.apache.myfaces.util.CDataEndEscapeFilterWriter;
+import org.apache.myfaces.util.IllegalXmlCharacterFilterWriter;
 
 /**
  * 
@@ -110,7 +111,7 @@ public void setDoubleBuffer(Writer doubleBuffer)
 
 public PartialResponseWriterImpl(ResponseWriter writer)
 {
-super(writer);
+super(writer.cloneWithWriter(new 
IllegalXmlCharacterFilterWriter(writer)));
 }
 
 @Override
@@ -129,7 +130,7 @@ public void startCDATA() throws IOException
 
 private void openDoubleBuffer()
 {
-_doubleBuffer = new 
CDataEndEscapeFilterWriter(_cdataDoubleBufferWriter == null ? 
+_doubleBuffer = new 
CDataEndEscapeFilterWriter(_cdataDoubleBufferWriter == null ?
 this.getWrapped() : _cdataDoubleBufferWriter );
 _cdataDoubleBufferWriter = getWrapped().cloneWithWriter(_doubleBuffer);
 
diff --git 
a/impl/src/main/java/org/apache/myfaces/util/IllegalXmlCharacterFilterWriter.java
 
b/impl/src/main/java/org/apache/myfaces/util/IllegalXmlCharacterFilterWriter.java
new file mode 100644
index 0..05830c82e
--- /dev/null
+++ 
b/impl/src/main/java/org/apache/myfaces/util/IllegalXmlCharacterFilterWriter.java
@@ -0,0 +1,84 @@
+/*
+ * 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.myfaces.util;
+
+import java.io.FilterWriter;
+import java.io.IOException;
+import java.io.Writer;
+
+/**
+ * There are unicodes outside the ranges defined in the https://www.w3.org/TR/REC-xml/#charsets;>XML 1.0 specification that 
break XML parsers
+ * and therefore must be filtered out when writing partial responses. 
Otherwise this may lead to Denial of Service attacks.
+ * @see https://issues.apache.org/jira/browse/MYFACES-4266
+ */
+public class IllegalXmlCharacterFilterWriter extends FilterWriter
+{
+public IllegalXmlCharacterFilterWriter(Writer out)
+{
+super(out);
+}
+
+@Override
+public void write(int c) throws IOException 
+{
+super.write(xmlEncode((char) c));
+}
+
+@Override
+public void write(char[] cbuf, int off, int len) throws IOException 
+{
+super.write(xmlEncode(cbuf), off, len);
+}
+
+@Override
+public void write(String str, int off, int len) throws IOException 
+{
+super.write(new String(xmlEncode(str.toCharArray())), off, len);
+}
+
+private char[] xmlEncode(char[] ca)
+{
+for (int i = 0; i < ca.length; i++)
+{
+ca[i] = xmlEncode(ca[i]);
+}
+return ca;
+}
+
+private char xmlEncode(char c)
+{
+if (Character.isSurrogate(c)) 
+{
+return ' ';
+}
+if (c == '\u0009' || c == '\n' || c == '\r') 
+{
+return c;
+}
+if (c > '\u0020' && c < '\uD7FF') 
+{
+return c;
+}
+if (c > '\uE000' && c < '\uFFFD') 
+{
+return c;
+}
+return ' ';
+}
+}
diff --git 
a/impl/src/test/java/org/apache/myfaces/context/PartialResponseWriterImplTest.java
 

[jira] [Commented] (MYFACES-4266) Ajax update fails due to invalid characters in response XML (DoS)

2018-11-25 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16698501#comment-16698501
 ] 

ASF GitHub Bot commented on MYFACES-4266:
-

cnsgithub edited a comment on issue #27: MYFACES-4266: Ajax update fails due to 
invalid characters in response XML (DoS)
URL: https://github.com/apache/myfaces/pull/27#issuecomment-441527197
 
 
   > 1. all right, it would be just cool if we would have some more tests which 
also covers other #write methods or even writeAttribute - but not required
   
   Provided another test for `writeAttribute`.
   
   > 2. Oh, really sorry -  thats my fault because of a too fast review. I 
thought that you would wrap a simple char with a string now.
   >I would just do:
   > 
   > ` @Override public void write(String str, int off, int len) throws 
IOException { super.write(new String(xmlEncode(str.toCharArray())), off, len); 
}`
   
   Done.
   
   > I just wonder if we should replace the invalid char by a blank instead of 
empty? Not sure...
   
   Also considered this. However, it would complicate things since array 
lengths might change then. When looking at OWASP's encoder you'll find they 
also replace illegal characters by spaces.
   


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


> Ajax update fails due to invalid characters in response XML (DoS)
> -
>
> Key: MYFACES-4266
> URL: https://issues.apache.org/jira/browse/MYFACES-4266
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.3.2
> Environment: jetty 9.4.14.v20181114
> JDK 10
>Reporter: cnsgithub
>Priority: Major
>
> I noticed that the {{}} update fails when the updated form contains 
> unicode characters, which are not allowed in the [XML 1.0 
> spec|https://www.w3.org/TR/REC-xml/#charsets].
> h2. Expected Behaviour
> If the update response contains characters that are not allowed in XML, they 
> should be filtered by MyFaces before writing the response.
> h2. Actual Behaviour
> Some illegal XML characters are not filtered and therefore the browser fails 
> to parse the response.
> h2. Steps to reproduce
> I created a small github project to reproduce this behaviour: 
> [https://github.com/cnsgithub/mojarra-ajax/tree/myfaces] (branch myfaces)
>  To reproduce:
>  - {{git clone [https://github.com/cnsgithub/mojarra-ajax]}}
>  - {{git checkout myfaces}}
>  - run {{mvn clean package jetty:run}}
>  - after the server has started, open [http://localhost:8080/index.xhtml]
>  - Click the button, the error should occur
> The issue also occurs with user supplied inputs:
>  - open [http://localhost:8080/input.xhtml]
>  - Paste the characters from the {{illegal-xml-chars.txt}} file into the 
> input field
>  - Click the button
> This issue should be addressed with high priority since it is security 
> related (might be exploited for Denial of Service).



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


[jira] [Commented] (MYFACES-4266) Ajax update fails due to invalid characters in response XML (DoS)

2018-11-25 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16698499#comment-16698499
 ] 

ASF GitHub Bot commented on MYFACES-4266:
-

cnsgithub commented on issue #27: MYFACES-4266: Ajax update fails due to 
invalid characters in response XML (DoS)
URL: https://github.com/apache/myfaces/pull/27#issuecomment-441527197
 
 
   > 1. all right, it would be just cool if we would have some more tests which 
also covers other #write methods or even writeAttribute - but not required
   
   Provided another test for `writeAttribute`.
   
   > 2. Oh, really sorry -  thats my fault because of a too fast review. I 
thought that you would wrap a simple char with a string now.
   >I would just do:
   > 
   > ` @Override public void write(String str, int off, int len) throws 
IOException { super.write(new String(xmlEncode(str.toCharArray())), off, len); 
}`
   
   Done.
   
   > I just wonder if we should replace the invalid char by a blank instead of 
empty? Not sure...
   
   Also considered this. However, it would complicate things since array 
lengths might change then. When looking at OWASP's encoder you'll find they're 
also replacing illegal characters by spaces.
   


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


> Ajax update fails due to invalid characters in response XML (DoS)
> -
>
> Key: MYFACES-4266
> URL: https://issues.apache.org/jira/browse/MYFACES-4266
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.3.2
> Environment: jetty 9.4.14.v20181114
> JDK 10
>Reporter: cnsgithub
>Priority: Major
>
> I noticed that the {{}} update fails when the updated form contains 
> unicode characters, which are not allowed in the [XML 1.0 
> spec|https://www.w3.org/TR/REC-xml/#charsets].
> h2. Expected Behaviour
> If the update response contains characters that are not allowed in XML, they 
> should be filtered by MyFaces before writing the response.
> h2. Actual Behaviour
> Some illegal XML characters are not filtered and therefore the browser fails 
> to parse the response.
> h2. Steps to reproduce
> I created a small github project to reproduce this behaviour: 
> [https://github.com/cnsgithub/mojarra-ajax/tree/myfaces] (branch myfaces)
>  To reproduce:
>  - {{git clone [https://github.com/cnsgithub/mojarra-ajax]}}
>  - {{git checkout myfaces}}
>  - run {{mvn clean package jetty:run}}
>  - after the server has started, open [http://localhost:8080/index.xhtml]
>  - Click the button, the error should occur
> The issue also occurs with user supplied inputs:
>  - open [http://localhost:8080/input.xhtml]
>  - Paste the characters from the {{illegal-xml-chars.txt}} file into the 
> input field
>  - Click the button
> This issue should be addressed with high priority since it is security 
> related (might be exploited for Denial of Service).



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


[jira] [Commented] (MYFACES-4266) Ajax update fails due to invalid characters in response XML (DoS)

2018-11-25 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16698329#comment-16698329
 ] 

ASF GitHub Bot commented on MYFACES-4266:
-

tandraschko commented on issue #27: MYFACES-4266: Ajax update fails due to 
invalid characters in response XML (DoS)
URL: https://github.com/apache/myfaces/pull/27#issuecomment-441476483
 
 
   1) all right, it would be just cool if we would have some more tests which 
also covers other #write methods or even writeAttribute - but not required 
   2) Oh, really sorry -  thats my fault because of a too fast review. I 
thought that you would wrap a simple char with a string now.
   I would just do:
   
   `@Override
   public void write(String str, int off, int len) throws IOException 
   {
   super.write(new String(xmlEncode(str.toCharArray())), off, len);
   }`
   
   I just wonder if we should replace the invalid char by a blank instead of 
empty? Not sure...
   


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


> Ajax update fails due to invalid characters in response XML (DoS)
> -
>
> Key: MYFACES-4266
> URL: https://issues.apache.org/jira/browse/MYFACES-4266
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.3.2
> Environment: jetty 9.4.14.v20181114
> JDK 10
>Reporter: cnsgithub
>Priority: Major
>
> I noticed that the {{}} update fails when the updated form contains 
> unicode characters, which are not allowed in the [XML 1.0 
> spec|https://www.w3.org/TR/REC-xml/#charsets].
> h2. Expected Behaviour
> If the update response contains characters that are not allowed in XML, they 
> should be filtered by MyFaces before writing the response.
> h2. Actual Behaviour
> Some illegal XML characters are not filtered and therefore the browser fails 
> to parse the response.
> h2. Steps to reproduce
> I created a small github project to reproduce this behaviour: 
> [https://github.com/cnsgithub/mojarra-ajax/tree/myfaces] (branch myfaces)
>  To reproduce:
>  - {{git clone [https://github.com/cnsgithub/mojarra-ajax]}}
>  - {{git checkout myfaces}}
>  - run {{mvn clean package jetty:run}}
>  - after the server has started, open [http://localhost:8080/index.xhtml]
>  - Click the button, the error should occur
> The issue also occurs with user supplied inputs:
>  - open [http://localhost:8080/input.xhtml]
>  - Paste the characters from the {{illegal-xml-chars.txt}} file into the 
> input field
>  - Click the button
> This issue should be addressed with high priority since it is security 
> related (might be exploited for Denial of Service).



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


[jira] [Commented] (MYFACES-4266) Ajax update fails due to invalid characters in response XML (DoS)

2018-11-25 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16698244#comment-16698244
 ] 

ASF GitHub Bot commented on MYFACES-4266:
-

cnsgithub commented on issue #27: MYFACES-4266: Ajax update fails due to 
invalid characters in response XML (DoS)
URL: https://github.com/apache/myfaces/pull/27#issuecomment-441461685
 
 
   > 1. I think we should overwrite all #write methods, to cover 100% all 
cases?! Probably also writeText?
   
   I think the remaining `writeXXX` methods operate on a higher abstraction 
level and internally call the low level methods like the ones that have already 
been overridden. The provided unit test is already testing `writeText` to 
verify this assumption.
   
   > 2. all #write methods should call the same super.write - currently the 
write(String) calls super.write(char[]) to avoid confusion (and maybe but 
unlikely bugs)
   
   I am a bit confused as this statement seems to be in contrast to what you 
have written in your first review. Afterwards I changed the behavior in 
https://github.com/apache/myfaces/pull/27/commits/c89e67fd1f5c9456f53f3a3c13b5123da510b632
 to fit your requirement.

   > JFYI: you can also use a for-each loop when looping over arrays, we just 
avoid it on ArrayLists, to avoid a iterator instance (ArrayLists are used for 
component lists e.g. and the component tree is traversed very often)
   
   Ok, good to know. However, in this special case it's probably necessary to 
have a counter since we don't want to copy the array, instead we want to modify 
the contents of the existing array.
   


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


> Ajax update fails due to invalid characters in response XML (DoS)
> -
>
> Key: MYFACES-4266
> URL: https://issues.apache.org/jira/browse/MYFACES-4266
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.3.2
> Environment: jetty 9.4.14.v20181114
> JDK 10
>Reporter: cnsgithub
>Priority: Major
>
> I noticed that the {{}} update fails when the updated form contains 
> unicode characters, which are not allowed in the [XML 1.0 
> spec|https://www.w3.org/TR/REC-xml/#charsets].
> h2. Expected Behaviour
> If the update response contains characters that are not allowed in XML, they 
> should be filtered by MyFaces before writing the response.
> h2. Actual Behaviour
> Some illegal XML characters are not filtered and therefore the browser fails 
> to parse the response.
> h2. Steps to reproduce
> I created a small github project to reproduce this behaviour: 
> [https://github.com/cnsgithub/mojarra-ajax/tree/myfaces] (branch myfaces)
>  To reproduce:
>  - {{git clone [https://github.com/cnsgithub/mojarra-ajax]}}
>  - {{git checkout myfaces}}
>  - run {{mvn clean package jetty:run}}
>  - after the server has started, open [http://localhost:8080/index.xhtml]
>  - Click the button, the error should occur
> The issue also occurs with user supplied inputs:
>  - open [http://localhost:8080/input.xhtml]
>  - Paste the characters from the {{illegal-xml-chars.txt}} file into the 
> input field
>  - Click the button
> This issue should be addressed with high priority since it is security 
> related (might be exploited for Denial of Service).



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


[jira] [Commented] (MYFACES-4266) Ajax update fails due to invalid characters in response XML (DoS)

2018-11-23 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16696530#comment-16696530
 ] 

ASF GitHub Bot commented on MYFACES-4266:
-

tandraschko commented on issue #27: MYFACES-4266: Ajax update fails due to 
invalid characters in response XML (DoS)
URL: https://github.com/apache/myfaces/pull/27#issuecomment-441182397
 
 
   cool :D
   
   I'm a just a bit unsure... The current version will work but maybe it's a 
bit "unattractive".
   
   1) I think we should overwrite all #write methods, to cover 100% all cases?! 
Probably also writeText?
   2) all #write methods should call the same super.write - currently the 
write(String) calls super.write(char[]) to avoid confusion (and maybe but 
unlikely bugs)
   
   JFYI: you can also use a for-each loop when looping over arrays, we just 
avoid it on ArrayLists, to avoid a iterator instance (ArrayLists are used for 
component lists e.g. and the component tree is traversed very often)
   


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


> Ajax update fails due to invalid characters in response XML (DoS)
> -
>
> Key: MYFACES-4266
> URL: https://issues.apache.org/jira/browse/MYFACES-4266
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.3.2
> Environment: jetty 9.4.14.v20181114
> JDK 10
>Reporter: cnsgithub
>Priority: Major
>
> I noticed that the {{}} update fails when the updated form contains 
> unicode characters, which are not allowed in the [XML 1.0 
> spec|https://www.w3.org/TR/REC-xml/#charsets].
> h2. Expected Behaviour
> If the update response contains characters that are not allowed in XML, they 
> should be filtered by MyFaces before writing the response.
> h2. Actual Behaviour
> Some illegal XML characters are not filtered and therefore the browser fails 
> to parse the response.
> h2. Steps to reproduce
> I created a small github project to reproduce this behaviour: 
> [https://github.com/cnsgithub/mojarra-ajax/tree/myfaces] (branch myfaces)
>  To reproduce:
>  - {{git clone [https://github.com/cnsgithub/mojarra-ajax]}}
>  - {{git checkout myfaces}}
>  - run {{mvn clean package jetty:run}}
>  - after the server has started, open [http://localhost:8080/index.xhtml]
>  - Click the button, the error should occur
> The issue also occurs with user supplied inputs:
>  - open [http://localhost:8080/input.xhtml]
>  - Paste the characters from the {{illegal-xml-chars.txt}} file into the 
> input field
>  - Click the button
> This issue should be addressed with high priority since it is security 
> related (might be exploited for Denial of Service).



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


[jira] [Commented] (MYFACES-4266) Ajax update fails due to invalid characters in response XML (DoS)

2018-11-22 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16696446#comment-16696446
 ] 

ASF GitHub Bot commented on MYFACES-4266:
-

cnsgithub edited a comment on issue #27: MYFACES-4266: Ajax update fails due to 
invalid characters in response XML (DoS)
URL: https://github.com/apache/myfaces/pull/27#issuecomment-441158458
 
 
   > Of course - but this methods uses char and char[]:
   > 
   > ```
   > public void write(int c) throws IOException 
   > public void write(char[] cbuf, int off, int len) throws IOException 
   > ```
   > There is no need to wrap it by a string
   
   Sorry, I don't see any problem here since `xmlEncode` has been overloaded 
three times to fit all `write` variations, i.e. `write(char[],int,in) `is using 
`xmlEncode(char[])`, `write(int) `is using `xmlEncode(char)` and just 
`write(String,off,len) `is using `xmlEncode(String)`.
   
   Edit: @tandraschko Okay, now I see, just added another commit. :wink: 


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


> Ajax update fails due to invalid characters in response XML (DoS)
> -
>
> Key: MYFACES-4266
> URL: https://issues.apache.org/jira/browse/MYFACES-4266
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.3.2
> Environment: jetty 9.4.14.v20181114
> JDK 10
>Reporter: cnsgithub
>Priority: Major
>
> I noticed that the {{}} update fails when the updated form contains 
> unicode characters, which are not allowed in the [XML 1.0 
> spec|https://www.w3.org/TR/REC-xml/#charsets].
> h2. Expected Behaviour
> If the update response contains characters that are not allowed in XML, they 
> should be filtered by MyFaces before writing the response.
> h2. Actual Behaviour
> Some illegal XML characters are not filtered and therefore the browser fails 
> to parse the response.
> h2. Steps to reproduce
> I created a small github project to reproduce this behaviour: 
> [https://github.com/cnsgithub/mojarra-ajax/tree/myfaces] (branch myfaces)
>  To reproduce:
>  - {{git clone [https://github.com/cnsgithub/mojarra-ajax]}}
>  - {{git checkout myfaces}}
>  - run {{mvn clean package jetty:run}}
>  - after the server has started, open [http://localhost:8080/index.xhtml]
>  - Click the button, the error should occur
> The issue also occurs with user supplied inputs:
>  - open [http://localhost:8080/input.xhtml]
>  - Paste the characters from the {{illegal-xml-chars.txt}} file into the 
> input field
>  - Click the button
> This issue should be addressed with high priority since it is security 
> related (might be exploited for Denial of Service).



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


[jira] [Commented] (MYFACES-4266) Ajax update fails due to invalid characters in response XML (DoS)

2018-11-22 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16696388#comment-16696388
 ] 

ASF GitHub Bot commented on MYFACES-4266:
-

cnsgithub commented on issue #27: MYFACES-4266: Ajax update fails due to 
invalid characters in response XML (DoS)
URL: https://github.com/apache/myfaces/pull/27#issuecomment-441158458
 
 
   > Of course - but this methods uses char and char[]:
   > 
   > ```
   > public void write(int c) throws IOException 
   > public void write(char[] cbuf, int off, int len) throws IOException 
   > ```
   > There is no need to wrap it by a string
   
   Sorry, I don't see any problem here since `xmlEncode` has been overloaded 
three times to fit all `write` variations, i.e. `write(char[],int,in) `is using 
`xmlEncode(char[])`, `write(int) `is using `xmlEncode(char)` and just 
`write(String,off,len) `is using `xmlEncode(String)`.


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


> Ajax update fails due to invalid characters in response XML (DoS)
> -
>
> Key: MYFACES-4266
> URL: https://issues.apache.org/jira/browse/MYFACES-4266
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.3.2
> Environment: jetty 9.4.14.v20181114
> JDK 10
>Reporter: cnsgithub
>Priority: Major
>
> I noticed that the {{}} update fails when the updated form contains 
> unicode characters, which are not allowed in the [XML 1.0 
> spec|https://www.w3.org/TR/REC-xml/#charsets].
> h2. Expected Behaviour
> If the update response contains characters that are not allowed in XML, they 
> should be filtered by MyFaces before writing the response.
> h2. Actual Behaviour
> Some illegal XML characters are not filtered and therefore the browser fails 
> to parse the response.
> h2. Steps to reproduce
> I created a small github project to reproduce this behaviour: 
> [https://github.com/cnsgithub/mojarra-ajax/tree/myfaces] (branch myfaces)
>  To reproduce:
>  - {{git clone [https://github.com/cnsgithub/mojarra-ajax]}}
>  - {{git checkout myfaces}}
>  - run {{mvn clean package jetty:run}}
>  - after the server has started, open [http://localhost:8080/index.xhtml]
>  - Click the button, the error should occur
> The issue also occurs with user supplied inputs:
>  - open [http://localhost:8080/input.xhtml]
>  - Paste the characters from the {{illegal-xml-chars.txt}} file into the 
> input field
>  - Click the button
> This issue should be addressed with high priority since it is security 
> related (might be exploited for Denial of Service).



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


[jira] [Commented] (MYFACES-4266) Ajax update fails due to invalid characters in response XML (DoS)

2018-11-22 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16696021#comment-16696021
 ] 

ASF GitHub Bot commented on MYFACES-4266:
-

melloware commented on issue #27: MYFACES-4266: Ajax update fails due to 
invalid characters in response XML (DoS)
URL: https://github.com/apache/myfaces/pull/27#issuecomment-441063132
 
 
   Ahh I see what you mean just override those write methods and process each 
char.


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


> Ajax update fails due to invalid characters in response XML (DoS)
> -
>
> Key: MYFACES-4266
> URL: https://issues.apache.org/jira/browse/MYFACES-4266
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.3.2
> Environment: jetty 9.4.14.v20181114
> JDK 10
>Reporter: cnsgithub
>Priority: Major
>
> I noticed that the {{}} update fails when the updated form contains 
> unicode characters, which are not allowed in the [XML 1.0 
> spec|https://www.w3.org/TR/REC-xml/#charsets].
> h2. Expected Behaviour
> If the update response contains characters that are not allowed in XML, they 
> should be filtered by MyFaces before writing the response.
> h2. Actual Behaviour
> Some illegal XML characters are not filtered and therefore the browser fails 
> to parse the response.
> h2. Steps to reproduce
> I created a small github project to reproduce this behaviour: 
> [https://github.com/cnsgithub/mojarra-ajax/tree/myfaces] (branch myfaces)
>  To reproduce:
>  - {{git clone [https://github.com/cnsgithub/mojarra-ajax]}}
>  - {{git checkout myfaces}}
>  - run {{mvn clean package jetty:run}}
>  - after the server has started, open [http://localhost:8080/index.xhtml]
>  - Click the button, the error should occur
> The issue also occurs with user supplied inputs:
>  - open [http://localhost:8080/input.xhtml]
>  - Paste the characters from the {{illegal-xml-chars.txt}} file into the 
> input field
>  - Click the button
> This issue should be addressed with high priority since it is security 
> related (might be exploited for Denial of Service).



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


[jira] [Commented] (MYFACES-4266) Ajax update fails due to invalid characters in response XML (DoS)

2018-11-22 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16695991#comment-16695991
 ] 

ASF GitHub Bot commented on MYFACES-4266:
-

tandraschko commented on issue #27: MYFACES-4266: Ajax update fails due to 
invalid characters in response XML (DoS)
URL: https://github.com/apache/myfaces/pull/27#issuecomment-441056944
 
 
   Of course - but this methods uses char and char[]:
   
   public void write(int c) throws IOException 
   public void write(char[] cbuf, int off, int len) throws IOException 
   
   There is no neead to wrap it by a string


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


> Ajax update fails due to invalid characters in response XML (DoS)
> -
>
> Key: MYFACES-4266
> URL: https://issues.apache.org/jira/browse/MYFACES-4266
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.3.2
> Environment: jetty 9.4.14.v20181114
> JDK 10
>Reporter: cnsgithub
>Priority: Major
>
> I noticed that the {{}} update fails when the updated form contains 
> unicode characters, which are not allowed in the [XML 1.0 
> spec|https://www.w3.org/TR/REC-xml/#charsets].
> h2. Expected Behaviour
> If the update response contains characters that are not allowed in XML, they 
> should be filtered by MyFaces before writing the response.
> h2. Actual Behaviour
> Some illegal XML characters are not filtered and therefore the browser fails 
> to parse the response.
> h2. Steps to reproduce
> I created a small github project to reproduce this behaviour: 
> [https://github.com/cnsgithub/mojarra-ajax/tree/myfaces] (branch myfaces)
>  To reproduce:
>  - {{git clone [https://github.com/cnsgithub/mojarra-ajax]}}
>  - {{git checkout myfaces}}
>  - run {{mvn clean package jetty:run}}
>  - after the server has started, open [http://localhost:8080/index.xhtml]
>  - Click the button, the error should occur
> The issue also occurs with user supplied inputs:
>  - open [http://localhost:8080/input.xhtml]
>  - Paste the characters from the {{illegal-xml-chars.txt}} file into the 
> input field
>  - Click the button
> This issue should be addressed with high priority since it is security 
> related (might be exploited for Denial of Service).



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


[jira] [Commented] (MYFACES-4266) Ajax update fails due to invalid characters in response XML (DoS)

2018-11-22 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16695992#comment-16695992
 ] 

ASF GitHub Bot commented on MYFACES-4266:
-

tandraschko edited a comment on issue #27: MYFACES-4266: Ajax update fails due 
to invalid characters in response XML (DoS)
URL: https://github.com/apache/myfaces/pull/27#issuecomment-441056944
 
 
   Of course - but this methods uses char and char[]:
   
   public void write(int c) throws IOException 
   public void write(char[] cbuf, int off, int len) throws IOException 
   
   There is no need to wrap it by a string


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


> Ajax update fails due to invalid characters in response XML (DoS)
> -
>
> Key: MYFACES-4266
> URL: https://issues.apache.org/jira/browse/MYFACES-4266
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.3.2
> Environment: jetty 9.4.14.v20181114
> JDK 10
>Reporter: cnsgithub
>Priority: Major
>
> I noticed that the {{}} update fails when the updated form contains 
> unicode characters, which are not allowed in the [XML 1.0 
> spec|https://www.w3.org/TR/REC-xml/#charsets].
> h2. Expected Behaviour
> If the update response contains characters that are not allowed in XML, they 
> should be filtered by MyFaces before writing the response.
> h2. Actual Behaviour
> Some illegal XML characters are not filtered and therefore the browser fails 
> to parse the response.
> h2. Steps to reproduce
> I created a small github project to reproduce this behaviour: 
> [https://github.com/cnsgithub/mojarra-ajax/tree/myfaces] (branch myfaces)
>  To reproduce:
>  - {{git clone [https://github.com/cnsgithub/mojarra-ajax]}}
>  - {{git checkout myfaces}}
>  - run {{mvn clean package jetty:run}}
>  - after the server has started, open [http://localhost:8080/index.xhtml]
>  - Click the button, the error should occur
> The issue also occurs with user supplied inputs:
>  - open [http://localhost:8080/input.xhtml]
>  - Paste the characters from the {{illegal-xml-chars.txt}} file into the 
> input field
>  - Click the button
> This issue should be addressed with high priority since it is security 
> related (might be exploited for Denial of Service).



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


[jira] [Commented] (MYFACES-4266) Ajax update fails due to invalid characters in response XML (DoS)

2018-11-22 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16695983#comment-16695983
 ] 

ASF GitHub Bot commented on MYFACES-4266:
-

melloware commented on issue #27: MYFACES-4266: Ajax update fails due to 
invalid characters in response XML (DoS)
URL: https://github.com/apache/myfaces/pull/27#issuecomment-441055497
 
 
   @tandraschko I think since Strings are immutable you will have no choice but 
to create a new String but I could be wrong. 


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


> Ajax update fails due to invalid characters in response XML (DoS)
> -
>
> Key: MYFACES-4266
> URL: https://issues.apache.org/jira/browse/MYFACES-4266
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.3.2
> Environment: jetty 9.4.14.v20181114
> JDK 10
>Reporter: cnsgithub
>Priority: Major
>
> I noticed that the {{}} update fails when the updated form contains 
> unicode characters, which are not allowed in the [XML 1.0 
> spec|https://www.w3.org/TR/REC-xml/#charsets].
> h2. Expected Behaviour
> If the update response contains characters that are not allowed in XML, they 
> should be filtered by MyFaces before writing the response.
> h2. Actual Behaviour
> Some illegal XML characters are not filtered and therefore the browser fails 
> to parse the response.
> h2. Steps to reproduce
> I created a small github project to reproduce this behaviour: 
> [https://github.com/cnsgithub/mojarra-ajax/tree/myfaces] (branch myfaces)
>  To reproduce:
>  - {{git clone [https://github.com/cnsgithub/mojarra-ajax]}}
>  - {{git checkout myfaces}}
>  - run {{mvn clean package jetty:run}}
>  - after the server has started, open [http://localhost:8080/index.xhtml]
>  - Click the button, the error should occur
> The issue also occurs with user supplied inputs:
>  - open [http://localhost:8080/input.xhtml]
>  - Paste the characters from the {{illegal-xml-chars.txt}} file into the 
> input field
>  - Click the button
> This issue should be addressed with high priority since it is security 
> related (might be exploited for Denial of Service).



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


[jira] [Commented] (MYFACES-4266) Ajax update fails due to invalid characters in response XML (DoS)

2018-11-22 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16695954#comment-16695954
 ] 

ASF GitHub Bot commented on MYFACES-4266:
-

tandraschko edited a comment on issue #27: MYFACES-4266: Ajax update fails due 
to invalid characters in response XML (DoS)
URL: https://github.com/apache/myfaces/pull/27#issuecomment-441049008
 
 
   thanks, really appreciate new contributors!
   
   i just wonder if we could implement it without always creating a new String? 
(we could just loop the char array)
   In MyFaces we are very performance "sensitiv" ;)
   
   WDYT @pnicolucci @ebreijo ?


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


> Ajax update fails due to invalid characters in response XML (DoS)
> -
>
> Key: MYFACES-4266
> URL: https://issues.apache.org/jira/browse/MYFACES-4266
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.3.2
> Environment: jetty 9.4.14.v20181114
> JDK 10
>Reporter: cnsgithub
>Priority: Major
>
> I noticed that the {{}} update fails when the updated form contains 
> unicode characters, which are not allowed in the [XML 1.0 
> spec|https://www.w3.org/TR/REC-xml/#charsets].
> h2. Expected Behaviour
> If the update response contains characters that are not allowed in XML, they 
> should be filtered by MyFaces before writing the response.
> h2. Actual Behaviour
> Some illegal XML characters are not filtered and therefore the browser fails 
> to parse the response.
> h2. Steps to reproduce
> I created a small github project to reproduce this behaviour: 
> [https://github.com/cnsgithub/mojarra-ajax/tree/myfaces] (branch myfaces)
>  To reproduce:
>  - {{git clone [https://github.com/cnsgithub/mojarra-ajax]}}
>  - {{git checkout myfaces}}
>  - run {{mvn clean package jetty:run}}
>  - after the server has started, open [http://localhost:8080/index.xhtml]
>  - Click the button, the error should occur
> The issue also occurs with user supplied inputs:
>  - open [http://localhost:8080/input.xhtml]
>  - Paste the characters from the {{illegal-xml-chars.txt}} file into the 
> input field
>  - Click the button
> This issue should be addressed with high priority since it is security 
> related (might be exploited for Denial of Service).



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


[jira] [Commented] (MYFACES-4266) Ajax update fails due to invalid characters in response XML (DoS)

2018-11-22 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16695953#comment-16695953
 ] 

ASF GitHub Bot commented on MYFACES-4266:
-

tandraschko commented on issue #27: MYFACES-4266: Ajax update fails due to 
invalid characters in response XML (DoS)
URL: https://github.com/apache/myfaces/pull/27#issuecomment-441049008
 
 
   thanks, really appreciate new contributors!
   
   i just wonder if we could implement it without always creating a new String?
   In MyFaces we are very performance "sensitiv" ;)
   
   WDYT @pnicolucci @ebreijo ?


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


> Ajax update fails due to invalid characters in response XML (DoS)
> -
>
> Key: MYFACES-4266
> URL: https://issues.apache.org/jira/browse/MYFACES-4266
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.3.2
> Environment: jetty 9.4.14.v20181114
> JDK 10
>Reporter: cnsgithub
>Priority: Major
>
> I noticed that the {{}} update fails when the updated form contains 
> unicode characters, which are not allowed in the [XML 1.0 
> spec|https://www.w3.org/TR/REC-xml/#charsets].
> h2. Expected Behaviour
> If the update response contains characters that are not allowed in XML, they 
> should be filtered by MyFaces before writing the response.
> h2. Actual Behaviour
> Some illegal XML characters are not filtered and therefore the browser fails 
> to parse the response.
> h2. Steps to reproduce
> I created a small github project to reproduce this behaviour: 
> [https://github.com/cnsgithub/mojarra-ajax/tree/myfaces] (branch myfaces)
>  To reproduce:
>  - {{git clone [https://github.com/cnsgithub/mojarra-ajax]}}
>  - {{git checkout myfaces}}
>  - run {{mvn clean package jetty:run}}
>  - after the server has started, open [http://localhost:8080/index.xhtml]
>  - Click the button, the error should occur
> The issue also occurs with user supplied inputs:
>  - open [http://localhost:8080/input.xhtml]
>  - Paste the characters from the {{illegal-xml-chars.txt}} file into the 
> input field
>  - Click the button
> This issue should be addressed with high priority since it is security 
> related (might be exploited for Denial of Service).



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


[jira] [Commented] (MYFACES-4266) Ajax update fails due to invalid characters in response XML (DoS)

2018-11-22 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16695920#comment-16695920
 ] 

ASF GitHub Bot commented on MYFACES-4266:
-

cnsgithub opened a new pull request #27: fixes 
https://issues.apache.org/jira/browse/MYFACES-4266
URL: https://github.com/apache/myfaces/pull/27
 
 
   Fixes
   - https://issues.apache.org/jira/browse/MYFACES-4266
   
   Related to
   - https://github.com/primefaces/primefaces/issues/3875
   
   @tandraschko Could you please check that?


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


> Ajax update fails due to invalid characters in response XML (DoS)
> -
>
> Key: MYFACES-4266
> URL: https://issues.apache.org/jira/browse/MYFACES-4266
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.3.2
> Environment: jetty 9.4.14.v20181114
> JDK 10
>Reporter: cnsgithub
>Priority: Major
>
> I noticed that the {{}} update fails when the updated form contains 
> unicode characters, which are not allowed in the [XML 1.0 
> spec|https://www.w3.org/TR/REC-xml/#charsets].
> h2. Expected Behaviour
> If the update response contains characters that are not allowed in XML, they 
> should be filtered by MyFaces before writing the response.
> h2. Actual Behaviour
> Some illegal XML characters are not filtered and therefore the browser fails 
> to parse the response.
> h2. Steps to reproduce
> I created a small github project to reproduce this behaviour: 
> [https://github.com/cnsgithub/mojarra-ajax/tree/myfaces] (branch myfaces)
>  To reproduce:
>  - {{git clone [https://github.com/cnsgithub/mojarra-ajax]}}
>  - {{git checkout myfaces}}
>  - run {{mvn clean package jetty:run}}
>  - after the server has started, open [http://localhost:8080/index.xhtml]
>  - Click the button, the error should occur
> The issue also occurs with user supplied inputs:
>  - open [http://localhost:8080/input.xhtml]
>  - Paste the characters from the {{illegal-xml-chars.txt}} file into the 
> input field
>  - Click the button
> This issue should be addressed with high priority since it is security 
> related (might be exploited for Denial of Service).



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


[jira] [Commented] (MYFACES-4082) Composite component binding doesn't work

2018-11-07 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4082?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16678739#comment-16678739
 ] 

ASF GitHub Bot commented on MYFACES-4082:
-

tandraschko commented on issue #18: MYFACES-4082 Fix 'binding' when referencing 
composite components
URL: https://github.com/apache/myfaces/pull/18#issuecomment-436766191
 
 
   Sorry, please don't take it personally. I didn't see that you applied my 
changes, so i commited my version, which was inspired by your version and the 
original code. 
   
   You can just contribute by opening issues, trigger discussions on the dev 
mailinst list and provide patches/Pull Requests.
   


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


> Composite component binding doesn't work
> 
>
> Key: MYFACES-4082
> URL: https://issues.apache.org/jira/browse/MYFACES-4082
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.2.3, 2.2.11
> Environment: Debian 8.2
> JDK 1.8
> Netbeans 8.1
>Reporter: NCister
>Priority: Major
> Fix For: 2.2.13, 2.3.3, 3.0.0-SNAPSHOT
>
>
> I've just tried to set binding of a simple composite.
> It don't works :-(
> To manage the componentType methods from user page the only way is to use 
> ViewRoot.findComponent .



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


[jira] [Commented] (MYFACES-4082) Composite component binding doesn't work

2018-11-07 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4082?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16678743#comment-16678743
 ] 

ASF GitHub Bot commented on MYFACES-4082:
-

tandraschko edited a comment on issue #18: MYFACES-4082 Fix 'binding' when 
referencing composite components
URL: https://github.com/apache/myfaces/pull/18#issuecomment-436766191
 
 
   Sorry, please don't take it personally. I didn't see that you applied my 
changes, so i commited my version, which was inspired by your version and the 
original code. Thanks for your effort.
   
   You can just contribute by opening issues, trigger discussions on the dev 
mailinst list and provide patches/Pull Requests.
   


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


> Composite component binding doesn't work
> 
>
> Key: MYFACES-4082
> URL: https://issues.apache.org/jira/browse/MYFACES-4082
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.2.3, 2.2.11
> Environment: Debian 8.2
> JDK 1.8
> Netbeans 8.1
>Reporter: NCister
>Priority: Major
> Fix For: 2.2.13, 2.3.3, 3.0.0-SNAPSHOT
>
>
> I've just tried to set binding of a simple composite.
> It don't works :-(
> To manage the componentType methods from user page the only way is to use 
> ViewRoot.findComponent .



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


[jira] [Commented] (MYFACES-4082) Composite component binding doesn't work

2018-11-07 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4082?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16678744#comment-16678744
 ] 

ASF GitHub Bot commented on MYFACES-4082:
-

tandraschko edited a comment on issue #18: MYFACES-4082 Fix 'binding' when 
referencing composite components
URL: https://github.com/apache/myfaces/pull/18#issuecomment-436766191
 
 
   Sorry, please don't take it personally. I didn't see that you applied my 
changes, so i commited my version, which was inspired by your version and the 
original code. Thanks for your effort.
   
   You can just contribute by opening issues, trigger discussions on the dev 
mailing list and provide patches/Pull Requests.
   


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


> Composite component binding doesn't work
> 
>
> Key: MYFACES-4082
> URL: https://issues.apache.org/jira/browse/MYFACES-4082
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.2.3, 2.2.11
> Environment: Debian 8.2
> JDK 1.8
> Netbeans 8.1
>Reporter: NCister
>Priority: Major
> Fix For: 2.2.13, 2.3.3, 3.0.0-SNAPSHOT
>
>
> I've just tried to set binding of a simple composite.
> It don't works :-(
> To manage the componentType methods from user page the only way is to use 
> ViewRoot.findComponent .



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


[jira] [Commented] (MYFACES-4082) Composite component binding doesn't work

2018-11-07 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4082?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16678740#comment-16678740
 ] 

ASF GitHub Bot commented on MYFACES-4082:
-

tandraschko closed pull request #18: MYFACES-4082 Fix 'binding' when 
referencing composite components
URL: https://github.com/apache/myfaces/pull/18
 
 
   

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/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/CompositeComponentResourceTagHandler.java
 
b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/CompositeComponentResourceTagHandler.java
index f0c2041bd..5f95fc70d 100644
--- 
a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/CompositeComponentResourceTagHandler.java
+++ 
b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/CompositeComponentResourceTagHandler.java
@@ -42,6 +42,7 @@
 import javax.faces.component.UniqueIdVendor;
 import javax.faces.component.ValueHolder;
 import javax.faces.context.FacesContext;
+import javax.faces.event.PhaseId;
 import javax.faces.view.AttachedObjectHandler;
 import javax.faces.view.ViewDeclarationLanguage;
 import javax.faces.view.facelets.ComponentConfig;
@@ -51,6 +52,7 @@
 import javax.faces.view.facelets.FaceletHandler;
 import javax.faces.view.facelets.MetaRuleset;
 import javax.faces.view.facelets.Metadata;
+import javax.faces.view.facelets.TagAttribute;
 import javax.faces.view.facelets.TagException;
 import javax.faces.view.facelets.TextHandler;
 
@@ -62,9 +64,11 @@
 import org.apache.myfaces.view.facelets.tag.ComponentContainerHandler;
 import org.apache.myfaces.view.facelets.tag.TagHandlerUtils;
 import org.apache.myfaces.view.facelets.tag.jsf.ActionSourceRule;
+import 
org.apache.myfaces.view.facelets.tag.jsf.ClearBindingValueExpressionListener;
 import org.apache.myfaces.view.facelets.tag.jsf.ComponentBuilderHandler;
 import org.apache.myfaces.view.facelets.tag.jsf.ComponentSupport;
 import org.apache.myfaces.view.facelets.tag.jsf.EditableValueHolderRule;
+import org.apache.myfaces.view.facelets.tag.jsf.PreDisposeViewEvent;
 import org.apache.myfaces.view.facelets.tag.jsf.ValueHolderRule;
 import org.apache.myfaces.view.facelets.tag.jsf.core.AjaxHandler;
 
@@ -109,10 +113,35 @@ public 
CompositeComponentResourceTagHandler(ComponentConfig config, Resource res
 
 public UIComponent createComponent(FaceletContext ctx)
 {
+
 FacesContext facesContext = ctx.getFacesContext();
-UIComponent component = 
facesContext.getApplication().createComponent(facesContext, _resource);
-
-// Check required attributes if the app is not on production stage. 
+UIComponent component = 
facesContext.getApplication().createComponent(facesContext, this._resource);
+
+TagAttribute bindingAttribute = getBinding();
+
+if (bindingAttribute != null)
+{
+
+ValueExpression bindingVE = 
bindingAttribute.getValueExpression(ctx, Object.class);
+
+component.setValueExpression("binding", bindingVE);
+
+if (!bindingVE.isReadOnly(facesContext.getELContext()))
+{
+
+if 
(PhaseId.RESTORE_VIEW.equals(facesContext.getCurrentPhaseId()))
+{
+bindingVE.setValue(ctx, component);
+}
+
+ComponentSupport.getViewRoot(ctx, 
component).getAttributes().put("oam.CALL_PRE_DISPOSE_VIEW", Boolean.TRUE);
+component.subscribeToEvent(PreDisposeViewEvent.class, new 
ClearBindingValueExpressionListener());
+
+}
+
+}
+
+// Check required attributes if the app is not on production stage.
 // Unfortunately, we can't check it on constructor because we need to 
call
 // ViewDeclarationLanguage.getComponentMetadata() and on that point it 
is possible to not
 // have a viewId.


 


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


> Composite component binding doesn't work
> 
>
> Key: MYFACES-4082
> URL: https://issues.apache.org/jira/browse/MYFACES-4082
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.2.3, 2.2.11
> Environment: Debian 8.2
> JDK 1.8
> Netbeans 8.1
>Reporter: NCister
>Priority: Major
> Fix For: 2.2.13, 2.3.3, 3.0.0-SNAPSHOT
>
>
> I've just tried 

[jira] [Commented] (MYFACES-4082) Composite component binding doesn't work

2018-11-07 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4082?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16678717#comment-16678717
 ] 

ASF GitHub Bot commented on MYFACES-4082:
-

luigiJsonar commented on issue #18: MYFACES-4082 Fix 'binding' when referencing 
composite components
URL: https://github.com/apache/myfaces/pull/18#issuecomment-436758724
 
 
   I'd be more than happy to apply any other suggestions, open more PRs for 
previous versions, test it... I don't understand why it had to be your commit, 
not mine. Can you point me to any documentation on how to contribute to this 
repo? I need that because I might be missing something but IMHO I tried to 
contribute and you just got my code and didn't even mention me on it.
   


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


> Composite component binding doesn't work
> 
>
> Key: MYFACES-4082
> URL: https://issues.apache.org/jira/browse/MYFACES-4082
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.2.3, 2.2.11
> Environment: Debian 8.2
> JDK 1.8
> Netbeans 8.1
>Reporter: NCister
>Priority: Major
> Fix For: 2.2.13, 2.3.3, 3.0.0-SNAPSHOT
>
>
> I've just tried to set binding of a simple composite.
> It don't works :-(
> To manage the componentType methods from user page the only way is to use 
> ViewRoot.findComponent .



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


[jira] [Commented] (MYFACES-4262) MyFaces 2.3 should import correct javax.servlet packages in OSGi

2018-11-07 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16677842#comment-16677842
 ] 

ASF GitHub Bot commented on MYFACES-4262:
-

tandraschko closed pull request #26: MYFACES-4262: Use correct version ranges 
to import servlet-api
URL: https://github.com/apache/myfaces/pull/26
 
 
   

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/api/pom.xml b/api/pom.xml
index d729b9375..40a8956cc 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -410,8 +410,8 @@
 
 javax.el;version="[1.0.0, 3.1.0)",
 javax.validation*;version="[1.0.0, 2.0.0)",
-javax.servlet;version="[2.5.0, 4.0)",
-javax.servlet.http;version="[2.5.0, 4.0)",
+javax.servlet;version="[3, 5)",
+javax.servlet.http;version="[3, 5)",
 javax.servlet.jsp;version="[2.1.0, 3.1)",
 
javax.servlet.jsp.jstl.core;version="[1.1.2, 2.0.0)",
 
javax.servlet.jsp.jstl.sql;version="[1.1.2, 2.0.0)",
diff --git a/bundle/pom.xml b/bundle/pom.xml
index 6889fc8b4..06ce5436c 100644
--- a/bundle/pom.xml
+++ b/bundle/pom.xml
@@ -88,12 +88,12 @@
 javax.naming,
 javax.persistence;version="[1.0.0, 
3.0)";resolution:=optional,
 javax.portlet;version="[1.0.0, 
2.1)";resolution:=optional,
-javax.servlet;version="[2.5.0, 4.0)",
-javax.servlet.http;version="[2.5.0, 4.0)",
+javax.servlet;version="[3, 5)",
+javax.servlet.http;version="[3, 5)",
 javax.servlet.jsp;version="[2.1.0, 3.1)",
 javax.servlet.jsp.jstl.core;version="[1.1.2, 
2.0.0)",
 javax.servlet.jsp.tagext;version="[2.1.0, 3.1)",
-javax.servlet.annotation;version="[2.5.0, 
4.0)";resolution:=optional,
+javax.servlet.annotation;version="[3, 
5)";resolution:=optional,
 javax.validation.*;version="[1.0.0, 
2.0.0)";resolution:=optional,
 javax.xml.parsers,
 org.apache;resolution:=optional,
diff --git a/impl/pom.xml b/impl/pom.xml
index 3cd026560..0c02a0490 100644
--- a/impl/pom.xml
+++ b/impl/pom.xml
@@ -749,12 +749,12 @@
 javax.naming,
 javax.persistence;version="[1.0.0, 
2.1)";resolution:=optional,
 javax.portlet;version="[1.0.0, 
2.1)";resolution:=optional,
-javax.servlet;version="[3.0.0, 4.0)",
-javax.servlet.http;version="[3.0.0, 4.0)",
+javax.servlet;version="[3, 5)",
+javax.servlet.http;version="[3, 5)",
 javax.servlet.jsp;version="[2.2.0, 3.1)",
 
javax.servlet.jsp.jstl.core;version="[1.1.2, 2.0.0)",
 javax.servlet.jsp.tagext;version="[2.1.0, 
3.1)",
-javax.servlet.annotation;version="[2.5.0, 
4.0)";resolution:=optional,
+javax.servlet.annotation;version="[3, 
5)";resolution:=optional,
 javax.xml.parsers,
 org.apache;resolution:=optional,
 
org.apache.commons.beanutils;version="[1.8.3, 2.0.0)",


 


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


> MyFaces 2.3 should import correct javax.servlet packages in OSGi
> 
>
> Key: MYFACES-4262
> URL: https://issues.apache.org/jira/browse/MYFACES-4262
> Project: MyFaces Core
>  Issue Type: Bug
>  Components: JSR-372
>Affects Versions: 2.3.2
>Reporter: Grzegorz Grzybek
>Priority: Major
> Fix For: 2.3.3, 3.0.0-SNAPSHOT
>
>
> After 

[jira] [Commented] (MYFACES-4082) Composite binding don't works ...

2018-11-06 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4082?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16677342#comment-16677342
 ] 

ASF GitHub Bot commented on MYFACES-4082:
-

luigiJsonar commented on issue #18: MYFACES-4082 Fix 'binding' when referencing 
composite components
URL: https://github.com/apache/myfaces/pull/18#issuecomment-436426070
 
 
   Applied the suggested changes and it works fine.


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


> Composite binding don't works ...
> -
>
> Key: MYFACES-4082
> URL: https://issues.apache.org/jira/browse/MYFACES-4082
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.2.3, 2.2.11
> Environment: Debian 8.2
> JDK 1.8
> Netbeans 8.1
>Reporter: NCister
>Priority: Major
>
> I've just tried to set binding of a simple composite.
> It don't works :-(
> To manage the componentType methods from user page the only way is to use 
> ViewRoot.findComponent .



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


[jira] [Commented] (MYFACES-4262) MyFaces 2.3 should import correct javax.servlet packages in OSGi

2018-11-06 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16676799#comment-16676799
 ] 

ASF GitHub Bot commented on MYFACES-4262:
-

grgrzybek opened a new pull request #26: MYFACES-4262: Use correct version 
ranges to import servlet-api
URL: https://github.com/apache/myfaces/pull/26
 
 
   Verified while checking:
   * https://ops4j1.jira.com/browse/PAXWEB-1187 (upgrade to Tomcat 9.0.x)
   * https://ops4j1.jira.com/browse/PAXWEB-1185 (upgrade to Undertow 2.0.x)


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


> MyFaces 2.3 should import correct javax.servlet packages in OSGi
> 
>
> Key: MYFACES-4262
> URL: https://issues.apache.org/jira/browse/MYFACES-4262
> Project: MyFaces Core
>  Issue Type: Bug
>  Components: JSR-372
>Affects Versions: 2.3.2
>Reporter: Grzegorz Grzybek
>Priority: Major
> Fix For: 2.3.3, 3.0.0-SNAPSHOT
>
>
> After fixing MYFACES-4141 with [this 
> commit|https://github.com/apache/myfaces/commit/731e40cdb4ce5d336192b705c070e3c0f8175305],
>  where servlet-api dependency was set to tomcat-servlet-api:9.0.2, 
> myfaces-bundle should use correct imports of OSGi packages.



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


[jira] [Commented] (MYFACES-4260) Context map from CDI ViewScope is not being cleared at destroy time

2018-10-25 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16663847#comment-16663847
 ] 

ASF GitHub Bot commented on MYFACES-4260:
-

ebreijo closed pull request #25: MYFACES-4260: Context map from CDI ViewScope 
is not being cleared at …
URL: https://github.com/apache/myfaces/pull/25
 
 
   

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/impl/src/main/java/org/apache/myfaces/cdi/view/ViewScopeContextImpl.java 
b/impl/src/main/java/org/apache/myfaces/cdi/view/ViewScopeContextImpl.java
index f107be05d..ab89ed64f 100644
--- a/impl/src/main/java/org/apache/myfaces/cdi/view/ViewScopeContextImpl.java
+++ b/impl/src/main/java/org/apache/myfaces/cdi/view/ViewScopeContextImpl.java
@@ -241,6 +241,8 @@ public static void 
destroyAllActive(ViewScopeContextualStorage storage, FacesCon
 contextualInstanceInfo.getCreationalContext());
 }
 }
+
+contextMap.clear();
 
 storage.deactivate();
 }


 


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


> Context map from CDI ViewScope is not being cleared at destroy time
> ---
>
> Key: MYFACES-4260
> URL: https://issues.apache.org/jira/browse/MYFACES-4260
> Project: MyFaces Core
>  Issue Type: Bug
>  Components: JSR-344
>Affects Versions: 2.2.12, 2.3.2
>Reporter: Eduardo Breijo
>Assignee: Eduardo Breijo
>Priority: Minor
>
> The context map that stores Contextual Instances in a CDI Context is not 
> being cleared when destroying a CDI ViewScope bean.



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


[jira] [Commented] (MYFACES-4260) Context map from CDI ViewScope is not being cleared at destroy time

2018-10-25 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16663844#comment-16663844
 ] 

ASF GitHub Bot commented on MYFACES-4260:
-

ebreijo closed pull request #24: MYFACES-4260: Context map from CDI ViewScope 
is not being cleared at …
URL: https://github.com/apache/myfaces/pull/24
 
 
   

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/impl/src/main/java/org/apache/myfaces/cdi/view/ViewScopeContextImpl.java 
b/impl/src/main/java/org/apache/myfaces/cdi/view/ViewScopeContextImpl.java
index 6384e43a2..122aeb1ca 100644
--- a/impl/src/main/java/org/apache/myfaces/cdi/view/ViewScopeContextImpl.java
+++ b/impl/src/main/java/org/apache/myfaces/cdi/view/ViewScopeContextImpl.java
@@ -246,6 +246,8 @@ public static void 
destroyAllActive(ViewScopeContextualStorage storage, FacesCon
 mbDestroyer.destroy(key.getName(), 
entry.getValue().getContextualInstance());
 }
 }
+
+contextMap.clear();
 
 storage.deactivate();
 }


 


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


> Context map from CDI ViewScope is not being cleared at destroy time
> ---
>
> Key: MYFACES-4260
> URL: https://issues.apache.org/jira/browse/MYFACES-4260
> Project: MyFaces Core
>  Issue Type: Bug
>  Components: JSR-344
>Affects Versions: 2.2.12, 2.3.2
>Reporter: Eduardo Breijo
>Assignee: Eduardo Breijo
>Priority: Minor
>
> The context map that stores Contextual Instances in a CDI Context is not 
> being cleared when destroying a CDI ViewScope bean.



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


[jira] [Commented] (MYFACES-4260) Context map from CDI ViewScope is not being cleared at destroy time

2018-10-25 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16663846#comment-16663846
 ] 

ASF GitHub Bot commented on MYFACES-4260:
-

ebreijo closed pull request #23: MYFACES-4260: Context map from CDI ViewScope 
is not being cleared at …
URL: https://github.com/apache/myfaces/pull/23
 
 
   

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/impl/src/main/java/org/apache/myfaces/cdi/view/ViewScopeContextImpl.java 
b/impl/src/main/java/org/apache/myfaces/cdi/view/ViewScopeContextImpl.java
index 7d47156ba..ff6cc9b51 100644
--- a/impl/src/main/java/org/apache/myfaces/cdi/view/ViewScopeContextImpl.java
+++ b/impl/src/main/java/org/apache/myfaces/cdi/view/ViewScopeContextImpl.java
@@ -254,6 +254,8 @@ public static void 
destroyAllActive(ViewScopeContextualStorage storage, FacesCon
 mbDestroyer.destroy(key.getName(), 
entry.getValue().getContextualInstance());
 }
 }
+
+contextMap.clear();
 
 storage.deactivate();
 }


 


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


> Context map from CDI ViewScope is not being cleared at destroy time
> ---
>
> Key: MYFACES-4260
> URL: https://issues.apache.org/jira/browse/MYFACES-4260
> Project: MyFaces Core
>  Issue Type: Bug
>  Components: JSR-344
>Affects Versions: 2.2.12, 2.3.2
>Reporter: Eduardo Breijo
>Assignee: Eduardo Breijo
>Priority: Minor
>
> The context map that stores Contextual Instances in a CDI Context is not 
> being cleared when destroying a CDI ViewScope bean.



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


[jira] [Commented] (MYFACES-4260) Context map from CDI ViewScope is not being cleared at destroy time

2018-10-23 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16661027#comment-16661027
 ] 

ASF GitHub Bot commented on MYFACES-4260:
-

ebreijo opened a new pull request #25: MYFACES-4260: Context map from CDI 
ViewScope is not being cleared at …
URL: https://github.com/apache/myfaces/pull/25
 
 
   …destroy time


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


> Context map from CDI ViewScope is not being cleared at destroy time
> ---
>
> Key: MYFACES-4260
> URL: https://issues.apache.org/jira/browse/MYFACES-4260
> Project: MyFaces Core
>  Issue Type: Bug
>  Components: JSR-344
>Affects Versions: 2.2.12, 2.3.2
>Reporter: Eduardo Breijo
>Assignee: Eduardo Breijo
>Priority: Minor
>
> The context map that stores Contextual Instances in a CDI Context is not 
> being cleared when destroying a CDI ViewScope bean.



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


[jira] [Commented] (MYFACES-4260) Context map from CDI ViewScope is not being cleared at destroy time

2018-10-23 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16661016#comment-16661016
 ] 

ASF GitHub Bot commented on MYFACES-4260:
-

ebreijo opened a new pull request #24: MYFACES-4260: Context map from CDI 
ViewScope is not being cleared at …
URL: https://github.com/apache/myfaces/pull/24
 
 
   …destroy time


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


> Context map from CDI ViewScope is not being cleared at destroy time
> ---
>
> Key: MYFACES-4260
> URL: https://issues.apache.org/jira/browse/MYFACES-4260
> Project: MyFaces Core
>  Issue Type: Bug
>  Components: JSR-344
>Affects Versions: 2.2.12, 2.3.2
>Reporter: Eduardo Breijo
>Assignee: Eduardo Breijo
>Priority: Minor
>
> The context map that stores Contextual Instances in a CDI Context is not 
> being cleared when destroying a CDI ViewScope bean.



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


[jira] [Commented] (MYFACES-4260) Context map from CDI ViewScope is not being cleared at destroy time

2018-10-23 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16661007#comment-16661007
 ] 

ASF GitHub Bot commented on MYFACES-4260:
-

ebreijo opened a new pull request #23: MYFACES-4260: Context map from CDI 
ViewScope is not being cleared at …
URL: https://github.com/apache/myfaces/pull/23
 
 
   …destroy time


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


> Context map from CDI ViewScope is not being cleared at destroy time
> ---
>
> Key: MYFACES-4260
> URL: https://issues.apache.org/jira/browse/MYFACES-4260
> Project: MyFaces Core
>  Issue Type: Bug
>  Components: JSR-344
>Affects Versions: 2.2.12, 2.3.2
>Reporter: Eduardo Breijo
>Assignee: Eduardo Breijo
>Priority: Minor
>
> The context map that stores Contextual Instances in a CDI Context is not 
> being cleared when destroying a CDI ViewScope bean.



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


[jira] [Commented] (MYFACES-4082) Composite binding don't works ...

2018-10-22 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4082?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16659607#comment-16659607
 ] 

ASF GitHub Bot commented on MYFACES-4082:
-

tandraschko commented on issue #18: MYFACES-4082 Fix 'binding' when referencing 
composite components
URL: https://github.com/apache/myfaces/pull/18#issuecomment-431914558
 
 
   @luigiJsonar 
   
   Could you please try this:
   
   https://gist.github.com/tandraschko/2f8e15bcbf8affc63df26b25f9259584
   
   If it works fine, i will apply it


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


> Composite binding don't works ...
> -
>
> Key: MYFACES-4082
> URL: https://issues.apache.org/jira/browse/MYFACES-4082
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.2.3, 2.2.11
> Environment: Debian 8.2
> JDK 1.8
> Netbeans 8.1
>Reporter: NCister
>Priority: Major
>
> I've just tried to set binding of a simple composite.
> It don't works :-(
> To manage the componentType methods from user page the only way is to use 
> ViewRoot.findComponent .



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


[jira] [Commented] (MYFACES-4082) Composite binding don't works ...

2018-10-22 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4082?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16659602#comment-16659602
 ] 

ASF GitHub Bot commented on MYFACES-4082:
-

tandraschko commented on issue #18: MYFACES-4082 Fix 'binding' when referencing 
composite components
URL: https://github.com/apache/myfaces/pull/18#issuecomment-431913183
 
 
   @luigiJsonar 
   
   the ComponentTagHandlerDelegate contains the following, before setting the 
value:
   if (PhaseId.RESTORE_VIEW.equals(faces.getCurrentPhaseId()))
   
   Could you please if it makes sense to add this if?
   


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


> Composite binding don't works ...
> -
>
> Key: MYFACES-4082
> URL: https://issues.apache.org/jira/browse/MYFACES-4082
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.2.3, 2.2.11
> Environment: Debian 8.2
> JDK 1.8
> Netbeans 8.1
>Reporter: NCister
>Priority: Major
>
> I've just tried to set binding of a simple composite.
> It don't works :-(
> To manage the componentType methods from user page the only way is to use 
> ViewRoot.findComponent .



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


[jira] [Commented] (TOBAGO-1879) tc:date does not support Calendar and DateTime

2018-09-18 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/TOBAGO-1879?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16619353#comment-16619353
 ] 

ASF GitHub Bot commented on TOBAGO-1879:


henningn closed pull request #12: TOBAGO-1879 tc:date does not support Calendar 
and DateTime
URL: https://github.com/apache/myfaces-tobago/pull/12
 
 
   

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/tobago-core/src/main/java/org/apache/myfaces/tobago/convert/DateTimeConverter.java
 
b/tobago-core/src/main/java/org/apache/myfaces/tobago/convert/DateTimeConverter.java
new file mode 100644
index 0..313711677
--- /dev/null
+++ 
b/tobago-core/src/main/java/org/apache/myfaces/tobago/convert/DateTimeConverter.java
@@ -0,0 +1,175 @@
+/*
+ * 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.myfaces.tobago.convert;
+
+import org.apache.myfaces.tobago.internal.util.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIInput;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.ConverterException;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.time.LocalTime;
+import java.time.OffsetDateTime;
+import java.time.OffsetTime;
+import java.time.ZonedDateTime;
+import java.time.format.DateTimeFormatter;
+import java.time.temporal.TemporalAccessor;
+import java.util.Calendar;
+import java.util.Locale;
+import java.util.TimeZone;
+
+import static org.apache.myfaces.tobago.convert.DateTimeConverter.CONVERTER_ID;
+
+@org.apache.myfaces.tobago.apt.annotation.Converter(id = CONVERTER_ID)
+public class DateTimeConverter extends javax.faces.convert.DateTimeConverter {
+
+  private static final Logger LOG = 
LoggerFactory.getLogger(DateTimeConverter.class);
+
+  public static final String CONVERTER_ID = 
"org.apache.myfaces.tobago.DateTime";
+
+  private static final String TYPE_DATE = "date";
+  private static final String TYPE_TIME = "time";
+  private static final String TYPE_BOTH = "both";
+  private static final String TYPE_CALENDAR = "calendar";
+  private static final String TYPE_LOCAL_DATE = "localDate";
+  private static final String TYPE_LOCAL_TIME = "localTime";
+  private static final String TYPE_LOCAL_DATE_TIME = "localDateTime";
+  private static final String TYPE_OFFSET_TIME = "offsetTime";
+  private static final String TYPE_OFFSET_DATE_TIME = "offsetDateTime";
+  private static final String TYPE_ZONED_DATE_TIME = "zonedDateTime";
+
+  @Override
+  public Object getAsObject(FacesContext facesContext, UIComponent component, 
String string) throws ConverterException {
+if (StringUtils.isBlank(string)) {
+  return null;
+} else {
+  final String type = getType();
+  if (TYPE_DATE.equals(type) || TYPE_TIME.equals(type) || 
TYPE_BOTH.equals(type)) {
+return super.getAsObject(facesContext, component, string);
+  } else if (TYPE_CALENDAR.equals(type)) {
+final Locale locale = getLocale();
+final String pattern = getPattern();
+final TimeZone timeZone = getTimeZone();
+final Calendar calendar;
+if (component instanceof UIInput && ((UIInput) component).getValue() 
!= null) {
+  calendar = (Calendar) ((UIInput) component).getValue();
+} else {
+  if (timeZone != null && locale != null) {
+calendar = Calendar.getInstance(timeZone, locale);
+  } else if (locale != null) {
+calendar = Calendar.getInstance(locale);
+  } else if (timeZone != null) {
+calendar = Calendar.getInstance(timeZone);
+  } else {
+calendar = Calendar.getInstance();
+  }
+}
+
+SimpleDateFormat sdf = locale != null ? new SimpleDateFormat(pattern, 
locale) : new SimpleDateFormat(pattern);
+try {
+ 

[jira] [Commented] (TOBAGO-1879) tc:date does not support Calendar and DateTime

2018-09-18 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/TOBAGO-1879?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16619352#comment-16619352
 ] 

ASF GitHub Bot commented on TOBAGO-1879:


henningn commented on issue #12: TOBAGO-1879 tc:date does not support Calendar 
and DateTime
URL: https://github.com/apache/myfaces-tobago/pull/12#issuecomment-422456341
 
 
   Already comitted.


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


> tc:date does not support Calendar and DateTime
> --
>
> Key: TOBAGO-1879
> URL: https://issues.apache.org/jira/browse/TOBAGO-1879
> Project: MyFaces Tobago
>  Issue Type: Improvement
>  Components: Core
>Affects Versions: 4.1.0
>Reporter: Henning Noeth
>Assignee: Henning Noeth
>Priority: Major
> Fix For: 4.3.0
>
>
> Implement support for java.util.Calendar and java.time.DateTime.
> MyFaces 2.3 has implemented java.time.DateTime for f:convertDateTime already.
> This issue is mainly for backporting this functionality to JSF 2.2 and lower.
> Usage is: 



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


[jira] [Commented] (TOBAGO-1932) Refactor Bootstrap Theme Building

2018-09-18 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/TOBAGO-1932?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16619348#comment-16619348
 ] 

ASF GitHub Bot commented on TOBAGO-1932:


lofwyr14 opened a new pull request #13: TOBAGO-1932 Refactor Bootstrap Theme 
Building
URL: https://github.com/apache/myfaces-tobago/pull/13
 
 
   


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


> Refactor Bootstrap Theme Building
> -
>
> Key: TOBAGO-1932
> URL: https://issues.apache.org/jira/browse/TOBAGO-1932
> Project: MyFaces Tobago
>  Issue Type: Improvement
>Reporter: Udo Schnurpfeil
>Priority: Major
>
> The theme building is currently a bit unusual. Refactor it like described 
> here: [https://getbootstrap.com/docs/4.0/getting-started/theming/]
> For that, we need a package.json and our own node build process.



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


[jira] [Commented] (MYFACES-4252) Classpath._searchDir can throw NullPointerException

2018-09-14 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4252?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16614906#comment-16614906
 ] 

ASF GitHub Bot commented on MYFACES-4252:
-

wtlucy closed pull request #21: MYFACES-4252 fix Classpath._searchDir NPE 2.2.X
URL: https://github.com/apache/myfaces/pull/21
 
 
   

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/impl/src/main/java/org/apache/myfaces/view/facelets/util/Classpath.java 
b/impl/src/main/java/org/apache/myfaces/view/facelets/util/Classpath.java
index b2f5ee4d6..c82b1b0da 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/util/Classpath.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/util/Classpath.java
@@ -140,20 +140,23 @@ public Object run()
 }
 if (dirExists && dir.isDirectory())
 {
-for (File file : dir.listFiles())
+File[] dirFiles = dir.listFiles();
+if (dirFiles != null) 
 {
-String path = file.getAbsolutePath();
-if (file.isDirectory())
+for (File file : dirFiles)
 {
-_searchDir(result, file, suffix);
-}
-else if (path.endsWith(suffix))
-{
-result.add(file.toURI().toURL());
+String path = file.getAbsolutePath();
+if (file.isDirectory())
+{
+_searchDir(result, file, suffix);
+}
+else if (path.endsWith(suffix))
+{
+result.add(file.toURI().toURL());
+}
 }
+return true;
 }
-
-return true;
 }
 
 return false;


 


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


> Classpath._searchDir can throw NullPointerException
> ---
>
> Key: MYFACES-4252
> URL: https://issues.apache.org/jira/browse/MYFACES-4252
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.0.24, 2.1.18, 2.2.12, 2.3.1
> Environment: WebSphere 9
>Reporter: Bill Lucy
>Assignee: Bill Lucy
>Priority: Major
>
> In rare cases, Classpath._searchDir can throw a NPE and cause startup to 
> fail.  I'll update _searchDir() to tolerate the case where File.listFiles() 
> returns null.
> DefaultFacesC I Reading config /WEB-INF/faces-config.xml
>  AbstractFaces E An error occured while initializing MyFaces: 
> java.lang.NullPointerException
>  javax.faces.FacesException: java.lang.NullPointerException
> 
> Caused by: java.lang.NullPointerException
>  at 
> org.apache.myfaces.view.facelets.util.Classpath._searchDir(Classpath.java:143)
>  at 
> org.apache.myfaces.view.facelets.util.Classpath._searchResource(Classpath.java:115)
>  at org.apache.myfaces.view.facelets.util.Classpath.search(Classpath.java:68)



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


[jira] [Commented] (MYFACES-4252) Classpath._searchDir can throw NullPointerException

2018-09-14 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4252?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16614907#comment-16614907
 ] 

ASF GitHub Bot commented on MYFACES-4252:
-

wtlucy closed pull request #22: MYFACES-4252 fix Classpath._searchDir NPE
URL: https://github.com/apache/myfaces/pull/22
 
 
   

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/impl/src/main/java/org/apache/myfaces/view/facelets/util/Classpath.java 
b/impl/src/main/java/org/apache/myfaces/view/facelets/util/Classpath.java
index b2f5ee4d6..c82b1b0da 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/util/Classpath.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/util/Classpath.java
@@ -140,20 +140,23 @@ public Object run()
 }
 if (dirExists && dir.isDirectory())
 {
-for (File file : dir.listFiles())
+File[] dirFiles = dir.listFiles();
+if (dirFiles != null) 
 {
-String path = file.getAbsolutePath();
-if (file.isDirectory())
+for (File file : dirFiles)
 {
-_searchDir(result, file, suffix);
-}
-else if (path.endsWith(suffix))
-{
-result.add(file.toURI().toURL());
+String path = file.getAbsolutePath();
+if (file.isDirectory())
+{
+_searchDir(result, file, suffix);
+}
+else if (path.endsWith(suffix))
+{
+result.add(file.toURI().toURL());
+}
 }
+return true;
 }
-
-return true;
 }
 
 return false;


 


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


> Classpath._searchDir can throw NullPointerException
> ---
>
> Key: MYFACES-4252
> URL: https://issues.apache.org/jira/browse/MYFACES-4252
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.0.24, 2.1.18, 2.2.12, 2.3.1
> Environment: WebSphere 9
>Reporter: Bill Lucy
>Assignee: Bill Lucy
>Priority: Major
>
> In rare cases, Classpath._searchDir can throw a NPE and cause startup to 
> fail.  I'll update _searchDir() to tolerate the case where File.listFiles() 
> returns null.
> DefaultFacesC I Reading config /WEB-INF/faces-config.xml
>  AbstractFaces E An error occured while initializing MyFaces: 
> java.lang.NullPointerException
>  javax.faces.FacesException: java.lang.NullPointerException
> 
> Caused by: java.lang.NullPointerException
>  at 
> org.apache.myfaces.view.facelets.util.Classpath._searchDir(Classpath.java:143)
>  at 
> org.apache.myfaces.view.facelets.util.Classpath._searchResource(Classpath.java:115)
>  at org.apache.myfaces.view.facelets.util.Classpath.search(Classpath.java:68)



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


[jira] [Commented] (MYFACES-4252) Classpath._searchDir can throw NullPointerException

2018-09-14 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4252?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16614905#comment-16614905
 ] 

ASF GitHub Bot commented on MYFACES-4252:
-

wtlucy closed pull request #20: MYFACES-4252 fix Classpath._searchDir NPE 2.1.X 
URL: https://github.com/apache/myfaces/pull/20
 
 
   

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/impl/src/main/java/org/apache/myfaces/view/facelets/util/Classpath.java 
b/impl/src/main/java/org/apache/myfaces/view/facelets/util/Classpath.java
index b2f5ee4d6..c82b1b0da 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/util/Classpath.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/util/Classpath.java
@@ -140,20 +140,23 @@ public Object run()
 }
 if (dirExists && dir.isDirectory())
 {
-for (File file : dir.listFiles())
+File[] dirFiles = dir.listFiles();
+if (dirFiles != null) 
 {
-String path = file.getAbsolutePath();
-if (file.isDirectory())
+for (File file : dirFiles)
 {
-_searchDir(result, file, suffix);
-}
-else if (path.endsWith(suffix))
-{
-result.add(file.toURI().toURL());
+String path = file.getAbsolutePath();
+if (file.isDirectory())
+{
+_searchDir(result, file, suffix);
+}
+else if (path.endsWith(suffix))
+{
+result.add(file.toURI().toURL());
+}
 }
+return true;
 }
-
-return true;
 }
 
 return false;


 


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


> Classpath._searchDir can throw NullPointerException
> ---
>
> Key: MYFACES-4252
> URL: https://issues.apache.org/jira/browse/MYFACES-4252
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.0.24, 2.1.18, 2.2.12, 2.3.1
> Environment: WebSphere 9
>Reporter: Bill Lucy
>Assignee: Bill Lucy
>Priority: Major
>
> In rare cases, Classpath._searchDir can throw a NPE and cause startup to 
> fail.  I'll update _searchDir() to tolerate the case where File.listFiles() 
> returns null.
> DefaultFacesC I Reading config /WEB-INF/faces-config.xml
>  AbstractFaces E An error occured while initializing MyFaces: 
> java.lang.NullPointerException
>  javax.faces.FacesException: java.lang.NullPointerException
> 
> Caused by: java.lang.NullPointerException
>  at 
> org.apache.myfaces.view.facelets.util.Classpath._searchDir(Classpath.java:143)
>  at 
> org.apache.myfaces.view.facelets.util.Classpath._searchResource(Classpath.java:115)
>  at org.apache.myfaces.view.facelets.util.Classpath.search(Classpath.java:68)



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


[jira] [Commented] (MYFACES-4252) Classpath._searchDir can throw NullPointerException

2018-09-14 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4252?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16614904#comment-16614904
 ] 

ASF GitHub Bot commented on MYFACES-4252:
-

wtlucy closed pull request #19: MYFACES-4252 fix Classpath._searchDir NPE 2.0.X
URL: https://github.com/apache/myfaces/pull/19
 
 
   

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/impl/src/main/java/org/apache/myfaces/view/facelets/util/Classpath.java 
b/impl/src/main/java/org/apache/myfaces/view/facelets/util/Classpath.java
index b2f5ee4d6..c82b1b0da 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/util/Classpath.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/util/Classpath.java
@@ -140,20 +140,23 @@ public Object run()
 }
 if (dirExists && dir.isDirectory())
 {
-for (File file : dir.listFiles())
+File[] dirFiles = dir.listFiles();
+if (dirFiles != null) 
 {
-String path = file.getAbsolutePath();
-if (file.isDirectory())
+for (File file : dirFiles)
 {
-_searchDir(result, file, suffix);
-}
-else if (path.endsWith(suffix))
-{
-result.add(file.toURI().toURL());
+String path = file.getAbsolutePath();
+if (file.isDirectory())
+{
+_searchDir(result, file, suffix);
+}
+else if (path.endsWith(suffix))
+{
+result.add(file.toURI().toURL());
+}
 }
+return true;
 }
-
-return true;
 }
 
 return false;


 


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


> Classpath._searchDir can throw NullPointerException
> ---
>
> Key: MYFACES-4252
> URL: https://issues.apache.org/jira/browse/MYFACES-4252
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.0.24, 2.1.18, 2.2.12, 2.3.1
> Environment: WebSphere 9
>Reporter: Bill Lucy
>Assignee: Bill Lucy
>Priority: Major
>
> In rare cases, Classpath._searchDir can throw a NPE and cause startup to 
> fail.  I'll update _searchDir() to tolerate the case where File.listFiles() 
> returns null.
> DefaultFacesC I Reading config /WEB-INF/faces-config.xml
>  AbstractFaces E An error occured while initializing MyFaces: 
> java.lang.NullPointerException
>  javax.faces.FacesException: java.lang.NullPointerException
> 
> Caused by: java.lang.NullPointerException
>  at 
> org.apache.myfaces.view.facelets.util.Classpath._searchDir(Classpath.java:143)
>  at 
> org.apache.myfaces.view.facelets.util.Classpath._searchResource(Classpath.java:115)
>  at org.apache.myfaces.view.facelets.util.Classpath.search(Classpath.java:68)



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


[jira] [Commented] (MYFACES-4252) Classpath._searchDir can throw NullPointerException

2018-09-13 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4252?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16613921#comment-16613921
 ] 

ASF GitHub Bot commented on MYFACES-4252:
-

wtlucy opened a new pull request #22: MYFACES-4252 fix Classpath._searchDir NPE
URL: https://github.com/apache/myfaces/pull/22
 
 
   fixes https://issues.apache.org/jira/browse/MYFACES-4252


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


> Classpath._searchDir can throw NullPointerException
> ---
>
> Key: MYFACES-4252
> URL: https://issues.apache.org/jira/browse/MYFACES-4252
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.0.24, 2.1.18, 2.2.12, 2.3.1
> Environment: WebSphere 9
>Reporter: Bill Lucy
>Assignee: Bill Lucy
>Priority: Major
>
> In rare cases, Classpath._searchDir can throw a NPE and cause startup to 
> fail.  I'll update _searchDir() to tolerate the case where File.listFiles() 
> returns null.
> DefaultFacesC I Reading config /WEB-INF/faces-config.xml
>  AbstractFaces E An error occured while initializing MyFaces: 
> java.lang.NullPointerException
>  javax.faces.FacesException: java.lang.NullPointerException
> 
> Caused by: java.lang.NullPointerException
>  at 
> org.apache.myfaces.view.facelets.util.Classpath._searchDir(Classpath.java:143)
>  at 
> org.apache.myfaces.view.facelets.util.Classpath._searchResource(Classpath.java:115)
>  at org.apache.myfaces.view.facelets.util.Classpath.search(Classpath.java:68)



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


[jira] [Commented] (MYFACES-4252) Classpath._searchDir can throw NullPointerException

2018-09-13 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4252?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16613880#comment-16613880
 ] 

ASF GitHub Bot commented on MYFACES-4252:
-

wtlucy opened a new pull request #21: MYFACES-4252 fix Classpath._searchDir NPE 
2.2.X
URL: https://github.com/apache/myfaces/pull/21
 
 
   fixes https://issues.apache.org/jira/browse/MYFACES-4252


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


> Classpath._searchDir can throw NullPointerException
> ---
>
> Key: MYFACES-4252
> URL: https://issues.apache.org/jira/browse/MYFACES-4252
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.0.24, 2.1.18, 2.2.12, 2.3.1
> Environment: WebSphere 9
>Reporter: Bill Lucy
>Assignee: Bill Lucy
>Priority: Major
>
> In rare cases, Classpath._searchDir can throw a NPE and cause startup to 
> fail.  I'll update _searchDir() to tolerate the case where File.listFiles() 
> returns null.
> DefaultFacesC I Reading config /WEB-INF/faces-config.xml
>  AbstractFaces E An error occured while initializing MyFaces: 
> java.lang.NullPointerException
>  javax.faces.FacesException: java.lang.NullPointerException
> 
> Caused by: java.lang.NullPointerException
>  at 
> org.apache.myfaces.view.facelets.util.Classpath._searchDir(Classpath.java:143)
>  at 
> org.apache.myfaces.view.facelets.util.Classpath._searchResource(Classpath.java:115)
>  at org.apache.myfaces.view.facelets.util.Classpath.search(Classpath.java:68)



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


[jira] [Commented] (MYFACES-4252) Classpath._searchDir can throw NullPointerException

2018-09-13 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4252?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16613877#comment-16613877
 ] 

ASF GitHub Bot commented on MYFACES-4252:
-

wtlucy opened a new pull request #20: MYFACES-4252 fix Classpath._searchDir NPE 
2.1.X 
URL: https://github.com/apache/myfaces/pull/20
 
 
   fixes https://issues.apache.org/jira/browse/MYFACES-4252


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


> Classpath._searchDir can throw NullPointerException
> ---
>
> Key: MYFACES-4252
> URL: https://issues.apache.org/jira/browse/MYFACES-4252
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.0.24, 2.1.18, 2.2.12, 2.3.1
> Environment: WebSphere 9
>Reporter: Bill Lucy
>Assignee: Bill Lucy
>Priority: Major
>
> In rare cases, Classpath._searchDir can throw a NPE and cause startup to 
> fail.  I'll update _searchDir() to tolerate the case where File.listFiles() 
> returns null.
> DefaultFacesC I Reading config /WEB-INF/faces-config.xml
>  AbstractFaces E An error occured while initializing MyFaces: 
> java.lang.NullPointerException
>  javax.faces.FacesException: java.lang.NullPointerException
> 
> Caused by: java.lang.NullPointerException
>  at 
> org.apache.myfaces.view.facelets.util.Classpath._searchDir(Classpath.java:143)
>  at 
> org.apache.myfaces.view.facelets.util.Classpath._searchResource(Classpath.java:115)
>  at org.apache.myfaces.view.facelets.util.Classpath.search(Classpath.java:68)



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


[jira] [Commented] (MYFACES-4252) Classpath._searchDir can throw NullPointerException

2018-09-13 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4252?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16613697#comment-16613697
 ] 

ASF GitHub Bot commented on MYFACES-4252:
-

wtlucy opened a new pull request #19: MYFACES-4252 fix Classpath._searchDir NPE
URL: https://github.com/apache/myfaces/pull/19
 
 
   fixes https://issues.apache.org/jira/browse/MYFACES-4252


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


> Classpath._searchDir can throw NullPointerException
> ---
>
> Key: MYFACES-4252
> URL: https://issues.apache.org/jira/browse/MYFACES-4252
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.0.24, 2.1.18, 2.2.12, 2.3.1
> Environment: WebSphere 9
>Reporter: Bill Lucy
>Assignee: Bill Lucy
>Priority: Major
>
> In rare cases, Classpath._searchDir can throw a NPE and cause startup to 
> fail.  I'll update _searchDir() to tolerate the case where File.listFiles() 
> returns null.
> DefaultFacesC I Reading config /WEB-INF/faces-config.xml
>  AbstractFaces E An error occured while initializing MyFaces: 
> java.lang.NullPointerException
>  javax.faces.FacesException: java.lang.NullPointerException
> 
> Caused by: java.lang.NullPointerException
>  at 
> org.apache.myfaces.view.facelets.util.Classpath._searchDir(Classpath.java:143)
>  at 
> org.apache.myfaces.view.facelets.util.Classpath._searchResource(Classpath.java:115)
>  at org.apache.myfaces.view.facelets.util.Classpath.search(Classpath.java:68)



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


[jira] [Commented] (MYFACES-4082) Composite binding don't works ...

2018-08-26 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4082?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16593006#comment-16593006
 ] 

ASF GitHub Bot commented on MYFACES-4082:
-

luigiJsonar opened a new pull request #18: MYFACES-4082 Fix 'binding' when 
referencing composite components
URL: https://github.com/apache/myfaces/pull/18
 
 
   Code that 'sets' the value of the binding attribute for composite 
components. Inspired on:
   
org.apache.myfaces.view.facelets.tag.jsf.ComponentTagHandlerDelegate#createComponent


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


> Composite binding don't works ...
> -
>
> Key: MYFACES-4082
> URL: https://issues.apache.org/jira/browse/MYFACES-4082
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.2.3, 2.2.11
> Environment: Debian 8.2
> JDK 1.8
> Netbeans 8.1
>Reporter: NCister
>Priority: Major
>
> I've just tried to set binding of a simple composite.
> It don't works :-(
> To manage the componentType methods from user page the only way is to use 
> ViewRoot.findComponent .



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


[jira] [Commented] (MYFACES-3629) StartupServletContextListener crashes if FacesServlet is defined in web-fragments.

2018-08-23 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-3629?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16590697#comment-16590697
 ] 

ASF GitHub Bot commented on MYFACES-3629:
-

wtlucy closed pull request #17: MYFACES-3629 add context attr for case when 
faces servlet is found by SCI - 2.2.x
URL: https://github.com/apache/myfaces/pull/17
 
 
   

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/impl/src/main/java/org/apache/myfaces/ee6/MyFacesContainerInitializer.java 
b/impl/src/main/java/org/apache/myfaces/ee6/MyFacesContainerInitializer.java
index de74039da..2ebd151eb 100644
--- a/impl/src/main/java/org/apache/myfaces/ee6/MyFacesContainerInitializer.java
+++ b/impl/src/main/java/org/apache/myfaces/ee6/MyFacesContainerInitializer.java
@@ -113,6 +113,13 @@
  */
 private static final String FACES_SERVLET_ADDED_ATTRIBUTE = 
"org.apache.myfaces.DYNAMICALLY_ADDED_FACES_SERVLET";
 
+/**
+ * If the servlet mapping for the FacesServlet is found on the 
ServletContext, Boolean.TRUE 
+ * is stored under this key in the ServletContext.
+ * ATTENTION: this constant is duplicate in AbstractFacesInitializer.
+ */
+private static final String FACES_SERVLET_FOUND = 
"org.apache.myfaces.FACES_SERVLET_FOUND"; 
+
 private static final String INITIALIZE_ALWAYS_STANDALONE = 
"org.apache.myfaces.INITIALIZE_ALWAYS_STANDALONE";
 
 /**
@@ -162,7 +169,8 @@ public void onStartup(Set> clazzes, ServletContext 
servletContext) thro
 if (FACES_SERVLET_CLASS.getName().equals(className)
 || isDelegatedFacesServlet(className))
 {
-// we found a FacesServlet, so we have nothing to do!
+// we found a FacesServlet; set an attribute for use 
during initialization
+servletContext.setAttribute(FACES_SERVLET_FOUND, 
Boolean.TRUE);
 return;
 }
 }
diff --git 
a/impl/src/main/java/org/apache/myfaces/webapp/AbstractFacesInitializer.java 
b/impl/src/main/java/org/apache/myfaces/webapp/AbstractFacesInitializer.java
index 3a833f719..c10bef7f5 100644
--- a/impl/src/main/java/org/apache/myfaces/webapp/AbstractFacesInitializer.java
+++ b/impl/src/main/java/org/apache/myfaces/webapp/AbstractFacesInitializer.java
@@ -83,6 +83,13 @@
  */
 private static final String FACES_SERVLET_ADDED_ATTRIBUTE = 
"org.apache.myfaces.DYNAMICALLY_ADDED_FACES_SERVLET";
 
+/**
+ * If the servlet mapping for the FacesServlet is found on the 
ServletContext, Boolean.TRUE 
+ * is stored under this key in the ServletContext.
+ * ATTENTION: this constant is duplicate in MyFacesContainerInitializer.
+ */
+private static final String FACES_SERVLET_FOUND = 
"org.apache.myfaces.FACES_SERVLET_FOUND"; 
+
 /**
  * This parameter specifies the ExpressionFactory implementation to use.
  */
@@ -153,16 +160,23 @@ public void initFaces(ServletContext servletContext)
 
 if 
(webConfigProvider.getFacesServletMappings(facesContext.getExternalContext()).isEmpty())
 {
-// check if the FacesServlet has been added dynamically
-// in a Servlet 3.0 environment by 
MyFacesContainerInitializer
-Boolean mappingAdded = (Boolean) 
servletContext.getAttribute(FACES_SERVLET_ADDED_ATTRIBUTE);
+// check to see if the FacesServlet was found by 
MyFacesContainerInitializer
+Boolean mappingAdded = (Boolean) 
servletContext.getAttribute(FACES_SERVLET_FOUND);
+
 if (mappingAdded == null || !mappingAdded)
 {
-if (log.isLoggable(Level.WARNING))
+// check if the FacesServlet has been added dynamically
+// in a Servlet 3.0 environment by 
MyFacesContainerInitializer
+mappingAdded = (Boolean) 
servletContext.getAttribute(FACES_SERVLET_ADDED_ATTRIBUTE);
+
+if (mappingAdded == null || !mappingAdded)
 {
-log.warning("No mappings of FacesServlet found. 
Abort initializing MyFaces.");
+if (log.isLoggable(Level.WARNING))
+{
+log.warning("No mappings of FacesServlet 
found. Abort initializing MyFaces.");
+}
+return;
 }
-return;
 }
 }
 }
@@ -347,16 +361,23 @@ public void 

[jira] [Commented] (MYFACES-3629) StartupServletContextListener crashes if FacesServlet is defined in web-fragments.

2018-08-23 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-3629?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16590682#comment-16590682
 ] 

ASF GitHub Bot commented on MYFACES-3629:
-

wtlucy opened a new pull request #17: MYFACES-3629 add context attr for case 
when faces servlet is found by SCI - 2.2.x
URL: https://github.com/apache/myfaces/pull/17
 
 
   Fixing this issue on the 2.2 branch


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


> StartupServletContextListener crashes if FacesServlet is defined in 
> web-fragments.
> --
>
> Key: MYFACES-3629
> URL: https://issues.apache.org/jira/browse/MYFACES-3629
> Project: MyFaces Core
>  Issue Type: Bug
>  Components: JSR-314
>Affects Versions: 2.1.9
>Reporter: Mark Struberg
>Assignee: Bill Lucy
>Priority: Major
>
> I'm trying to move all my common web.xml content from my 12 webapps in an EAR 
> into a web-fragment.xml which gets referenced.
> MyFaces fails with the following Exception if the FacesServlet is defined in 
> a web-fragment rather than web.xml:
> >If you did that and find nothing, the mistake might be due to the fact that 
> >you use some special  
> >web-containers which do not support registering context-listeners via TLD 
> >files and a context listener is not 
> > setup in your web.xml.
> > A typical config looks like this;
> > 
> >  
> > org.apache.myfaces.webapp.StartupServletContextListener
> > 
> In general the StartupServletContextListener defined in JSF-2.1 is pure PITA 
> as it does crash apps which do not have any JSF content at all!.
> We should scan if we either find a faces-config.xml or any *.xhtml files in 
> the app and if not we shall not start JSF.



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


[jira] [Commented] (MYFACES-3629) StartupServletContextListener crashes if FacesServlet is defined in web-fragments.

2018-08-23 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-3629?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16590648#comment-16590648
 ] 

ASF GitHub Bot commented on MYFACES-3629:
-

wtlucy closed pull request #16: MYFACES-3629 add context attr for case when 
faces servlet is found by SCI
URL: https://github.com/apache/myfaces/pull/16
 
 
   

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/impl/src/main/java/org/apache/myfaces/ee/MyFacesContainerInitializer.java 
b/impl/src/main/java/org/apache/myfaces/ee/MyFacesContainerInitializer.java
index 668c1cf41..485336146 100644
--- a/impl/src/main/java/org/apache/myfaces/ee/MyFacesContainerInitializer.java
+++ b/impl/src/main/java/org/apache/myfaces/ee/MyFacesContainerInitializer.java
@@ -115,6 +115,12 @@
  * is stored under this key in the ServletContext.
  */
 public static final String FACES_SERVLET_ADDED_ATTRIBUTE = 
"org.apache.myfaces.DYNAMICALLY_ADDED_FACES_SERVLET";
+
+/**
+ * If the servlet mapping for the FacesServlet is found on the 
ServletContext, Boolean.TRUE 
+ * is stored under this key in the ServletContext.
+ */
+public static final String FACES_SERVLET_FOUND = 
"org.apache.myfaces.FACES_SERVLET_FOUND";
 
 private static final String INITIALIZE_ALWAYS_STANDALONE = 
"org.apache.myfaces.INITIALIZE_ALWAYS_STANDALONE";
 
@@ -183,7 +189,8 @@ public void onStartup(Set> clazzes, ServletContext 
servletContext) thro
 if (FACES_SERVLET_CLASS.getName().equals(className)
 || isDelegatedFacesServlet(className))
 {
-// we found a FacesServlet, so we have nothing to do!
+// we found a FacesServlet; set an attribute for use 
during initialization
+servletContext.setAttribute(FACES_SERVLET_FOUND, 
Boolean.TRUE);
 return;
 }
 }
diff --git 
a/impl/src/main/java/org/apache/myfaces/webapp/AbstractFacesInitializer.java 
b/impl/src/main/java/org/apache/myfaces/webapp/AbstractFacesInitializer.java
index 0838fba51..4731154ab 100644
--- a/impl/src/main/java/org/apache/myfaces/webapp/AbstractFacesInitializer.java
+++ b/impl/src/main/java/org/apache/myfaces/webapp/AbstractFacesInitializer.java
@@ -161,17 +161,25 @@ public void initFaces(ServletContext servletContext)
 
 if 
(webConfigProvider.getFacesServletMappings(facesContext.getExternalContext()).isEmpty())
 {
-// check if the FacesServlet has been added dynamically
-// in a Servlet 3.0 environment by 
MyFacesContainerInitializer
+// check to see if the FacesServlet was found by 
MyFacesContainerInitializer
 Boolean mappingAdded = (Boolean) 
servletContext.getAttribute(
-
MyFacesContainerInitializer.FACES_SERVLET_ADDED_ATTRIBUTE);
+MyFacesContainerInitializer.FACES_SERVLET_FOUND);
+
 if (mappingAdded == null || !mappingAdded)
 {
-if (log.isLoggable(Level.WARNING))
+// check if the FacesServlet has been added dynamically
+// in a Servlet 3.0 environment by 
MyFacesContainerInitializer
+mappingAdded = (Boolean) servletContext.getAttribute(
+
MyFacesContainerInitializer.FACES_SERVLET_ADDED_ATTRIBUTE);
+
+if (mappingAdded == null || !mappingAdded)
 {
-log.warning("No mappings of FacesServlet found. 
Abort initializing MyFaces.");
+if (log.isLoggable(Level.WARNING))
+{
+log.warning("No mappings of FacesServlet 
found. Abort initializing MyFaces.");
+}
+return;
 }
-return;
 }
 }
 }
@@ -374,17 +382,25 @@ public void destroyFaces(ServletContext servletContext)
 
 if 
(webConfigProvider.getFacesServletMappings(facesContext.getExternalContext()).isEmpty())
 {
-// check if the FacesServlet has been added dynamically
-// in a Servlet 3.0 environment by MyFacesContainerInitializer
+// check to see if the FacesServlet was found by 
MyFacesContainerInitializer
 Boolean mappingAdded = (Boolean) servletContext.getAttribute(
- 

[jira] [Commented] (MYFACES-3629) StartupServletContextListener crashes if FacesServlet is defined in web-fragments.

2018-08-13 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-3629?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16578889#comment-16578889
 ] 

ASF GitHub Bot commented on MYFACES-3629:
-

wtlucy opened a new pull request #16: MYFACES-3629 add context attr for case 
when faces servlet is found by SCI
URL: https://github.com/apache/myfaces/pull/16
 
 
   Fix the web-fragment issue described in MYFACES-3629


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


> StartupServletContextListener crashes if FacesServlet is defined in 
> web-fragments.
> --
>
> Key: MYFACES-3629
> URL: https://issues.apache.org/jira/browse/MYFACES-3629
> Project: MyFaces Core
>  Issue Type: Bug
>  Components: JSR-314
>Affects Versions: 2.1.9
>Reporter: Mark Struberg
>Priority: Major
>
> I'm trying to move all my common web.xml content from my 12 webapps in an EAR 
> into a web-fragment.xml which gets referenced.
> MyFaces fails with the following Exception if the FacesServlet is defined in 
> a web-fragment rather than web.xml:
> >If you did that and find nothing, the mistake might be due to the fact that 
> >you use some special  
> >web-containers which do not support registering context-listeners via TLD 
> >files and a context listener is not 
> > setup in your web.xml.
> > A typical config looks like this;
> > 
> >  
> > org.apache.myfaces.webapp.StartupServletContextListener
> > 
> In general the StartupServletContextListener defined in JSF-2.1 is pure PITA 
> as it does crash apps which do not have any JSF content at all!.
> We should scan if we either find a faces-config.xml or any *.xhtml files in 
> the app and if not we shall not start JSF.



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


[jira] [Commented] (MYFACES-4249) [perf] minor change in CDataEndEscapeFilterWriter to not call str.charAt multiple times

2018-08-06 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16570674#comment-16570674
 ] 

ASF GitHub Bot commented on MYFACES-4249:
-

pnicolucci closed pull request #15: MYFACES-4249: Don't call charAt more than 
needed
URL: https://github.com/apache/myfaces/pull/15
 
 
   

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/impl/src/main/java/org/apache/myfaces/util/CDataEndEscapeFilterWriter.java 
b/impl/src/main/java/org/apache/myfaces/util/CDataEndEscapeFilterWriter.java
index 155d17882..a72403036 100644
--- a/impl/src/main/java/org/apache/myfaces/util/CDataEndEscapeFilterWriter.java
+++ b/impl/src/main/java/org/apache/myfaces/util/CDataEndEscapeFilterWriter.java
@@ -69,7 +69,7 @@ public void write(char[] cbuf, int off, int len) throws 
IOException
 

[jira] [Commented] (MYFACES-4249) [perf] minor change in CDataEndEscapeFilterWriter to not call str.charAt multiple times

2018-08-06 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16570671#comment-16570671
 ] 

ASF GitHub Bot commented on MYFACES-4249:
-

pnicolucci closed pull request #14: MYFACES-4249: Don't call charAt more than 
needed
URL: https://github.com/apache/myfaces/pull/14
 
 
   

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/impl/src/main/java/org/apache/myfaces/util/CDataEndEscapeFilterWriter.java 
b/impl/src/main/java/org/apache/myfaces/util/CDataEndEscapeFilterWriter.java
index 155d17882..a72403036 100644
--- a/impl/src/main/java/org/apache/myfaces/util/CDataEndEscapeFilterWriter.java
+++ b/impl/src/main/java/org/apache/myfaces/util/CDataEndEscapeFilterWriter.java
@@ -69,7 +69,7 @@ public void write(char[] cbuf, int off, int len) throws 
IOException
 

[jira] [Commented] (MYFACES-4249) [perf] minor change in CDataEndEscapeFilterWriter to not call str.charAt multiple times

2018-08-06 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16570643#comment-16570643
 ] 

ASF GitHub Bot commented on MYFACES-4249:
-

pnicolucci opened a new pull request #15: MYFACES-4249: Don't call charAt more 
than needed
URL: https://github.com/apache/myfaces/pull/15
 
 
   


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


> [perf] minor change in CDataEndEscapeFilterWriter to not call str.charAt 
> multiple times
> ---
>
> Key: MYFACES-4249
> URL: https://issues.apache.org/jira/browse/MYFACES-4249
> Project: MyFaces Core
>  Issue Type: Improvement
>Affects Versions: 2.2.12, 2.3.1
>Reporter: Paul Nicolucci
>Assignee: Paul Nicolucci
>Priority: Minor
> Fix For: 2.2.13, 2.3.2
>
>
> Currently we calll c2 = (char) str.charAt(off+i); when (char) 
> str.charAt(off+i) was previously stored in the write method to variable c so 
> we can easily just do the following c2=c and save some string manipulation.



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


[jira] [Commented] (MYFACES-4249) [perf] minor change in CDataEndEscapeFilterWriter to not call str.charAt multiple times

2018-08-06 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16570632#comment-16570632
 ] 

ASF GitHub Bot commented on MYFACES-4249:
-

pnicolucci opened a new pull request #14: MYFACES-4249: Don't call charAt more 
than needed
URL: https://github.com/apache/myfaces/pull/14
 
 
   


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


> [perf] minor change in CDataEndEscapeFilterWriter to not call str.charAt 
> multiple times
> ---
>
> Key: MYFACES-4249
> URL: https://issues.apache.org/jira/browse/MYFACES-4249
> Project: MyFaces Core
>  Issue Type: Improvement
>Affects Versions: 2.2.12, 2.3.1
>Reporter: Paul Nicolucci
>Assignee: Paul Nicolucci
>Priority: Minor
> Fix For: 2.2.13, 2.3.2
>
>
> Currently we calll c2 = (char) str.charAt(off+i); when (char) 
> str.charAt(off+i) was previously stored in the write method to variable c so 
> we can easily just do the following c2=c and save some string manipulation.



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


[jira] [Commented] (MYFACES-4244) [perf] Use StringBuilder rather than calling write many times to increase performance

2018-08-06 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4244?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16570612#comment-16570612
 ] 

ASF GitHub Bot commented on MYFACES-4244:
-

pnicolucci closed pull request #10: MYFACES-4244:Use StringBuilder rather than 
calling write multiple times
URL: https://github.com/apache/myfaces/pull/10
 
 
   

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/impl/src/main/java/org/apache/myfaces/util/CDataEndEscapeFilterWriter.java 
b/impl/src/main/java/org/apache/myfaces/util/CDataEndEscapeFilterWriter.java
index 155d17882..63c3cc55c 100644
--- a/impl/src/main/java/org/apache/myfaces/util/CDataEndEscapeFilterWriter.java
+++ b/impl/src/main/java/org/apache/myfaces/util/CDataEndEscapeFilterWriter.java
@@ -59,22 +59,35 @@ public void write(int c) throws IOException
 public void write(char[] cbuf, int off, int len) throws IOException
 {
 int index = off;
+StringBuilder sb = null;
 for (int i = 0; i < len; i++)
 {
 char c = cbuf[off+i];
 if (c1 == ']' && c2 == ']' && c == '>')
 {
-super.write(cbuf, index, i+1 - ( index - off ) ); 
+if (sb == null)
+{
+sb = new StringBuilder(len + 16);
+}
+sb.append(cbuf, index, i+1 - ( index - off ));
 index = off+i+1;
-

[jira] [Commented] (MYFACES-4244) [perf] Use StringBuilder rather than calling write many times to increase performance

2018-08-06 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4244?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16570611#comment-16570611
 ] 

ASF GitHub Bot commented on MYFACES-4244:
-

pnicolucci commented on issue #10: MYFACES-4244:Use StringBuilder rather than 
calling write multiple times
URL: https://github.com/apache/myfaces/pull/10#issuecomment-410808355
 
 
   After additional investigation we've determined this change is not necessary 
so I'm closing this Pull request.


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


> [perf] Use StringBuilder rather than calling write many times to increase 
> performance
> -
>
> Key: MYFACES-4244
> URL: https://issues.apache.org/jira/browse/MYFACES-4244
> Project: MyFaces Core
>  Issue Type: Improvement
>Affects Versions: 2.2.12, 2.3.1
>Reporter: Paul Nicolucci
>Assignee: Paul Nicolucci
>Priority: Minor
>
> Using StringBuilder.append performs better than calling Writer.write multiple 
> times because the path length for a StringBuffer.append is less than the path 
> length of a Writer.write operation.  By using StringBuilder, you only have to 
> call the write method once instead of N number of times per method.  
> The Shared StringBuilder may have some issues as well if there is any 
> multi-threaded use of the Shared StringBuilder.  If multiple threads could 
> use a particular StringBuilder you would end up getting incorrect output.  
> Another issue with the Shared StringBuilder for performance is it requires a 
> call to get it which can be more expensive than just newing up a new 
> StringBuilder.  
> From looking at the myfaces code, the Shared StringBuilder is used only for 
> special cases presently and not widely used.



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


[jira] [Commented] (MYFACES-4247) [perf] minor performance improvements in FastWriter and a couple Renderers

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


[ 
https://issues.apache.org/jira/browse/MYFACES-4247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16545471#comment-16545471
 ] 

ASF GitHub Bot commented on MYFACES-4247:
-

pnicolucci closed pull request #12: MYFACES-4247: reduce number of char[] 
objects and CommonPropertyUtils…
URL: https://github.com/apache/myfaces/pull/12
 
 
   

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/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlLabelRenderer.java 
b/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlLabelRenderer.java
index da0c3882c..110ff4225 100755
--- 
a/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlLabelRenderer.java
+++ 
b/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlLabelRenderer.java
@@ -140,7 +140,7 @@ public void encodeBegin(FacesContext facesContext, 
UIComponent uiComponent) thro
 if (isCommonPropertiesOptimizationEnabled(facesContext))
 {
 
CommonPropertyUtils.renderLabelPassthroughPropertiesWithoutEvents(writer, 
-
CommonPropertyUtils.getCommonPropertiesMarked(uiComponent), uiComponent);
+commonPropertiesMarked, uiComponent);
 }
 else
 {
diff --git 
a/impl/src/main/java/org/apache/myfaces/view/facelets/util/FastWriter.java 
b/impl/src/main/java/org/apache/myfaces/view/facelets/util/FastWriter.java
index ba00f97c0..c34abdb9d 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/util/FastWriter.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/util/FastWriter.java
@@ -86,12 +86,14 @@ public void write(int c) throws IOException
 
 public void write(String str, int off, int len) throws IOException
 {
-this.write(str.toCharArray(), off, len);
+overflow(len);
+str.getChars(off, off+len, this.buff, size);
+this.size += len;
 }
 
 public void write(String str) throws IOException
 {
-this.write(str.toCharArray(), 0, str.length());
+this.write(str, 0, str.length());
 }
 
 public void reset()
diff --git 
a/impl/src/test/java/org/apache/myfaces/view/facelets/util/FastWriterTest.java 
b/impl/src/test/java/org/apache/myfaces/view/facelets/util/FastWriterTest.java
new file mode 100644
index 0..465b0c589
--- /dev/null
+++ 
b/impl/src/test/java/org/apache/myfaces/view/facelets/util/FastWriterTest.java
@@ -0,0 +1,65 @@
+/*
+ * 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.myfaces.view.facelets.util;
+
+import org.apache.myfaces.view.facelets.util.FastWriter;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class FastWriterTest 
+{
+// Test FastWriter.write(String str, int off, int len)
+@Test
+public void testFastWriterWriteString() throws Exception
+{
+String sampleStringToWrite = "Test String to write";
+
+FastWriter fw = new FastWriter();
+fw.write(sampleStringToWrite, 0, sampleStringToWrite.length());
+
+// fw.toString() should be: Test String to write
+Assert.assertEquals(fw.toString(), sampleStringToWrite);
+}
+
+@Test
+public void testFastWriterWriteStringOffSet() throws Exception
+{
+int offSet = 5;
+String sampleStringToWrite = "Test String to write";
+
+FastWriter fw = new FastWriter();
+fw.write(sampleStringToWrite, offSet, sampleStringToWrite.length() - 
offSet);
+
+// fw.toString() should be: String to write
+Assert.assertEquals(fw.toString(), 
sampleStringToWrite.substring(offSet));
+}
+
+@Test
+public void testFastWriterWriteStringLength() throws Exception
+{
+   String sampleStringToWrite = "Test String to write";
+   int length = sampleStringToWrite.substring(0, 
sampleStringToWrite.indexOf(" ")).length();
+   
+   FastWriter fw = new FastWriter();
+   

[jira] [Commented] (MYFACES-4247) [perf] minor performance improvements in FastWriter and a couple Renderers

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


[ 
https://issues.apache.org/jira/browse/MYFACES-4247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16545470#comment-16545470
 ] 

ASF GitHub Bot commented on MYFACES-4247:
-

pnicolucci edited a comment on issue #11: MYFACES-4247: reduce number of char[] 
objects and CommonPropertyUtils…
URL: https://github.com/apache/myfaces/pull/11#issuecomment-405272258
 
 
   I'll add a couple unit tests and ensure the behavior is the same before and 
after the changes just to be extra safe.


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


> [perf] minor performance improvements in FastWriter and a couple Renderers
> --
>
> Key: MYFACES-4247
> URL: https://issues.apache.org/jira/browse/MYFACES-4247
> Project: MyFaces Core
>  Issue Type: Improvement
>  Components: JSR-372
>Affects Versions: 2.2.12, 2.3.1
>Reporter: Paul Nicolucci
>Assignee: Paul Nicolucci
>Priority: Minor
> Fix For: 2.2.13, 2.3.2
>
>
> Reduces the number of char[] objects that are created. As such, with this 
> change, less garbage is created and as a result there are less garbage 
> collections run.
> In addition some minor updates to not call CommonPropertyUtils when it is not 
> necessary to avoid redundant method calls that cause a looking in the 
> attributes.



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


[jira] [Commented] (MYFACES-4247) [perf] minor performance improvements in FastWriter and a couple Renderers

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


[ 
https://issues.apache.org/jira/browse/MYFACES-4247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16545469#comment-16545469
 ] 

ASF GitHub Bot commented on MYFACES-4247:
-

pnicolucci closed pull request #11: MYFACES-4247: reduce number of char[] 
objects and CommonPropertyUtils…
URL: https://github.com/apache/myfaces/pull/11
 
 
   

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/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlLabelRenderer.java 
b/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlLabelRenderer.java
index 8bdb37651..8417ed672 100755
--- 
a/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlLabelRenderer.java
+++ 
b/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlLabelRenderer.java
@@ -143,7 +143,7 @@ public void encodeBegin(FacesContext facesContext, 
UIComponent uiComponent) thro
 if (isCommonPropertiesOptimizationEnabled(facesContext))
 {
 
CommonPropertyUtils.renderLabelPassthroughPropertiesWithoutEvents(writer, 
-
CommonPropertyUtils.getCommonPropertiesMarked(uiComponent), uiComponent);
+commonPropertiesMarked, uiComponent);
 }
 else
 {
diff --git 
a/impl/src/main/java/org/apache/myfaces/view/facelets/util/FastWriter.java 
b/impl/src/main/java/org/apache/myfaces/view/facelets/util/FastWriter.java
index ba00f97c0..c34abdb9d 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/util/FastWriter.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/util/FastWriter.java
@@ -86,12 +86,14 @@ public void write(int c) throws IOException
 
 public void write(String str, int off, int len) throws IOException
 {
-this.write(str.toCharArray(), off, len);
+overflow(len);
+str.getChars(off, off+len, this.buff, size);
+this.size += len;
 }
 
 public void write(String str) throws IOException
 {
-this.write(str.toCharArray(), 0, str.length());
+this.write(str, 0, str.length());
 }
 
 public void reset()
diff --git 
a/impl/src/test/java/org/apache/myfaces/view/facelets/util/FastWriterTest.java 
b/impl/src/test/java/org/apache/myfaces/view/facelets/util/FastWriterTest.java
new file mode 100644
index 0..465b0c589
--- /dev/null
+++ 
b/impl/src/test/java/org/apache/myfaces/view/facelets/util/FastWriterTest.java
@@ -0,0 +1,65 @@
+/*
+ * 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.myfaces.view.facelets.util;
+
+import org.apache.myfaces.view.facelets.util.FastWriter;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class FastWriterTest 
+{
+// Test FastWriter.write(String str, int off, int len)
+@Test
+public void testFastWriterWriteString() throws Exception
+{
+String sampleStringToWrite = "Test String to write";
+
+FastWriter fw = new FastWriter();
+fw.write(sampleStringToWrite, 0, sampleStringToWrite.length());
+
+// fw.toString() should be: Test String to write
+Assert.assertEquals(fw.toString(), sampleStringToWrite);
+}
+
+@Test
+public void testFastWriterWriteStringOffSet() throws Exception
+{
+int offSet = 5;
+String sampleStringToWrite = "Test String to write";
+
+FastWriter fw = new FastWriter();
+fw.write(sampleStringToWrite, offSet, sampleStringToWrite.length() - 
offSet);
+
+// fw.toString() should be: String to write
+Assert.assertEquals(fw.toString(), 
sampleStringToWrite.substring(offSet));
+}
+
+@Test
+public void testFastWriterWriteStringLength() throws Exception
+{
+   String sampleStringToWrite = "Test String to write";
+   int length = sampleStringToWrite.substring(0, 
sampleStringToWrite.indexOf(" ")).length();
+   
+   FastWriter fw = new FastWriter();
+   

[jira] [Commented] (MYFACES-4248) OpenWebBeansELResolverComparator references outdated openwebbeans package

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


[ 
https://issues.apache.org/jira/browse/MYFACES-4248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16545357#comment-16545357
 ] 

ASF GitHub Bot commented on MYFACES-4248:
-

pnicolucci closed pull request #13: MYFACES-4248
URL: https://github.com/apache/myfaces/pull/13
 
 
   

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/impl/src/main/java/org/apache/myfaces/el/unified/OpenWebBeansELResolverComparator.java
 
b/impl/src/main/java/org/apache/myfaces/el/unified/OpenWebBeansELResolverComparator.java
index 06fed6728..425d23553 100644
--- 
a/impl/src/main/java/org/apache/myfaces/el/unified/OpenWebBeansELResolverComparator.java
+++ 
b/impl/src/main/java/org/apache/myfaces/el/unified/OpenWebBeansELResolverComparator.java
@@ -33,15 +33,17 @@
 public class OpenWebBeansELResolverComparator implements Comparator
 {
 
-public static final String OWB_RESOLVER = 
"org.apache.webbeans.el.WebBeansELResolver";
+public static final String OWB_RESOLVER_OLD = 
"org.apache.webbeans.el.WebBeansELResolver";
+public static final String OWB_RESOLVER = 
"org.apache.webbeans.el22.WebBeansELResolver";
 
+@Override
 public int compare(ELResolver r1, ELResolver r2)
 {
-if (r1.getClass().getName().equals(OWB_RESOLVER))
+if (r1.getClass().getName().equals(OWB_RESOLVER_OLD) || 
r1.getClass().getName().equals(OWB_RESOLVER))
 {
 return 1;
 }
-else if (r2.getClass().getName().equals(OWB_RESOLVER))
+else if (r2.getClass().getName().equals(OWB_RESOLVER_OLD) || 
r2.getClass().getName().equals(OWB_RESOLVER))
 {
 return -1;
 }


 


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


> OpenWebBeansELResolverComparator references outdated openwebbeans package
> -
>
> Key: MYFACES-4248
> URL: https://issues.apache.org/jira/browse/MYFACES-4248
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.2.12, 2.3.1
>Reporter: Vicente Rossello Jaume
>Assignee: Thomas Andraschko
>Priority: Minor
> Fix For: 2.2.13, 2.3.2
>
>
> OpenWebBeansELResolverComparator references 
> org.apache.webbeans.el.WebBeansELResolver.
> I think that the correct one is org.apache.webbeans.el22.WebBeansELResolver , 
> at least since openwebbeans 1.7



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


[jira] [Commented] (MYFACES-4248) OpenWebBeansELResolverComparator references outdated openwebbeans package

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


[ 
https://issues.apache.org/jira/browse/MYFACES-4248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16545341#comment-16545341
 ] 

ASF GitHub Bot commented on MYFACES-4248:
-

pnicolucci opened a new pull request #13: MYFACES-4248
URL: https://github.com/apache/myfaces/pull/13
 
 
   


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


> OpenWebBeansELResolverComparator references outdated openwebbeans package
> -
>
> Key: MYFACES-4248
> URL: https://issues.apache.org/jira/browse/MYFACES-4248
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.2.12, 2.3.1
>Reporter: Vicente Rossello Jaume
>Assignee: Thomas Andraschko
>Priority: Minor
> Fix For: 2.2.13, 2.3.2
>
>
> OpenWebBeansELResolverComparator references 
> org.apache.webbeans.el.WebBeansELResolver.
> I think that the correct one is org.apache.webbeans.el22.WebBeansELResolver , 
> at least since openwebbeans 1.7



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


[jira] [Commented] (MYFACES-4247) [perf] minor performance improvements in FastWriter and a couple Renderers

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


[ 
https://issues.apache.org/jira/browse/MYFACES-4247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16545275#comment-16545275
 ] 

ASF GitHub Bot commented on MYFACES-4247:
-

pnicolucci commented on issue #11: MYFACES-4247: reduce number of char[] 
objects and CommonPropertyUtils…
URL: https://github.com/apache/myfaces/pull/11#issuecomment-405272258
 
 
   I'll add a couple unit tests and ensure the behavior is the same before an 
after the changes just to be extra safe.


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


> [perf] minor performance improvements in FastWriter and a couple Renderers
> --
>
> Key: MYFACES-4247
> URL: https://issues.apache.org/jira/browse/MYFACES-4247
> Project: MyFaces Core
>  Issue Type: Improvement
>  Components: JSR-372
>Affects Versions: 2.2.12, 2.3.1
>Reporter: Paul Nicolucci
>Assignee: Paul Nicolucci
>Priority: Minor
>
> Reduces the number of char[] objects that are created. As such, with this 
> change, less garbage is created and as a result there are less garbage 
> collections run.
> In addition some minor updates to not call CommonPropertyUtils when it is not 
> necessary to avoid redundant method calls that cause a looking in the 
> attributes.



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


[jira] [Commented] (MYFACES-4247) [perf] minor performance improvements in FastWriter and a couple Renderers

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


[ 
https://issues.apache.org/jira/browse/MYFACES-4247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16545211#comment-16545211
 ] 

ASF GitHub Bot commented on MYFACES-4247:
-

tandraschko commented on issue #11: MYFACES-4247: reduce number of char[] 
objects and CommonPropertyUtils…
URL: https://github.com/apache/myfaces/pull/11#issuecomment-405248399
 
 
   if it works fine, i'm ok with it
   it would be just better if we would have a unittest for it?


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


> [perf] minor performance improvements in FastWriter and a couple Renderers
> --
>
> Key: MYFACES-4247
> URL: https://issues.apache.org/jira/browse/MYFACES-4247
> Project: MyFaces Core
>  Issue Type: Improvement
>  Components: JSR-372
>Affects Versions: 2.2.12, 2.3.1
>Reporter: Paul Nicolucci
>Assignee: Paul Nicolucci
>Priority: Minor
>
> Reduces the number of char[] objects that are created. As such, with this 
> change, less garbage is created and as a result there are less garbage 
> collections run.
> In addition some minor updates to not call CommonPropertyUtils when it is not 
> necessary to avoid redundant method calls that cause a looking in the 
> attributes.



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


[jira] [Commented] (MYFACES-4247) [perf] minor performance improvements in FastWriter and a couple Renderers

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


[ 
https://issues.apache.org/jira/browse/MYFACES-4247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16545203#comment-16545203
 ] 

ASF GitHub Bot commented on MYFACES-4247:
-

pnicolucci commented on issue #11: MYFACES-4247: reduce number of char[] 
objects and CommonPropertyUtils…
URL: https://github.com/apache/myfaces/pull/11#issuecomment-405247268
 
 
   @tandraschko : String.toCharArray() is what is not called now
   The string uses its internal char[] instead of a copy to put the chars in 
the this.buff object.
   Otherwise you make a copy of the char[] with toCharArray() and then copy 
that char[] into this.buff
   
   This removes one copy of the char[]


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


> [perf] minor performance improvements in FastWriter and a couple Renderers
> --
>
> Key: MYFACES-4247
> URL: https://issues.apache.org/jira/browse/MYFACES-4247
> Project: MyFaces Core
>  Issue Type: Improvement
>  Components: JSR-372
>Affects Versions: 2.2.12, 2.3.1
>Reporter: Paul Nicolucci
>Assignee: Paul Nicolucci
>Priority: Minor
>
> Reduces the number of char[] objects that are created. As such, with this 
> change, less garbage is created and as a result there are less garbage 
> collections run.
> In addition some minor updates to not call CommonPropertyUtils when it is not 
> necessary to avoid redundant method calls that cause a looking in the 
> attributes.



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


[jira] [Commented] (MYFACES-4247) [perf] minor performance improvements in FastWriter and a couple Renderers

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


[ 
https://issues.apache.org/jira/browse/MYFACES-4247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16545198#comment-16545198
 ] 

ASF GitHub Bot commented on MYFACES-4247:
-

tandraschko commented on issue #11: MYFACES-4247: reduce number of char[] 
objects and CommonPropertyUtils…
URL: https://github.com/apache/myfaces/pull/11#issuecomment-405244998
 
 
   +1 for the CommonProperties stuff
   
   +0 for the changes in write
   could you explain them before?


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


> [perf] minor performance improvements in FastWriter and a couple Renderers
> --
>
> Key: MYFACES-4247
> URL: https://issues.apache.org/jira/browse/MYFACES-4247
> Project: MyFaces Core
>  Issue Type: Improvement
>  Components: JSR-372
>Affects Versions: 2.2.12, 2.3.1
>Reporter: Paul Nicolucci
>Assignee: Paul Nicolucci
>Priority: Minor
>
> Reduces the number of char[] objects that are created. As such, with this 
> change, less garbage is created and as a result there are less garbage 
> collections run.
> In addition some minor updates to not call CommonPropertyUtils when it is not 
> necessary to avoid redundant method calls that cause a looking in the 
> attributes.



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


[jira] [Commented] (MYFACES-4247) [perf] minor performance improvements in FastWriter and a couple Renderers

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


[ 
https://issues.apache.org/jira/browse/MYFACES-4247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16545196#comment-16545196
 ] 

ASF GitHub Bot commented on MYFACES-4247:
-

pnicolucci opened a new pull request #12: MYFACES-4247: reduce number of char[] 
objects and CommonPropertyUtils…
URL: https://github.com/apache/myfaces/pull/12
 
 
   … calls


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


> [perf] minor performance improvements in FastWriter and a couple Renderers
> --
>
> Key: MYFACES-4247
> URL: https://issues.apache.org/jira/browse/MYFACES-4247
> Project: MyFaces Core
>  Issue Type: Improvement
>  Components: JSR-372
>Affects Versions: 2.2.12, 2.3.1
>Reporter: Paul Nicolucci
>Assignee: Paul Nicolucci
>Priority: Minor
>
> Reduces the number of char[] objects that are created. As such, with this 
> change, less garbage is created and as a result there are less garbage 
> collections run.
> In addition some minor updates to not call CommonPropertyUtils when it is not 
> necessary to avoid redundant method calls that cause a looking in the 
> attributes.



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


[jira] [Commented] (MYFACES-4247) [perf] minor performance improvements in FastWriter and a couple Renderers

2018-07-12 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16541902#comment-16541902
 ] 

ASF GitHub Bot commented on MYFACES-4247:
-

pnicolucci commented on issue #11: MYFACES-4247: reduce number of char[] 
objects and CommonPropertyUtils…
URL: https://github.com/apache/myfaces/pull/11#issuecomment-404571508
 
 
   @tandraschko  can you review these changes and let me know if you have any 
concerns? If not I'll merge this PR.


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


> [perf] minor performance improvements in FastWriter and a couple Renderers
> --
>
> Key: MYFACES-4247
> URL: https://issues.apache.org/jira/browse/MYFACES-4247
> Project: MyFaces Core
>  Issue Type: Improvement
>  Components: JSR-372
>Affects Versions: 2.2.12, 2.3.1
>Reporter: Paul Nicolucci
>Assignee: Paul Nicolucci
>Priority: Minor
>
> Reduces the number of char[] objects that are created. As such, with this 
> change, less garbage is created and as a result there are less garbage 
> collections run.
> In addition some minor updates to not call CommonPropertyUtils when it is not 
> necessary to avoid redundant method calls that cause a looking in the 
> attributes.



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


[jira] [Commented] (MYFACES-4247) [perf] minor performance improvements in FastWriter and a couple Renderers

2018-07-12 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16541773#comment-16541773
 ] 

ASF GitHub Bot commented on MYFACES-4247:
-

pnicolucci opened a new pull request #11: MYFACES-4247: reduce number of char[] 
objects and CommonPropertyUtils…
URL: https://github.com/apache/myfaces/pull/11
 
 
   … calls


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


> [perf] minor performance improvements in FastWriter and a couple Renderers
> --
>
> Key: MYFACES-4247
> URL: https://issues.apache.org/jira/browse/MYFACES-4247
> Project: MyFaces Core
>  Issue Type: Improvement
>  Components: JSR-372
>Affects Versions: 2.2.12, 2.3.1
>Reporter: Paul Nicolucci
>Assignee: Paul Nicolucci
>Priority: Minor
>
> Reduces the number of char[] objects that are created. As such, with this 
> change, less garbage is created and as a result there are less garbage 
> collections run.
> In addition some minor updates to not call CommonPropertyUtils when it is not 
> necessary to avoid redundant method calls that cause a looking in the 
> attributes.



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


[jira] [Commented] (MYFACES-4244) [perf] Use StringBuilder rather than calling write many times to increase performance

2018-07-11 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4244?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16540163#comment-16540163
 ] 

ASF GitHub Bot commented on MYFACES-4244:
-

pnicolucci opened a new pull request #10: MYFACES-4244:Use StringBuilder rather 
than calling write multiple times
URL: https://github.com/apache/myfaces/pull/10
 
 
   Creating this PR for discussion on the dev list for MYFACES-4244: 
https://issues.apache.org/jira/browse/MYFACES-4244


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


> [perf] Use StringBuilder rather than calling write many times to increase 
> performance
> -
>
> Key: MYFACES-4244
> URL: https://issues.apache.org/jira/browse/MYFACES-4244
> Project: MyFaces Core
>  Issue Type: Improvement
>Affects Versions: 2.2.12, 2.3.1
>Reporter: Paul Nicolucci
>Assignee: Paul Nicolucci
>Priority: Minor
> Fix For: 2.2.13, 2.3.2
>
>




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


[jira] [Commented] (MYFACES-4239) [perf] Additional performance improvements

2018-06-28 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16526583#comment-16526583
 ] 

ASF GitHub Bot commented on MYFACES-4239:
-

pnicolucci closed pull request #9: MYFACES-4239: Multiple performance 
improvements
URL: https://github.com/apache/myfaces/pull/9
 
 
   

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/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java 
b/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java
index 6ec1321ae..6b3059b59 100755
--- a/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java
+++ b/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java
@@ -2235,19 +2235,19 @@ private void _handleListenerForAnnotations(FacesContext 
context, Object inspecte
 List listenerForList = null;
 boolean isCachedList = false;
 
-if(isProduction && _classToListenerForMap.containsKey(inspectedClass))
+if(isProduction)
 {
 listenerForList = _classToListenerForMap.get(inspectedClass);
-if(listenerForList == null)
-{
-return; //class has been inspected and did not contain any 
listener annotations
-}
-else if (listenerForList.isEmpty())
+
+if (listenerForList != null)
 {
-return;
+if (listenerForList.isEmpty())
+{
+return; //class has been inspected and did not contain any 
listener annotations
+}
+
+isCachedList = true;// else annotations were found in the 
cache
 }
-
-isCachedList = true;// else annotations were found in the cache
 }
 
 if(listenerForList == null) //not in production or the class hasn't 
been inspected yet
@@ -2378,19 +2378,19 @@ private void 
_handleResourceDependencyAnnotations(FacesContext context, Class
 List dependencyList = null;
 boolean isCachedList = false;
 
-if(isProduction && 
_classToResourceDependencyMap.containsKey(inspectedClass))
+if(isProduction)
 {
 dependencyList = _classToResourceDependencyMap.get(inspectedClass);
-if(dependencyList == null)
-{
-return; //class has been inspected and did not contain any 
resource dependency annotations
-}
-else if (dependencyList.isEmpty())
+
+if (dependencyList != null)
 {
-return;
+if (dependencyList.isEmpty())
+{
+return; //class has been inspected and did not contain any 
resource dependency annotations
+}
+
+isCachedList = true;// else annotations were found in the 
cache
 }
-
-isCachedList = true;// else annotations were found in the cache
 }
 
 if(dependencyList == null)  //not in production or the class hasn't 
been inspected yet
diff --git 
a/impl/src/main/java/org/apache/myfaces/context/servlet/ServletExternalContextImpl.java
 
b/impl/src/main/java/org/apache/myfaces/context/servlet/ServletExternalContextImpl.java
index b468a7915..60f67cd0d 100755
--- 
a/impl/src/main/java/org/apache/myfaces/context/servlet/ServletExternalContextImpl.java
+++ 
b/impl/src/main/java/org/apache/myfaces/context/servlet/ServletExternalContextImpl.java
@@ -844,11 +844,18 @@ private String encodeURL(String baseUrl, Map> parameters)
 }
 }
 
+boolean hasParams = paramMap != null && paramMap.size()>0;
+
+if (!hasParams && fragment == null)
+{
+return baseUrl;
+}
+
 // start building the new URL
 StringBuilder newUrl = new StringBuilder(baseUrl);
 
 //now add the updated param list onto the url
-if (paramMap != null && paramMap.size()>0)
+if (hasParams)
 {
 boolean isFirstPair = true;
 for (Map.Entry> pair : paramMap.entrySet())
@@ -884,7 +891,8 @@ private String encodeURL(String baseUrl, Map> parameters)
 //add the fragment back on (if any)
 if (fragment != null)
 {
-newUrl.append(URL_FRAGMENT_SEPERATOR + fragment);
+newUrl.append(URL_FRAGMENT_SEPERATOR);
+newUrl.append(fragment);
 }
 
 return newUrl.toString();
diff --git 
a/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlResponseWriterImpl.java
 

[jira] [Commented] (MYFACES-4239) [perf] Additional performance improvements

2018-06-26 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16523693#comment-16523693
 ] 

ASF GitHub Bot commented on MYFACES-4239:
-

pnicolucci closed pull request #8: MYFACES-4239: Multiple performance 
improvements
URL: https://github.com/apache/myfaces/pull/8
 
 
   

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/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java 
b/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java
index de30135a8..181276855 100755
--- a/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java
+++ b/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java
@@ -2322,19 +2322,19 @@ private void _handleListenerForAnnotations(FacesContext 
context, Object inspecte
 List listenerForList = null;
 boolean isCachedList = false;
 
-if(isProduction && _classToListenerForMap.containsKey(inspectedClass))
+if(isProduction)
 {
 listenerForList = _classToListenerForMap.get(inspectedClass);
-if(listenerForList == null)
-{
-return; //class has been inspected and did not contain any 
listener annotations
-}
-else if (listenerForList.isEmpty())
+
+if (listenerForList != null)
 {
-return;
+if (listenerForList.isEmpty())
+{
+return; //class has been inspected and did not contain any 
listener annotations
+}
+
+isCachedList = true;// else annotations were found in the 
cache
 }
-
-isCachedList = true;// else annotations were found in the cache
 }
 
 if(listenerForList == null) //not in production or the class hasn't 
been inspected yet
@@ -2465,19 +2465,19 @@ private void 
_handleResourceDependencyAnnotations(FacesContext context, Class
 List dependencyList = null;
 boolean isCachedList = false;
 
-if(isProduction && 
_classToResourceDependencyMap.containsKey(inspectedClass))
+if(isProduction)
 {
 dependencyList = _classToResourceDependencyMap.get(inspectedClass);
-if(dependencyList == null)
-{
-return; //class has been inspected and did not contain any 
resource dependency annotations
-}
-else if (dependencyList.isEmpty())
+
+if (dependencyList != null)
 {
-return;
+if (dependencyList.isEmpty())
+{
+return; //class has been inspected and did not contain any 
resource dependency annotations
+}
+
+isCachedList = true;// else annotations were found in the 
cache
 }
-
-isCachedList = true;// else annotations were found in the cache
 }
 
 if(dependencyList == null)  //not in production or the class hasn't 
been inspected yet
diff --git 
a/impl/src/main/java/org/apache/myfaces/context/servlet/ServletExternalContextImpl.java
 
b/impl/src/main/java/org/apache/myfaces/context/servlet/ServletExternalContextImpl.java
index 8946096f1..a67fc6a62 100755
--- 
a/impl/src/main/java/org/apache/myfaces/context/servlet/ServletExternalContextImpl.java
+++ 
b/impl/src/main/java/org/apache/myfaces/context/servlet/ServletExternalContextImpl.java
@@ -947,11 +947,18 @@ private String encodeURL(String baseUrl, Map> parameters)
 }
 }
 
+boolean hasParams = paramMap != null && paramMap.size()>0;
+
+if (!hasParams && fragment == null) 
+{
+return baseUrl;
+}
+
 // start building the new URL
 StringBuilder newUrl = new StringBuilder(baseUrl);
 
 //now add the updated param list onto the url
-if (paramMap != null && paramMap.size()>0)
+if (hasParams)
 {
 boolean isFirstPair = true;
 for (Map.Entry> pair : paramMap.entrySet())
@@ -989,7 +996,8 @@ private String encodeURL(String baseUrl, Map> parameters)
 //add the fragment back on (if any)
 if (fragment != null)
 {
-newUrl.append(URL_FRAGMENT_SEPERATOR + fragment);
+newUrl.append(URL_FRAGMENT_SEPERATOR);
+newUrl.append(fragment);
 }
 
 return newUrl.toString();
diff --git 
a/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlResponseWriterImpl.java
 

[jira] [Commented] (MYFACES-4239) [perf] Additional performance improvements

2018-06-25 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16522740#comment-16522740
 ] 

ASF GitHub Bot commented on MYFACES-4239:
-

tandraschko commented on issue #8: MYFACES-4239: Multiple performance 
improvements
URL: https://github.com/apache/myfaces/pull/8#issuecomment-400075148
 
 
   Yep! :)
   


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


> [perf] Additional performance improvements
> --
>
> Key: MYFACES-4239
> URL: https://issues.apache.org/jira/browse/MYFACES-4239
> Project: MyFaces Core
>  Issue Type: Improvement
>  Components: JSR-372
>Affects Versions: 2.2.12, 2.3.1
>Reporter: Paul Nicolucci
>Assignee: Paul Nicolucci
>Priority: Minor
> Fix For: 2.2.13, 2.3.2
>
>
> Some performance improvements in :
> 1) ApplicationImpl.java 
> 2) ServletExternalContextImpl.java
> 3) HtmlResponseWriterImpl.java
> 4) HTMLEncoder.java, we also discussed on the mailing list changing 
> encodeURIAtributte to encodeUriAttribute to fix the typo in the method name 
> so I'll do that here as well.
> 5) CDataEndEscapeFilterWriter.java
> 6) ResourceValidationUtils.java
> The following changes were made:
> -  Skip calling ConcurrentHashMap.containsKey since we will call get
> afterward if containsKey == true.
> - Change to use StringBuilders instead of calling Writer.write so often.
> - Stop using Boolean for variables that don't have a null meaning. If
> null == false, then just use boolean with a default of false.
> - Don't call String.length() constantly for String variables that aren't 
> re-assigned.
> - Change conditional order to avoid calling validateResourceName unless the 
> other conditions are true



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


[jira] [Commented] (MYFACES-4239) [perf] Additional performance improvements

2018-06-25 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16522643#comment-16522643
 ] 

ASF GitHub Bot commented on MYFACES-4239:
-

pnicolucci commented on issue #8: MYFACES-4239: Multiple performance 
improvements
URL: https://github.com/apache/myfaces/pull/8#issuecomment-400047548
 
 
   @tandraschko  ok with the current changes in this PR?


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


> [perf] Additional performance improvements
> --
>
> Key: MYFACES-4239
> URL: https://issues.apache.org/jira/browse/MYFACES-4239
> Project: MyFaces Core
>  Issue Type: Improvement
>  Components: JSR-372
>Affects Versions: 2.2.12, 2.3.1
>Reporter: Paul Nicolucci
>Assignee: Paul Nicolucci
>Priority: Minor
> Fix For: 2.2.13, 2.3.2
>
>
> Some performance improvements in :
> 1) ApplicationImpl.java 
> 2) ServletExternalContextImpl.java
> 3) HtmlResponseWriterImpl.java
> 4) HTMLEncoder.java, we also discussed on the mailing list changing 
> encodeURIAtributte to encodeUriAttribute to fix the typo in the method name 
> so I'll do that here as well.
> 5) CDataEndEscapeFilterWriter.java
> 6) ResourceValidationUtils.java
> The following changes were made:
> -  Skip calling ConcurrentHashMap.containsKey since we will call get
> afterward if containsKey == true.
> - Change to use StringBuilders instead of calling Writer.write so often.
> - Stop using Boolean for variables that don't have a null meaning. If
> null == false, then just use boolean with a default of false.
> - Don't call String.length() constantly for String variables that aren't 
> re-assigned.
> - Change conditional order to avoid calling validateResourceName unless the 
> other conditions are true



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


[jira] [Commented] (MYFACES-4239) [perf] Additional performance improvements

2018-06-25 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16522249#comment-16522249
 ] 

ASF GitHub Bot commented on MYFACES-4239:
-

pnicolucci commented on issue #8: MYFACES-4239: Multiple performance 
improvements
URL: https://github.com/apache/myfaces/pull/8#issuecomment-399940917
 
 
   I'll work to remove the sb changes from this PR and will open a new issue / 
PR for the changes and get a discussion started on the mailing list.


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


> [perf] Additional performance improvements
> --
>
> Key: MYFACES-4239
> URL: https://issues.apache.org/jira/browse/MYFACES-4239
> Project: MyFaces Core
>  Issue Type: Improvement
>  Components: JSR-372
>Affects Versions: 2.2.12, 2.3.1
>Reporter: Paul Nicolucci
>Assignee: Paul Nicolucci
>Priority: Minor
> Fix For: 2.2.13, 2.3.2
>
>
> Some performance improvements in :
> 1) ApplicationImpl.java 
> 2) ServletExternalContextImpl.java
> 3) HtmlResponseWriterImpl.java
> 4) HTMLEncoder.java, we also discussed on the mailing list changing 
> encodeURIAtributte to encodeUriAttribute to fix the typo in the method name 
> so I'll do that here as well.
> 5) CDataEndEscapeFilterWriter.java
> 6) ResourceValidationUtils.java
> The following changes were made:
> -  Skip calling ConcurrentHashMap.containsKey since we will call get
> afterward if containsKey == true.
> - Change to use StringBuilders instead of calling Writer.write so often.
> - Stop using Boolean for variables that don't have a null meaning. If
> null == false, then just use boolean with a default of false.
> - Don't call String.length() constantly for String variables that aren't 
> re-assigned.
> - Change conditional order to avoid calling validateResourceName unless the 
> other conditions are true



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


[jira] [Commented] (MYFACES-4239) [perf] Additional performance improvements

2018-06-22 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16520828#comment-16520828
 ] 

ASF GitHub Bot commented on MYFACES-4239:
-

tandraschko commented on issue #8: MYFACES-4239: Multiple performance 
improvements
URL: https://github.com/apache/myfaces/pull/8#issuecomment-399597447
 
 
   I also thought a bit about it, i think it would be better if we discuss it 
first on the mailing list.
   And details about it would be great. You know, we already have a buffer.
   
   So could you maybe split the sb/out commits from the other improvements?


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


> [perf] Additional performance improvements
> --
>
> Key: MYFACES-4239
> URL: https://issues.apache.org/jira/browse/MYFACES-4239
> Project: MyFaces Core
>  Issue Type: Improvement
>  Components: JSR-372
>Affects Versions: 2.2.12, 2.3.1
>Reporter: Paul Nicolucci
>Assignee: Paul Nicolucci
>Priority: Minor
> Fix For: 2.2.13, 2.3.2
>
>
> Some performance improvements in :
> 1) ApplicationImpl.java 
> 2) ServletExternalContextImpl.java
> 3) HtmlResponseWriterImpl.java
> 4) HTMLEncoder.java, we also discussed on the mailing list changing 
> encodeURIAtributte to encodeUriAttribute to fix the typo in the method name 
> so I'll do that here as well.
> 5) CDataEndEscapeFilterWriter.java
> 6) ResourceValidationUtils.java
> The following changes were made:
> -  Skip calling ConcurrentHashMap.containsKey since we will call get
> afterward if containsKey == true.
> - Change to use StringBuilders instead of calling Writer.write so often.
> - Stop using Boolean for variables that don't have a null meaning. If
> null == false, then just use boolean with a default of false.
> - Don't call String.length() constantly for String variables that aren't 
> re-assigned.
> - Change conditional order to avoid calling validateResourceName unless the 
> other conditions are true



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


[jira] [Commented] (MYFACES-4239) [perf] Additional performance improvements

2018-06-22 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16520449#comment-16520449
 ] 

ASF GitHub Bot commented on MYFACES-4239:
-

pnicolucci commented on issue #8: MYFACES-4239: Multiple performance 
improvements
URL: https://github.com/apache/myfaces/pull/8#issuecomment-399469835
 
 
   I'll refactor a bit to use the SharedStringBuilder. Thanks for the 
information / review!


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


> [perf] Additional performance improvements
> --
>
> Key: MYFACES-4239
> URL: https://issues.apache.org/jira/browse/MYFACES-4239
> Project: MyFaces Core
>  Issue Type: Improvement
>  Components: JSR-372
>Affects Versions: 2.2.12, 2.3.1
>Reporter: Paul Nicolucci
>Assignee: Paul Nicolucci
>Priority: Minor
> Fix For: 2.2.13, 2.3.2
>
>
> Some performance improvements in :
> 1) ApplicationImpl.java 
> 2) ServletExternalContextImpl.java
> 3) HtmlResponseWriterImpl.java
> 4) HTMLEncoder.java, we also discussed on the mailing list changing 
> encodeURIAtributte to encodeUriAttribute to fix the typo in the method name 
> so I'll do that here as well.
> 5) CDataEndEscapeFilterWriter.java
> 6) ResourceValidationUtils.java
> The following changes were made:
> -  Skip calling ConcurrentHashMap.containsKey since we will call get
> afterward if containsKey == true.
> - Change to use StringBuilders instead of calling Writer.write so often.
> - Stop using Boolean for variables that don't have a null meaning. If
> null == false, then just use boolean with a default of false.
> - Don't call String.length() constantly for String variables that aren't 
> re-assigned.
> - Change conditional order to avoid calling validateResourceName unless the 
> other conditions are true



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


[jira] [Commented] (MYFACES-4239) [perf] Additional performance improvements

2018-06-22 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16520440#comment-16520440
 ] 

ASF GitHub Bot commented on MYFACES-4239:
-

tandraschko edited a comment on issue #8: MYFACES-4239: Multiple performance 
improvements
URL: https://github.com/apache/myfaces/pull/8#issuecomment-399465655
 
 
   JFYI: we avoided new objects so much in the past that we even switched from 
for-each to for loops, so the SharedStringBuilder is IMO a must-have for this 
change, also those methods are called really often


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


> [perf] Additional performance improvements
> --
>
> Key: MYFACES-4239
> URL: https://issues.apache.org/jira/browse/MYFACES-4239
> Project: MyFaces Core
>  Issue Type: Improvement
>  Components: JSR-372
>Affects Versions: 2.2.12, 2.3.1
>Reporter: Paul Nicolucci
>Assignee: Paul Nicolucci
>Priority: Minor
> Fix For: 2.2.13, 2.3.2
>
>
> Some performance improvements in :
> 1) ApplicationImpl.java 
> 2) ServletExternalContextImpl.java
> 3) HtmlResponseWriterImpl.java
> 4) HTMLEncoder.java, we also discussed on the mailing list changing 
> encodeURIAtributte to encodeUriAttribute to fix the typo in the method name 
> so I'll do that here as well.
> 5) CDataEndEscapeFilterWriter.java
> 6) ResourceValidationUtils.java
> The following changes were made:
> -  Skip calling ConcurrentHashMap.containsKey since we will call get
> afterward if containsKey == true.
> - Change to use StringBuilders instead of calling Writer.write so often.
> - Stop using Boolean for variables that don't have a null meaning. If
> null == false, then just use boolean with a default of false.
> - Don't call String.length() constantly for String variables that aren't 
> re-assigned.
> - Change conditional order to avoid calling validateResourceName unless the 
> other conditions are true



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


[jira] [Commented] (MYFACES-4239) [perf] Additional performance improvements

2018-06-22 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16520435#comment-16520435
 ] 

ASF GitHub Bot commented on MYFACES-4239:
-

tandraschko commented on issue #8: MYFACES-4239: Multiple performance 
improvements
URL: https://github.com/apache/myfaces/pull/8#issuecomment-399465655
 
 
   JFYI: we avoided new objects so much in the past that we even switched from 
for-each to for loops, so the SharedStringBuilder is IMO a must-have for this 
change


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


> [perf] Additional performance improvements
> --
>
> Key: MYFACES-4239
> URL: https://issues.apache.org/jira/browse/MYFACES-4239
> Project: MyFaces Core
>  Issue Type: Improvement
>  Components: JSR-372
>Affects Versions: 2.2.12, 2.3.1
>Reporter: Paul Nicolucci
>Assignee: Paul Nicolucci
>Priority: Minor
> Fix For: 2.2.13, 2.3.2
>
>
> Some performance improvements in :
> 1) ApplicationImpl.java 
> 2) ServletExternalContextImpl.java
> 3) HtmlResponseWriterImpl.java
> 4) HTMLEncoder.java, we also discussed on the mailing list changing 
> encodeURIAtributte to encodeUriAttribute to fix the typo in the method name 
> so I'll do that here as well.
> 5) CDataEndEscapeFilterWriter.java
> 6) ResourceValidationUtils.java
> The following changes were made:
> -  Skip calling ConcurrentHashMap.containsKey since we will call get
> afterward if containsKey == true.
> - Change to use StringBuilders instead of calling Writer.write so often.
> - Stop using Boolean for variables that don't have a null meaning. If
> null == false, then just use boolean with a default of false.
> - Don't call String.length() constantly for String variables that aren't 
> re-assigned.
> - Change conditional order to avoid calling validateResourceName unless the 
> other conditions are true



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


[jira] [Commented] (MYFACES-4239) [perf] Additional performance improvements

2018-06-22 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16520436#comment-16520436
 ] 

ASF GitHub Bot commented on MYFACES-4239:
-

tandraschko commented on issue #8: MYFACES-4239: Multiple performance 
improvements
URL: https://github.com/apache/myfaces/pull/8#issuecomment-399465769
 
 
   All other changes looks fine of course.


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


> [perf] Additional performance improvements
> --
>
> Key: MYFACES-4239
> URL: https://issues.apache.org/jira/browse/MYFACES-4239
> Project: MyFaces Core
>  Issue Type: Improvement
>  Components: JSR-372
>Affects Versions: 2.2.12, 2.3.1
>Reporter: Paul Nicolucci
>Assignee: Paul Nicolucci
>Priority: Minor
> Fix For: 2.2.13, 2.3.2
>
>
> Some performance improvements in :
> 1) ApplicationImpl.java 
> 2) ServletExternalContextImpl.java
> 3) HtmlResponseWriterImpl.java
> 4) HTMLEncoder.java, we also discussed on the mailing list changing 
> encodeURIAtributte to encodeUriAttribute to fix the typo in the method name 
> so I'll do that here as well.
> 5) CDataEndEscapeFilterWriter.java
> 6) ResourceValidationUtils.java
> The following changes were made:
> -  Skip calling ConcurrentHashMap.containsKey since we will call get
> afterward if containsKey == true.
> - Change to use StringBuilders instead of calling Writer.write so often.
> - Stop using Boolean for variables that don't have a null meaning. If
> null == false, then just use boolean with a default of false.
> - Don't call String.length() constantly for String variables that aren't 
> re-assigned.
> - Change conditional order to avoid calling validateResourceName unless the 
> other conditions are true



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


[jira] [Commented] (MYFACES-4239) [perf] Additional performance improvements

2018-06-22 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16520431#comment-16520431
 ] 

ASF GitHub Bot commented on MYFACES-4239:
-

tandraschko commented on issue #8: MYFACES-4239: Multiple performance 
improvements
URL: https://github.com/apache/myfaces/pull/8#issuecomment-399464821
 
 
   ok, i see
   i'm ok for it if you use the SharedStringBuilder


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


> [perf] Additional performance improvements
> --
>
> Key: MYFACES-4239
> URL: https://issues.apache.org/jira/browse/MYFACES-4239
> Project: MyFaces Core
>  Issue Type: Improvement
>  Components: JSR-372
>Affects Versions: 2.2.12, 2.3.1
>Reporter: Paul Nicolucci
>Assignee: Paul Nicolucci
>Priority: Minor
> Fix For: 2.2.13, 2.3.2
>
>
> Some performance improvements in :
> 1) ApplicationImpl.java 
> 2) ServletExternalContextImpl.java
> 3) HtmlResponseWriterImpl.java
> 4) HTMLEncoder.java, we also discussed on the mailing list changing 
> encodeURIAtributte to encodeUriAttribute to fix the typo in the method name 
> so I'll do that here as well.
> 5) CDataEndEscapeFilterWriter.java
> 6) ResourceValidationUtils.java
> The following changes were made:
> -  Skip calling ConcurrentHashMap.containsKey since we will call get
> afterward if containsKey == true.
> - Change to use StringBuilders instead of calling Writer.write so often.
> - Stop using Boolean for variables that don't have a null meaning. If
> null == false, then just use boolean with a default of false.
> - Don't call String.length() constantly for String variables that aren't 
> re-assigned.
> - Change conditional order to avoid calling validateResourceName unless the 
> other conditions are true



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


[jira] [Commented] (MYFACES-4239) [perf] Additional performance improvements

2018-06-22 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16520424#comment-16520424
 ] 

ASF GitHub Bot commented on MYFACES-4239:
-

pnicolucci commented on issue #8: MYFACES-4239: Multiple performance 
improvements
URL: https://github.com/apache/myfaces/pull/8#issuecomment-399464056
 
 
   @tandraschko  , we've been running some performance tests and can see a .5 - 
1% increase in our testing in performance with an application that is only 
about 15% JSF , with a larger application and more JSF within it , the gain 
could be even greater.  Basically we want to avoid the writer.write path , it 
is quite a long path to call over and over again if it isn't necessary.


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


> [perf] Additional performance improvements
> --
>
> Key: MYFACES-4239
> URL: https://issues.apache.org/jira/browse/MYFACES-4239
> Project: MyFaces Core
>  Issue Type: Improvement
>  Components: JSR-372
>Affects Versions: 2.2.12, 2.3.1
>Reporter: Paul Nicolucci
>Assignee: Paul Nicolucci
>Priority: Minor
> Fix For: 2.2.13, 2.3.2
>
>
> Some performance improvements in :
> 1) ApplicationImpl.java 
> 2) ServletExternalContextImpl.java
> 3) HtmlResponseWriterImpl.java
> 4) HTMLEncoder.java, we also discussed on the mailing list changing 
> encodeURIAtributte to encodeUriAttribute to fix the typo in the method name 
> so I'll do that here as well.
> 5) CDataEndEscapeFilterWriter.java
> 6) ResourceValidationUtils.java
> The following changes were made:
> -  Skip calling ConcurrentHashMap.containsKey since we will call get
> afterward if containsKey == true.
> - Change to use StringBuilders instead of calling Writer.write so often.
> - Stop using Boolean for variables that don't have a null meaning. If
> null == false, then just use boolean with a default of false.
> - Don't call String.length() constantly for String variables that aren't 
> re-assigned.
> - Change conditional order to avoid calling validateResourceName unless the 
> other conditions are true



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


[jira] [Commented] (MYFACES-4239) [perf] Additional performance improvements

2018-06-22 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16520399#comment-16520399
 ] 

ASF GitHub Bot commented on MYFACES-4239:
-

tandraschko commented on issue #8: MYFACES-4239: Multiple performance 
improvements
URL: https://github.com/apache/myfaces/pull/8#issuecomment-399456368
 
 
   @pnicolucci i'm not sure about this changes out.write vs sb.append...
   
   Why do you switchted from out.write to a new StringBuilder?
   You know, this are always new object instances... And we have something like 
a SharedString


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


> [perf] Additional performance improvements
> --
>
> Key: MYFACES-4239
> URL: https://issues.apache.org/jira/browse/MYFACES-4239
> Project: MyFaces Core
>  Issue Type: Improvement
>  Components: JSR-372
>Affects Versions: 2.2.12, 2.3.1
>Reporter: Paul Nicolucci
>Assignee: Paul Nicolucci
>Priority: Minor
> Fix For: 2.2.13, 2.3.2
>
>
> Some performance improvements in :
> 1) ApplicationImpl.java 
> 2) ServletExternalContextImpl.java
> 3) HtmlResponseWriterImpl.java
> 4) HTMLEncoder.java, we also discussed on the mailing list changing 
> encodeURIAtributte to encodeUriAttribute to fix the typo in the method name 
> so I'll do that here as well.
> 5) CDataEndEscapeFilterWriter.java
> 6) ResourceValidationUtils.java
> The following changes were made:
> -  Skip calling ConcurrentHashMap.containsKey since we will call get
> afterward if containsKey == true.
> - Change to use StringBuilders instead of calling Writer.write so often.
> - Stop using Boolean for variables that don't have a null meaning. If
> null == false, then just use boolean with a default of false.
> - Don't call String.length() constantly for String variables that aren't 
> re-assigned.
> - Change conditional order to avoid calling validateResourceName unless the 
> other conditions are true



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


[jira] [Commented] (MYFACES-4239) [perf] Additional performance improvements

2018-06-22 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16520400#comment-16520400
 ] 

ASF GitHub Bot commented on MYFACES-4239:
-

tandraschko edited a comment on issue #8: MYFACES-4239: Multiple performance 
improvements
URL: https://github.com/apache/myfaces/pull/8#issuecomment-399456368
 
 
   @pnicolucci i'm not sure about this changes out.write vs sb.append...
   
   Why do you switchted from out.write to a new StringBuilder?
   You know, this are always new object instances... And we have something like 
a SharedStringBuilder


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


> [perf] Additional performance improvements
> --
>
> Key: MYFACES-4239
> URL: https://issues.apache.org/jira/browse/MYFACES-4239
> Project: MyFaces Core
>  Issue Type: Improvement
>  Components: JSR-372
>Affects Versions: 2.2.12, 2.3.1
>Reporter: Paul Nicolucci
>Assignee: Paul Nicolucci
>Priority: Minor
> Fix For: 2.2.13, 2.3.2
>
>
> Some performance improvements in :
> 1) ApplicationImpl.java 
> 2) ServletExternalContextImpl.java
> 3) HtmlResponseWriterImpl.java
> 4) HTMLEncoder.java, we also discussed on the mailing list changing 
> encodeURIAtributte to encodeUriAttribute to fix the typo in the method name 
> so I'll do that here as well.
> 5) CDataEndEscapeFilterWriter.java
> 6) ResourceValidationUtils.java
> The following changes were made:
> -  Skip calling ConcurrentHashMap.containsKey since we will call get
> afterward if containsKey == true.
> - Change to use StringBuilders instead of calling Writer.write so often.
> - Stop using Boolean for variables that don't have a null meaning. If
> null == false, then just use boolean with a default of false.
> - Don't call String.length() constantly for String variables that aren't 
> re-assigned.
> - Change conditional order to avoid calling validateResourceName unless the 
> other conditions are true



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


[jira] [Commented] (MYFACES-4239) [perf] Additional performance improvements

2018-06-22 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/MYFACES-4239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16520385#comment-16520385
 ] 

ASF GitHub Bot commented on MYFACES-4239:
-

pnicolucci opened a new pull request #8: MYFACES-4239: Multiple performance 
improvements
URL: https://github.com/apache/myfaces/pull/8
 
 
   


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


> [perf] Additional performance improvements
> --
>
> Key: MYFACES-4239
> URL: https://issues.apache.org/jira/browse/MYFACES-4239
> Project: MyFaces Core
>  Issue Type: Improvement
>  Components: JSR-372
>Affects Versions: 2.2.12, 2.3.1
>Reporter: Paul Nicolucci
>Assignee: Paul Nicolucci
>Priority: Minor
> Fix For: 2.2.13, 2.3.2
>
>
> Some performance improvements in :
> 1) ApplicationImpl.java 
> 2) ServletExternalContextImpl.java
> 3) HtmlResponseWriterImpl.java
> 4) HTMLEncoder.java, we also discussed on the mailing list changing 
> encodeURIAtributte to encodeUriAttribute to fix the typo in the method name 
> so I'll do that here as well.
> 5) CDataEndEscapeFilterWriter.java
> 6) ResourceValidationUtils.java
> The following changes were made:
> -  Skip calling ConcurrentHashMap.containsKey since we will call get
> afterward if containsKey == true.
> - Change to use StringBuilders instead of calling Writer.write so often.
> - Stop using Boolean for variables that don't have a null meaning. If
> null == false, then just use boolean with a default of false.
> - Don't call String.length() constantly for String variables that aren't 
> re-assigned.
> - Change conditional order to avoid calling validateResourceName unless the 
> other conditions are true



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


[jira] [Commented] (TOBAGO-1879) tc:date does not support Calendar and DateTime

2018-06-15 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/TOBAGO-1879?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16513800#comment-16513800
 ] 

ASF GitHub Bot commented on TOBAGO-1879:


henningn opened a new pull request #12: TOBAGO-1879 tc:date does not support 
Calendar and DateTime
URL: https://github.com/apache/myfaces-tobago/pull/12
 
 
   * tc:convertDateTime implemented, Calendar and java8.time API supported
   * test added
   * Annotation 'ConverterTag' implemented


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


> tc:date does not support Calendar and DateTime
> --
>
> Key: TOBAGO-1879
> URL: https://issues.apache.org/jira/browse/TOBAGO-1879
> Project: MyFaces Tobago
>  Issue Type: Improvement
>  Components: Core
>Affects Versions: 4.1.0
>Reporter: Henning Noeth
>Assignee: Henning Noeth
>Priority: Major
> Fix For: 4.3.0
>
>
> Implement support for java.util.Calendar and java.time.DateTime.
> MyFaces 2.3 has implemented java.time.DateTime for f:convertDateTime already.
> This issue is mainly for backporting this functionality to JSF 2.2 and lower.
> Usage is: 



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


  1   2   >