Return-Path: X-Original-To: apmail-ant-notifications-archive@minotaur.apache.org Delivered-To: apmail-ant-notifications-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AD269DD80 for ; Mon, 15 Oct 2012 15:32:55 +0000 (UTC) Received: (qmail 21365 invoked by uid 500); 15 Oct 2012 15:32:55 -0000 Delivered-To: apmail-ant-notifications-archive@ant.apache.org Received: (qmail 21336 invoked by uid 500); 15 Oct 2012 15:32:55 -0000 Mailing-List: contact notifications-help@ant.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ant.apache.org Delivered-To: mailing list notifications@ant.apache.org Received: (qmail 21329 invoked by uid 99); 15 Oct 2012 15:32:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Oct 2012 15:32:55 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Oct 2012 15:32:53 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id EFA1023889B8 for ; Mon, 15 Oct 2012 15:32:08 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1398339 - in /ant/ivy/core/branches/2.3.x: ./ src/java/org/apache/ivy/util/url/BasicURLHandler.java Date: Mon, 15 Oct 2012 15:32:08 -0000 To: notifications@ant.apache.org From: hibou@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121015153208.EFA1023889B8@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: hibou Date: Mon Oct 15 15:32:08 2012 New Revision: 1398339 URL: http://svn.apache.org/viewvc?rev=1398339&view=rev Log: merge of r1398334: fix NPE: some server seems to not return any content type Modified: ant/ivy/core/branches/2.3.x/ (props changed) ant/ivy/core/branches/2.3.x/src/java/org/apache/ivy/util/url/BasicURLHandler.java Propchange: ant/ivy/core/branches/2.3.x/ ------------------------------------------------------------------------------ Merged /ant/ivy/core/trunk:r1398334 Modified: ant/ivy/core/branches/2.3.x/src/java/org/apache/ivy/util/url/BasicURLHandler.java URL: http://svn.apache.org/viewvc/ant/ivy/core/branches/2.3.x/src/java/org/apache/ivy/util/url/BasicURLHandler.java?rev=1398339&r1=1398338&r2=1398339&view=diff ============================================================================== --- ant/ivy/core/branches/2.3.x/src/java/org/apache/ivy/util/url/BasicURLHandler.java (original) +++ ant/ivy/core/branches/2.3.x/src/java/org/apache/ivy/util/url/BasicURLHandler.java Mon Oct 15 15:32:08 2012 @@ -108,11 +108,13 @@ public class BasicURLHandler extends Abs String charSet = null; - String[] elements = contentType.split(";"); - for (int i = 0; i < elements.length; i++) { - String element = elements[i].trim(); - if (element.toLowerCase().startsWith("charset=")) { - charSet = element.substring("charset=".length()); + if (contentType != null) { + String[] elements = contentType.split(";"); + for (int i = 0; i < elements.length; i++) { + String element = elements[i].trim(); + if (element.toLowerCase().startsWith("charset=")) { + charSet = element.substring("charset=".length()); + } } }