You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Cristian Tarsoaga (JIRA)" <ji...@apache.org> on 2016/03/01 23:23:18 UTC
[jira] [Updated] (DIRSERVER-2127) Don't rely on sun.net.util since
it is not visible in OSGi.
[ https://issues.apache.org/jira/browse/DIRSERVER-2127?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Cristian Tarsoaga updated DIRSERVER-2127:
-----------------------------------------
Attachment: 0001-Use-a-better-IPv6-address-parser.patch
patch
> Don't rely on sun.net.util since it is not visible in OSGi.
> -----------------------------------------------------------
>
> Key: DIRSERVER-2127
> URL: https://issues.apache.org/jira/browse/DIRSERVER-2127
> Project: Directory ApacheDS
> Issue Type: Bug
> Affects Versions: 2.0.0-M21
> Reporter: Cristian Tarsoaga
> Priority: Minor
> Labels: osgi,
> Attachments: 0001-Use-a-better-IPv6-address-parser.patch
>
>
> From ee47e87b6d3e88d411220ccce43d8feecf4e5dec Mon Sep 17 00:00:00 2001
> From: Ciprian Ciubotariu <ch...@gmx.net>
> Date: Sat, 27 Feb 2016 01:35:22 +0200
> Subject: [PATCH] Use a better IPv6 address parser
> Don't rely on sun.net.util since it is not visible in OSGi.
> ---
> ldap/model/pom.xml | 5 +++++
> .../main/java/org/apache/directory/api/ldap/model/url/LdapUrl.java | 3 ++-
> 2 files changed, 7 insertions(+), 1 deletion(-)
> diff --git a/ldap/model/pom.xml b/ldap/model/pom.xml
> index fc4c4a9..a370828 100644
> --- a/ldap/model/pom.xml
> +++ b/ldap/model/pom.xml
> @@ -96,6 +96,11 @@
> <artifactId>annotations</artifactId>
> <scope>provided</scope>
> </dependency>
> + <dependency>
> + <groupId>commons-validator</groupId>
> + <artifactId>commons-validator</artifactId>
> + <version>1.5.0</version>
> + </dependency>
> </dependencies>
>
> <build>
> diff --git a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/url/LdapUrl.java b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/url/LdapUrl.java
> index 8811139..716e862 100644
> --- a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/url/LdapUrl.java
> +++ b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/url/LdapUrl.java
> @@ -28,6 +28,7 @@ import java.util.List;
> import java.util.Set;
> import java.util.regex.Matcher;
> import java.util.regex.Pattern;
> +import org.apache.commons.validator.routines.InetAddressValidator;
>
> import org.apache.directory.api.i18n.I18n;
> import org.apache.directory.api.ldap.model.exception.LdapInvalidDnException;
> @@ -507,7 +508,7 @@ public class LdapUrl
> {
> String hostString = new String( chars, start, pos - start );
>
> - if ( sun.net.util.IPAddressUtil.isIPv6LiteralAddress( hostString ) )
> + if ( InetAddressValidator.getInstance().isValidInet6Address( hostString ) )
> {
> host = hostString;
>
> --
> 2.4.10
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)