Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 712CD114B9 for ; Thu, 20 Feb 2014 14:43:22 +0000 (UTC) Received: (qmail 452 invoked by uid 500); 20 Feb 2014 14:43:21 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 284 invoked by uid 500); 20 Feb 2014 14:43:20 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 253 invoked by uid 99); 20 Feb 2014 14:43:19 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Feb 2014 14:43:19 +0000 Date: Thu, 20 Feb 2014 14:43:19 +0000 (UTC) From: "Sebb (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (NET-526) Avoid greedy matches within a regex MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/NET-526?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sebb resolved NET-526. ---------------------- Resolution: Fixed Fix Version/s: 3.4 URL: http://svn.apache.org/r1570207 Log: NET-526 Avoid greedy matches within a regex Modified: commons/proper/net/trunk/src/changes/changes.xml commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/parser/NetwareFTPEntryParser.java commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/parser/VMSFTPEntryParser.java commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/parser/VMSVersioningFTPEntryParser.java > Avoid greedy matches within a regex > ----------------------------------- > > Key: NET-526 > URL: https://issues.apache.org/jira/browse/NET-526 > Project: Commons Net > Issue Type: Improvement > Reporter: Sebb > Fix For: 3.4 > > > Some of the FTP directory parsers use greedy qualifiers - ".*" - within a regex. > This can be expensive, as it may require backtracking. > It's usually better to use a reluctant qualifier - e.g. ".*?" - except at the end of an RE. -- This message was sent by Atlassian JIRA (v6.1.5#6160)