Hi,
CharSequenceReader is great, but I think there can be two improvements:
1) read(char[], int, int) currently calls read() several times, which
delegates to charSequence.charAt. That's fine in Java 8 and before, but
in Java 9 the internal storage of String, StringBuilder and StringBuffer
is
Hi,
I noticed that a lot of InputStream / OutputStream implementations do
not have a matching Reader / Writer implementation. Some would really be
useful.
I've made an overview of classes that could be added:
* AutoCloseReader
* BrokenReader
* CloseShieldReader
* ClosedReader
* CountingReader
On 01/08/2019 12:31, Rob Spoor wrote:
Hi,
CharSequenceReader is great, but I think there can be two improvements:
1) read(char[], int, int) currently calls read() several times, which
delegates to charSequence.charAt. That's fine in Java 8 and before, but
in Java 9 the internal stora
code coverage with unit
tests for new code in your PRs ;-)
Gary
On Thu, Aug 1, 2019 at 6:39 AM Rob Spoor wrote:
Hi,
I noticed that a lot of InputStream / OutputStream implementations do
not have a matching Reader / Writer implementation. Some would really be
useful.
I've made an over
Sure :)
On 01/08/2019 18:03, Gary Gregory wrote:
May I suggest one PR per class so we can avoid a giant PR to review?
Gary
On Thu, Aug 1, 2019, 11:57 Rob Spoor wrote:
I guess that the full list is not necessary, but I've been working on a
project where I could have used the foll
See subject. This occurs for both master and pull requests. For
instance:
https://travis-ci.org/apache/commons-io/builds/561807075?utm_source=github_status&utm_medium=notification
-
To unsubscribe, e-mail: dev-unsubscr...@commo
Spoor wrote:
Sure :)
On 01/08/2019 18:03, Gary Gregory wrote:
May I suggest one PR per class so we can avoid a giant PR to review?
Gary
On Thu, Aug 1, 2019, 11:57 Rob Spoor wrote:
I guess that the full list is not necessary, but I've been working on a
project where I could have use
See https://travis-ci.org/apache/commons-io/jobs/569951808. Two of the
errors report an unused import which is in fact used in Javadoc. The
other is a protected method without Javadoc.
-
To unsubscribe, e-mail: dev-unsubscr...@
On 09/08/2019 23:18, Gary Gregory wrote:
Hi Rob,
Do you plan on creating a PR?
Gary
On Thu, Aug 1, 2019 at 7:00 AM Rob Spoor wrote:
On 01/08/2019 12:31, Rob Spoor wrote:
Hi,
CharSequenceReader is great, but I think there can be two improvements:
1) read(char[], int, int) currently calls
Why limit this to IllegalArgument? Why not make it more generic? For
instance, in ExceptionUtils:
public static T format(final FunctionString, ? extends T> factory, final String format, final Object... args) {
return factory.apply(String.format(format, args));
}
public static T format(fi
x27;s own call sites updated to use the new code.
Gary
On Tue, Sep 3, 2019 at 2:13 PM Gary Gregory wrote:
On Tue, Sep 3, 2019 at 1:19 PM Rob Spoor wrote:
Why limit this to IllegalArgument? Why not make it more generic? For
instance, in ExceptionUtils:
public static T format(final Function f
See https://travis-ci.org/apache/commons-io/jobs/607784753. The reason
is commit 14d6f4c6dbb429ebb915b530ea61fe911d36b20b, which added
interface IOConsumer in package org.apache.commons.io.function, but
forgot to add a package-info.java or package.html.
In case you're interested, you can possi
On 07/12/2019 18:19, sebb wrote:
On Sat, 7 Dec 2019 at 17:05, Bryan Rickman wrote:
I recently used the text.CaseUtils for converting to camelCase and
PascalCase. I also needed to convert to snake_case and kebab-case, and
ended up writing my own code for that (I wasn't really a big fan of other
One possible reason to use T[0] is because that's how the new (since
Java 11) toArray method does it. From java.util.Collection, OpenJDK
version 13:
default T[] toArray(IntFunction generator) {
return toArray(generator.apply(0));
}
This method has, as of yet, not been overridd
The class was there in release 2.4.1:
https://github.com/apache/commons-vfs/blob/rel/commons-vfs-2.4.1/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav/WebdavFileProvider.java.
In the next release, 2.5.0, it can indeed no longer be found. A bit of
investigating showed that the
added into vfs's pom as a dependency, or just move class
VFS into that project aswell.
Otherwise we should not let the VFS.getManager() rely on this class.
Thanks for finding this class though.
btw I tested 2.4, 2.4 is correct.
Rob Spoor 于2020年1月19日周日 下午10:00写道:
The class was there in re
Apparently you guys forgot about joinWith:
https://commons.apache.org/proper/commons-lang/apidocs/org/apache/commons/lang3/StringUtils.html#joinWith-java.lang.String-java.lang.Object...-
However, even without this method, StringUtils.join can easily be
replaced with streams:
Stream.of(x,
Hi all,
I noticed that https://commons.apache.org/proper/commons-lang/ still
mentions version 3.9 as being the latest (apart from the top bar which
is probably automatically generated based on the pom).
Kind regards,
Rob
-
Why use a String as default and not a T?
default > T getEnum(String key, Class enumType, T
defaultEnum) {
String value = getString(key, null);
return value != null ? Enum.valueOf(enumType, value) : defaultEnum);
}
On 27/04/2020 06:28, Xeno Amess wrote:
I really think we shall have a
On 14/06/2020 12:40, Xeno Amess wrote:
every time my update tool chain thinks 20030203.000550 is a greater version
than 2.7 (actually it is, if see it in number).
So have we some way to delete it from maven central? (or rename it?)
The same problem happened in BeanUtils, version 20030211.134440
On 14/06/2020 15:41, Gary Gregory wrote:
In order to avoid posting the same answer here and on GitHib over and over,
I tried to explain BC here:
https://garygregory.wordpress.com/2020/06/14/how-we-handle-binary-compatibility-at-apache-commons/
Feedback is most welcome.
Gary
You mention that a
Hi,
I was replacing my own copy of CharSequenceReader with the one from
commons-io, but I had some test failures. I found out that there were
two reasons:
* It doesn't override ready(), and therefore always returns false, even
if there are still characters to be read. That's not incorrect ac
Thanks!
On 10/07/2020 14:25, Gary Gregory wrote:
Thanks Rob, I merged both PRs to master.
Gary
On Wed, Jul 8, 2020 at 3:49 PM Rob Spoor wrote:
Hi,
I was replacing my own copy of CharSequenceReader with the one from
commons-io, but I had some test failures. I found out that there were
two
Can't you just use java.util.Optional? That was added way back (ahum) in
Java 8.
Converting your example:
SubSubSubProperty value = Optional.ofNullable(object)
.map(ObjectType::getProperty)
.map(Property::getSubProperty)
.map(SubProperty::getSubSubProperty
ap(ObjectType::getProperty).or(() -> Optional.of(DEFAULT_PROPERTY))
.orElse(null);
It seems to me a bit heavy, but I agree, it's possible.
So you would recommend not including it in the library?
Thanks,
Juraj+
On Sat, 18 Jul 2020 at 15:44, Rob Spoor wrote:
Can't you just use
I've found the cause of the issue, in
sun.net.www.protocol.jar.JarURLConnection$JarURLInputStream. By default
caching is enabled, so while the JarURLInputStream is closed, the
JarFile isn't, probably to prevent having to keep opening JAR files.
I've put my findings in JIRA plus a quick fix tha
applyIfNonNull looks to be a version of Optional without the Optional
object. The following is the same as suggested but with an additional
Optional object:
Optional.ofNullable(valueX).ifPresent(bean::setValue);
Optional.ofNullable(valueX).ifPresent(v -> someObject.compute(v,
"bar"));
I think there are two errors in the release notes. I did not contribute
to QueueInputStream and QueueOutputStream (#171). I also can't remember
contributing to IO-429 / #175.
On 22/05/2021 19:49, Gary Gregory wrote:
We have fixed a few bugs and added enhancements since Apache Commons IO
2.8.0
If you know the fields, why use ReflectionToStringBuilder? Why not use a
regular ToStringBuilder? That allows you to append each field you want.
Yes, you have to type each field name twice (for the name and the
value), but is that so much more work that it would require complicating
the Reflect
Isn't this already possible with PipedOutputStream and PipedOutputStream?
PipedInputStream inputStream = new PipedInputStream(size);
PipedOutputStream outputStream = new PipedOutputStream(inputStream);
Any write to outputStream is now visible in inputStream. Note that the
writing and re
Utils.copy methods it would just be a shorthand for
a rather simple implementation. But one that the user can rely on to work
probably better than their own implementation.
-Ursprüngliche Nachricht-----
Von: Rob Spoor
Gesendet: Samstag, 9. Oktober 2021 12:40
An: dev@commons.apache.org
Betreff:
A quick check shows that some more dependencies are needed, for code
split off from sshd-core. I found some:
* https://mvnrepository.com/artifact/org.apache.sshd/sshd-sftp
* https://mvnrepository.com/artifact/org.apache.sshd/sshd-scp
However, even after adding these two I was still missing class
Since reflection is used to create the instances, isn't it possible to
support both? There are plenty of containers like JBoss EAP that still
use javax instead of jakarta.
The code changes would be quite small in PropertyConverter:
1) Use two class name constants instead of one. Let's use
INT
I'd like to point out that rodde has also asked this project to be
included in OpenJDK:
https://mail.openjdk.java.net/pipermail/core-libs-dev/2022-June/091412.html
On 2022/06/10 19:29:43 Rodion Efremov wrote:
Hi,
I have this List/Deque data structure:
https://github.com/coderodde/IndexedLin
With just one simple utility method you can get all the chaining you want:
public static Function function(Function func) {
return func;
}
This doesn't look very useful, but it allows you to turn a method
reference or lambda into a typed Function without needing a cast. After
ed up with other coding patterns I found better at the time for
whatever reason..
Gary
Gary
On Fri, Aug 4, 2023, 3:24 PM Gary Gregory
wrote:
Worth adding adding function(Function)? Seems low cost to add it
FailableFunction.
Gary
On Fri, Aug 4, 2023, 2:04 PM Rob Spoor wrote:
With just one s
You could try archiving the projects. That way all jobs are disabled,
including dependabot. You can't push anymore, but unarchiving is just as
easy as archiving.
Rob
On 03/10/2023 19:22, Gary Gregory wrote:
Getting rid of this is good for dormant components ONLY IMO.
It is definitely not a
It's also worth checking what alternatives already offer. For instance,
https://junit-pioneer.org/ has @DefaultLocale which would make
DefaultLocaleTestRule obsolete.
Rob
On 2023/12/20 18:18:25 Gary Gregory wrote:
I had intended to gather various reusable JUnit rules and utilities but
never
Inheriting test methods and @BeforeEach / @AfterEach methods works just
fine. I even have a project that provides interfaces with default test
methods. Just implementing these interfaces gives classes all of the
test methods. If you override methods, you have to repeat the annotation
though. I
I've just tested one of my own projects that has a matrix setup that's
almost the same (I haven't included Java 22), and it was successful:
https://github.com/robtimus/application-path/actions/runs/8820506010
The main difference is that I use @v4 instead of a specific commit, but
those should
40 matches
Mail list logo