Return-Path: X-Original-To: apmail-logging-log4net-dev-archive@www.apache.org Delivered-To: apmail-logging-log4net-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AB62A7494 for ; Tue, 6 Sep 2011 09:30:54 +0000 (UTC) Received: (qmail 73353 invoked by uid 500); 6 Sep 2011 09:30:53 -0000 Delivered-To: apmail-logging-log4net-dev-archive@logging.apache.org Received: (qmail 73112 invoked by uid 500); 6 Sep 2011 09:30:41 -0000 Mailing-List: contact log4net-dev-help@logging.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Log4NET Dev" List-Id: Delivered-To: mailing list log4net-dev@logging.apache.org Received: (qmail 73061 invoked by uid 99); 6 Sep 2011 09:30:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Sep 2011 09:30:34 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Sep 2011 09:30:31 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 9519582212 for ; Tue, 6 Sep 2011 09:30:11 +0000 (UTC) Date: Tue, 6 Sep 2011 09:30:11 +0000 (UTC) From: "Stefan Bodewig (JIRA)" To: log4net-dev@logging.apache.org Message-ID: <1016775044.19675.1315301411607.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (LOG4NET-215) Exception on Convert for return %class{1} name 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/LOG4NET-215?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Stefan Bodewig updated LOG4NET-215: ----------------------------------- Fix Version/s: 1.2.11 > Exception on Convert for return %class{1} name > ---------------------------------------------- > > Key: LOG4NET-215 > URL: https://issues.apache.org/jira/browse/LOG4NET-215 > Project: Log4net > Issue Type: Bug > Components: Core > Affects Versions: 1.2.10 > Environment: Windows XP, Visual Studio 2008, .NET 2.0 > Reporter: Georgievsky Ilya > Fix For: 1.2.11 > > Original Estimate: 1h > Remaining Estimate: 1h > > in function^ > override protected void Convert(TextWriter writer, LoggingEvent loggingEvent) > { > string name = GetFullyQualifiedName(loggingEvent); > if (m_precision <= 0) > { > writer.Write(name); > } > else > { > int len = name.Length; > // We subtract 1 from 'len' when assigning to 'end' to avoid out of > // bounds exception in return name.Substring(end+1, len). This can happen if > // precision is 1 and the logger name ends with a dot. > int end = len - 1; > for(int i=m_precision; i>0; i--) > { > end = name.LastIndexOf('.', end - 1); > if (end == -1) > { > writer.Write(name); > return; > } > } > writer.Write(name.Substring(end+1, len-end-1)); > } > } > if "string name = GetFullyQualifiedName(loggingEvent); " return '?' (noname class-name) in line "end = name.LastIndexOf('.', end - 1);" exceptrion because end = 0... -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira