Adaptation of commons-beanutils
The Apache Commons commons-beanutils
library is used by the client to access
some bean style getter and setter methods using its PropertyUtils
class and
some type conversions using ConvertUtils
. This library was very old and certainly
didn't fit well with the Java 9+ module system.
We've taken a copy of the commons-beanutils
1.9.4 code and updated it to
both be in a proper module and to use newer dependencies. The changes in our 1.10.x
versions are these:
- Compile with OpenJDK 11.
- Addition of
module-info.java
to the code, putting the code into a packageorg.apache.commons.beanutils
. - Removed dependencies on commons-logging and commons-collections.
- Added dependency on commons-collections4. This is marked as optional in the POM; whether it is optional will depend on which parts of the library you are using.
- Commented out all logging calls, which were going to commons-logging.
- Changed commons-collection classes to their commons-collections4 equivalents.
- Changed references to
org.apache.commons.collections.FastHashMap
from commons-collection tojava.util.concurrent.ConcurrentHashMap
. This is as advised in the Commons Collections 4 release note. - Changed references to
WeakFastHashMap
inPropertyUtils
to usejava.util.WeakHashMap
.
This code is deployed as a Maven artefact with source JAR in our publicly available repository as described on the installation page. The code is not deployed on GitHub as the original code is not either. If anyone needs to see the source we can supply it.
The web site for commons-beanutils
is https://commons.apache.org/proper/commons-beanutils