[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Classpathx-javamail] POP3Connection.java patch for concurrency debuggin
From: |
Doug Porter |
Subject: |
[Classpathx-javamail] POP3Connection.java patch for concurrency debugging |
Date: |
Sun, 07 Sep 2003 12:05:59 -0800 |
diff -r
/usr/src/CVS/classpathx/mail/source/gnu/mail/providers/pop3/POP3Connection.java
/usr/src/tiger-0.5.2-test/thirdparty/classpathx-javamail-customized/mail/source/gnu/mail/providers/pop3/POP3Connection.java
34a35,37
> import java.util.Date;
> import java.util.TimeZone;
> import java.text.SimpleDateFormat;
99a103,110
>
> /**
> * Concurrency debugging support
> */
> static int instanceCount = 0;
> int instanceIndex = 0;
> final boolean DEBUG_SHOW_TIMESTAMP = true;
> final boolean DEBUG_SHOW_INSTANCES = true;
116a128,129
> ++instanceCount;
> instanceIndex = instanceCount;
380c393
< System.err.println("POP> "+command);
---
> System.err.println(popDebugPrefix()+"> "+command);
396c409
< System.err.println("POP< "+response);
---
> System.err.println(popDebugPrefix()+"< "+response);
430a444,465
>
> private String popDebugPrefix () {
> String prefix = "";
> if (DEBUG_SHOW_TIMESTAMP) {
> prefix += getDateTimeStamp () + " ";
> }
> prefix += "POP";
> if (DEBUG_SHOW_INSTANCES &&
> instanceIndex > 1) {
> prefix += "[" + instanceIndex + "]";
> }
> return prefix;
> }
>
> private String getDateTimeStamp () {
> TimeZone gmt = TimeZone.getTimeZone ("GMT");
> // DateFormat df = DateFormat.getDateTimeInstance ();
> SimpleDateFormat df = new SimpleDateFormat ("yyyy-MM-dd
> hh:mm:ss.SSS");
> df.setTimeZone (gmt);
> Date now = new Date ();
> return df.format (now);
> }
--
Doug Porter
address@hidden
--
http://www.fastmail.fm - Access all of your messages and folders
wherever you are
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Classpathx-javamail] POP3Connection.java patch for concurrency debugging,
Doug Porter <=