Author: mwiederkehr Date: Tue Jan 6 15:43:48 2009 New Revision: 732179 URL: http://svn.apache.org/viewvc?rev=732179&view=rev Log: minor optimization: getCharset(ContentTypeField) no longer calls f.getCharset() up to three times
Modified: james/mime4j/trunk/src/main/java/org/apache/james/mime4j/field/ContentTypeField.java Modified: james/mime4j/trunk/src/main/java/org/apache/james/mime4j/field/ContentTypeField.java URL: http://svn.apache.org/viewvc/james/mime4j/trunk/src/main/java/org/apache/james/mime4j/field/ContentTypeField.java?rev=732179&r1=732178&r2=732179&view=diff ============================================================================== --- james/mime4j/trunk/src/main/java/org/apache/james/mime4j/field/ContentTypeField.java (original) +++ james/mime4j/trunk/src/main/java/org/apache/james/mime4j/field/ContentTypeField.java Tue Jan 6 15:43:48 2009 @@ -199,8 +199,9 @@ */ public static String getCharset(ContentTypeField f) { if (f != null) { - if (f.getCharset() != null && f.getCharset().length() > 0) { - return f.getCharset(); + String charset = f.getCharset(); + if (charset != null && charset.length() > 0) { + return charset; } } return "us-ascii"; --------------------------------------------------------------------- To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org