Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 32339 invoked from network); 10 Apr 2006 20:42:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 10 Apr 2006 20:42:35 -0000 Received: (qmail 32286 invoked by uid 500); 10 Apr 2006 20:42:34 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 32208 invoked by uid 500); 10 Apr 2006 20:42:34 -0000 Mailing-List: contact harmony-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-commits@incubator.apache.org Received: (qmail 32197 invoked by uid 99); 10 Apr 2006 20:42:34 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Apr 2006 13:42:34 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 10 Apr 2006 13:42:33 -0700 Received: (qmail 32266 invoked by uid 65534); 10 Apr 2006 20:42:13 -0000 Message-ID: <20060410204213.32263.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r393055 - /incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/StackTraceElement.java Date: Mon, 10 Apr 2006 20:42:12 -0000 To: harmony-commits@incubator.apache.org From: gharley@apache.org X-Mailer: svnmailer-1.0.7 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: gharley Date: Mon Apr 10 13:42:11 2006 New Revision: 393055 URL: http://svn.apache.org/viewcvs?rev=393055&view=rev Log: HARMONY 289 : Update StackTraceElement for Java 5 Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/StackTraceElement.java Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/StackTraceElement.java URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/StackTraceElement.java?rev=393055&r1=393054&r2=393055&view=diff ============================================================================== --- incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/StackTraceElement.java (original) +++ incubator/harmony/enhanced/classlib/trunk/modules/luni-kernel/src/main/java/java/lang/StackTraceElement.java Mon Apr 10 13:42:11 2006 @@ -18,11 +18,12 @@ /** * An implementation of this class is provided, but the documented constructor - * can be used by the vm specific implementation to create instances. + * can be used by the VM specific implementation to create instances. * * StackTraceElement represents a stack frame. * * @see Throwable#getStackTrace() + * @since 1.4 */ public final class StackTraceElement implements java.io.Serializable { private static final long serialVersionUID = 6992337162326171013L; @@ -32,18 +33,24 @@ int lineNumber; /** - * Create a StackTraceElement from the parameters. - * - * @param cls - * The class name - * @param method - * The method name - * @param file - * The file name - * @param line - * The line number - */ - StackTraceElement(String cls, String method, String file, int line) { + *

+ * Constructs a StackTraceElement for an execution point. + *

+ * + * @param cls The fully qualified name of the class where execution is at. + * @param method The name of the method where execution is at. + * @param file The name of the file where execution is at or + * null. + * @param line The line of the file where execution is at, a negative number + * if unknown or -2 if the execution is in a native + * method. + * + * @throws NullPointerException if cls or method + * is null. + * + * @since 1.5 + */ + public StackTraceElement(String cls, String method, String file, int line) { if (cls == null || method == null) throw new NullPointerException(); declaringClass = cls; @@ -52,7 +59,11 @@ lineNumber = line; } - // prevent instantiation from java code - only the VM creates these + /** + *

+ * Private, nullary constructor for VM use only. + *

+ */ private StackTraceElement() { // Empty } @@ -107,7 +118,7 @@ * is executing. * * @return if available, the name of the file containing the Java code - * source for the stack trace element's excuting class. If no such + * source for the stack trace element's executing class. If no such * detail is available, a null value is returned. */ public String getFileName() { @@ -168,7 +179,7 @@ * @see java.lang.Object#toString() */ public String toString() { - StringBuffer buf = new StringBuffer(80); + StringBuilder buf = new StringBuilder(80); buf.append(getClassName()); buf.append('.');