There are a couple of answers to this.
In
https://github.com/wildfly/wildfly-common I've introduced a few IP
address utilities which render IP addresses and perform CIDR functions,
for the EJB client. It would make sense to have proper IP address
parsing here; in fact this is something I've thought about a bit.
New dependencies are fundamentally OK with justification, but ideally we
want to get good usage out of them. If we're bringing in a 10MB JAR for
one 6KB class, that is somewhat less than ideal. Also we'd want
external dependencies to be well-maintained.
In this case my opinion is that the best option is to add IPv4 and IPv6
address parsers into the org.wildfly.common.net.Inet class.
On 02/27/2017 06:23 AM, Tomas Hofman wrote:
Hello,
I'm working on an issue in Elytron, which requires validation of IPv6
addresses. Potentially also normalizing IPv6 addresses and matching
addresses by masks could be needed in future. For now I implemented my
own validation code which may be good enough, but still, better would be
to rely on proven utility class.
Do we use some standard library for such purposes, or is there such
functionality in JBoss codebase somewhere? I found NetworkUtils class in
wildfly-network package, which does some of that, but that can't be used
in Elytron.
Are there some rules when considering new dependencies? For instance
would Apache Commons Validator/Net represent conceivable dependencies
for Elytron?
Thanks,
Tomas
_______________________________________________
wildfly-dev mailing list
wildfly-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/wildfly-dev
--
- DML