[jboss-jira] [JBoss JIRA] (WFLY-4089) ServletContainerInitializerDeploymentProcessor does not handle comments

James Livingston (JIRA) issues at jboss.org
Sun Nov 16 18:52:39 EST 2014


    [ https://issues.jboss.org/browse/WFLY-4089?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13020345#comment-13020345 ] 

James Livingston edited comment on WFLY-4089 at 11/16/14 6:52 PM:
------------------------------------------------------------------

I was looking at the wrong branch, sorry.  It does attempt to handle comments, but lines containing only comments and whitespace are not handled properly because the isEmpty() check is done prior to the comment section being removed, and it checks the index of # is >0 not >= 0


was (Author: jameslivingston):
I was looking at the wrong branch, sorry.  It does attempt to handle comments, but lines containing only comments and whitespace are not handled properly because the isEmpty() check is done prior to the comment section being removed.

> ServletContainerInitializerDeploymentProcessor does not handle comments
> -----------------------------------------------------------------------
>
>                 Key: WFLY-4089
>                 URL: https://issues.jboss.org/browse/WFLY-4089
>             Project: WildFly
>          Issue Type: Bug
>          Components: Web (Undertow)
>    Affects Versions: 9.0.0.Alpha1
>            Reporter: James Livingston
>            Assignee: Stuart Douglas
>
> ServletContainerInitializerDeploymentProcessor.loadSci() has code to read the service file, rather than using the JDK-provided mechanisms, and it does not handle comments.
> The API documentation at https://docs.oracle.com/javase/7/docs/api/java/util/ServiceLoader.html says that the # symbols and all following characters on the line should be ignored. It also notes the file must be UTF-8 encoded, and ServletContainerInitializerDeploymentProcessor does not appear to force that either.
> Log4j 2.1 triggers this bug (https://issues.apache.org/jira/browse/LOG4J2-890)



--
This message was sent by Atlassian JIRA
(v6.3.8#6338)


More information about the jboss-jira mailing list