[
https://issues.apache.org/jira/browse/CONFIGURATION-840?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17826855#comment-17826855
]
Bob Marinier commented on CONFIGURATION-840:
--------------------------------------------
I meant to say, I really did try this with every non-beta version from 2.0 on,
and they all show the issue.
> StackOverflowError when adding property
> ---------------------------------------
>
> Key: CONFIGURATION-840
> URL: https://issues.apache.org/jira/browse/CONFIGURATION-840
> Project: Commons Configuration
> Issue Type: Bug
> Affects Versions: 2.0, 2.1, 2.1.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8.0,
> 2.9.0, 2.10.0
> Reporter: Bob Marinier
> Priority: Major
> Attachments: reproducer.zip
>
>
> In the attached reproducer, I attempt to add a Path object to a configuration
> programmatically. This results in a StackOverflowError.
> To reproduce, run with:
> {code:java}
> mvn test{code}
> It may be that adding a Path object is not supported (indeed, when I did this
> I meant to add it as a String), but even so it should not result in a
> StackOverflowError.
> The start of the stack is shown below (this just the last two lines just
> repeat until overflow):
> {code:java}
> java.lang.StackOverflowError
> at
> java.base/sun.nio.fs.WindowsPath.elementAsString(WindowsPath.java:681)
> at java.base/sun.nio.fs.WindowsPath.getName(WindowsPath.java:692)
> at java.base/sun.nio.fs.WindowsPath.getName(WindowsPath.java:42)
> at java.base/java.nio.file.Path$1.next(Path.java:931)
> at java.base/java.nio.file.Path$1.next(Path.java:920)
> at
> org.apache.commons.configuration2.convert.AbstractListDelimiterHandler.flattenIterator(AbstractListDelimiterHandler.java:198)
> at
> org.apache.commons.configuration2.convert.AbstractListDelimiterHandler.flatten(AbstractListDelimiterHandler.java:146)
> at
> org.apache.commons.configuration2.convert.AbstractListDelimiterHandler.flattenIterator(AbstractListDelimiterHandler.java:198)
> at
> org.apache.commons.configuration2.convert.AbstractListDelimiterHandler.flatten(AbstractListDelimiterHandler.java:146)
> at
> org.apache.commons.configuration2.convert.AbstractListDelimiterHandler.flattenIterator(AbstractListDelimiterHandler.java:198)
> at
> org.apache.commons.configuration2.convert.AbstractListDelimiterHandler.flatten(AbstractListDelimiterHandler.java:146){code}
> As this appears to involve delimiter handling I even tried to configure it to
> use the DisabledListDelimiterHandler (not part of the reproducer), but this
> had no effect.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)