[jira] [Commented] (IO-773) RegexFileFilter is no longer Serializable
[ https://issues.apache.org/jira/browse/IO-773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17557427#comment-17557427 ] Dominik Reinarz commented on IO-773: Call will work, if serializable lambda is available on both sides of the serialization. I guess this can be closed for good. (Maybe additional comment?) > RegexFileFilter is no longer Serializable > - > > Key: IO-773 > URL: https://issues.apache.org/jira/browse/IO-773 > Project: Commons IO > Issue Type: Bug > Components: Utilities >Affects Versions: 2.10.0, 2.11.0 >Reporter: Dominik Reinarz >Priority: Major > Fix For: 2.12.0 > > > org.apache.commons.io.filefilter.RegexFileFilter cannot be serialized b/c > org.apache.commons.io.filefilter.RegexFileFilter.pathToString Function -- This message was sent by Atlassian Jira (v8.20.7#820007)
[jira] [Commented] (IO-773) RegexFileFilter is no longer Serializable
[ https://issues.apache.org/jira/browse/IO-773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17554739#comment-17554739 ] Gary D. Gregory commented on IO-773: The problem in the link shows up on reading, not writing? I wonder if this is or will be fixed in a future version of Java... > RegexFileFilter is no longer Serializable > - > > Key: IO-773 > URL: https://issues.apache.org/jira/browse/IO-773 > Project: Commons IO > Issue Type: Bug > Components: Utilities >Affects Versions: 2.10.0, 2.11.0 >Reporter: Dominik Reinarz >Priority: Major > Fix For: 2.12.0 > > > org.apache.commons.io.filefilter.RegexFileFilter cannot be serialized b/c > org.apache.commons.io.filefilter.RegexFileFilter.pathToString Function -- This message was sent by Atlassian Jira (v8.20.7#820007)
[jira] [Commented] (IO-773) RegexFileFilter is no longer Serializable
[ https://issues.apache.org/jira/browse/IO-773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17554401#comment-17554401 ] Dominik Reinarz commented on IO-773: Passing a serializable lambda should work with 2.12.0? if I use RegexFileFilter(pattern, (Function & Serializable) p -> p.getFileName().toString()): java.lang.ClassCastException: cannot assign instance of java.lang.invoke.SerializedLambda to field org.apache.commons.io.filefilter.RegexFileFilter.pathToString of type java.util.function.Function in instance of org.apache.commons.io.filefilter.RegexFileFilter at java.base/java.io.ObjectStreamClass$FieldReflector.setObjFieldValues also see https://mail.openjdk.org/pipermail/core-libs-dev/2019-March/059283.html > RegexFileFilter is no longer Serializable > - > > Key: IO-773 > URL: https://issues.apache.org/jira/browse/IO-773 > Project: Commons IO > Issue Type: Bug > Components: Utilities >Affects Versions: 2.10.0, 2.11.0 >Reporter: Dominik Reinarz >Priority: Major > Fix For: 2.12.0 > > > org.apache.commons.io.filefilter.RegexFileFilter cannot be serialized b/c > org.apache.commons.io.filefilter.RegexFileFilter.pathToString Function -- This message was sent by Atlassian Jira (v8.20.7#820007)
[jira] [Commented] (IO-773) RegexFileFilter is no longer Serializable
[ https://issues.apache.org/jira/browse/IO-773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17554397#comment-17554397 ] Dominik Reinarz commented on IO-773: Maybe RegexFileFilter#RegexFileFilter(Pattern, Function) should only accept serializable lambdas? > RegexFileFilter is no longer Serializable > - > > Key: IO-773 > URL: https://issues.apache.org/jira/browse/IO-773 > Project: Commons IO > Issue Type: Bug > Components: Utilities >Affects Versions: 2.10.0, 2.11.0 >Reporter: Dominik Reinarz >Priority: Major > Fix For: 2.12.0 > > > org.apache.commons.io.filefilter.RegexFileFilter cannot be serialized b/c > org.apache.commons.io.filefilter.RegexFileFilter.pathToString Function -- This message was sent by Atlassian Jira (v8.20.7#820007)
[jira] [Commented] (IO-773) RegexFileFilter is no longer Serializable
[ https://issues.apache.org/jira/browse/IO-773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17554163#comment-17554163 ] Gary D. Gregory commented on IO-773: [~dr.z] Good news, thank you for testing your use case. > RegexFileFilter is no longer Serializable > - > > Key: IO-773 > URL: https://issues.apache.org/jira/browse/IO-773 > Project: Commons IO > Issue Type: Bug > Components: Utilities >Affects Versions: 2.10.0, 2.11.0 >Reporter: Dominik Reinarz >Priority: Major > Fix For: 2.12.0 > > > org.apache.commons.io.filefilter.RegexFileFilter cannot be serialized b/c > org.apache.commons.io.filefilter.RegexFileFilter.pathToString Function -- This message was sent by Atlassian Jira (v8.20.7#820007)
[jira] [Commented] (IO-773) RegexFileFilter is no longer Serializable
[ https://issues.apache.org/jira/browse/IO-773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17554130#comment-17554130 ] Dominik Reinarz commented on IO-773: 2.12.0-SNAPSHOT build works! > RegexFileFilter is no longer Serializable > - > > Key: IO-773 > URL: https://issues.apache.org/jira/browse/IO-773 > Project: Commons IO > Issue Type: Bug > Components: Utilities >Affects Versions: 2.10.0, 2.11.0 >Reporter: Dominik Reinarz >Priority: Major > Fix For: 2.12.0 > > > org.apache.commons.io.filefilter.RegexFileFilter cannot be serialized b/c > org.apache.commons.io.filefilter.RegexFileFilter.pathToString Function -- This message was sent by Atlassian Jira (v8.20.7#820007)
[jira] [Commented] (IO-773) RegexFileFilter is no longer Serializable
[ https://issues.apache.org/jira/browse/IO-773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17554103#comment-17554103 ] Gary D. Gregory commented on IO-773: Hi [~dr.z] Thank you for your report. Please try with git master or a 3.13.0-SNAPSHOT build from [https://repository.apache.org/content/repositories/snapshots/org/apache/commons/commons-lang3/] {{RegexFileFilter#RegexFileFilter(Pattern)}} now creates a serializable lambda, so other constructors that call it will create a serializable instance. If you call {{{}RegexFileFilter#RegexFileFilter(Pattern, Function){}}}, you'll have to make the lambda serializable before passing it in. > RegexFileFilter is no longer Serializable > - > > Key: IO-773 > URL: https://issues.apache.org/jira/browse/IO-773 > Project: Commons IO > Issue Type: Bug > Components: Utilities >Affects Versions: 2.10.0, 2.11.0 >Reporter: Dominik Reinarz >Priority: Major > > org.apache.commons.io.filefilter.RegexFileFilter cannot be serialized b/c > org.apache.commons.io.filefilter.RegexFileFilter.pathToString Function -- This message was sent by Atlassian Jira (v8.20.7#820007)
[jira] [Commented] (IO-773) RegexFileFilter is no longer Serializable
[ https://issues.apache.org/jira/browse/IO-773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17553997#comment-17553997 ] Dominik Reinarz commented on IO-773: java.io.NotSerializableException: org.apache.commons.io.filefilter.RegexFileFilter$$Lambda$2302/0x0008021533e8 at java.base/java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1197) > RegexFileFilter is no longer Serializable > - > > Key: IO-773 > URL: https://issues.apache.org/jira/browse/IO-773 > Project: Commons IO > Issue Type: Bug > Components: Utilities >Affects Versions: 2.11.0 >Reporter: Dominik Reinarz >Priority: Major > > org.apache.commons.io.filefilter.RegexFileFilter cannot be serialized b/c > org.apache.commons.io.filefilter.RegexFileFilter.pathToString Function -- This message was sent by Atlassian Jira (v8.20.7#820007)