You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by bo...@apache.org on 2016/08/13 18:36:26 UTC
svn commit: r1756291 -
/logging/log4net/trunk/src/Layout/Pattern/DatePatternConverter.cs
Author: bodewig
Date: Sat Aug 13 18:36:26 2016
New Revision: 1756291
URL: http://svn.apache.org/viewvc?rev=1756291&view=rev
Log:
small optimization
Modified:
logging/log4net/trunk/src/Layout/Pattern/DatePatternConverter.cs
Modified: logging/log4net/trunk/src/Layout/Pattern/DatePatternConverter.cs
URL: http://svn.apache.org/viewvc/logging/log4net/trunk/src/Layout/Pattern/DatePatternConverter.cs?rev=1756291&r1=1756290&r2=1756291&view=diff
==============================================================================
--- logging/log4net/trunk/src/Layout/Pattern/DatePatternConverter.cs (original)
+++ logging/log4net/trunk/src/Layout/Pattern/DatePatternConverter.cs Sat Aug 13 18:36:26 2016
@@ -119,15 +119,16 @@ namespace log4net.Layout.Pattern
dateFormatStr = AbsoluteTimeDateFormatter.Iso8601TimeDateFormat;
}
- if (dateFormatStr.ToUpperInvariant() == AbsoluteTimeDateFormatter.Iso8601TimeDateFormat.ToUpperInvariant())
+ string dateFormatStrUpper = dateFormatStr.ToUpperInvariant();
+ if (dateFormatStrUpper == AbsoluteTimeDateFormatter.Iso8601TimeDateFormat.ToUpperInvariant())
{
m_dateFormatter = new Iso8601DateFormatter();
}
- else if (dateFormatStr.ToUpperInvariant() == AbsoluteTimeDateFormatter.AbsoluteTimeDateFormat.ToUpperInvariant())
+ else if (dateFormatStrUpper == AbsoluteTimeDateFormatter.AbsoluteTimeDateFormat.ToUpperInvariant())
{
m_dateFormatter = new AbsoluteTimeDateFormatter();
}
- else if (dateFormatStr.ToUpperInvariant() == AbsoluteTimeDateFormatter.DateAndTimeDateFormat.ToUpperInvariant())
+ else if (dateFormatStrUpper == AbsoluteTimeDateFormatter.DateAndTimeDateFormat.ToUpperInvariant())
{
m_dateFormatter = new DateTimeDateFormatter();
}