Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Stanimir Stamenkov Newsgroups: comp.lang.java.programmer Subject: Re: Avoid creating a stacktrace prior to JDK 1.7 Date: Sun, 02 Oct 2011 00:58:14 +0300 Organization: A noiseless patient Spider Lines: 30 Message-ID: References: <4424828.699.1317485416810.JavaMail.geo-discussion-forums@prng5> <1058576.2212.1317496868028.JavaMail.geo-discussion-forums@prfh23> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sat, 1 Oct 2011 21:58:07 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="7eOF4vEIiUU6n7fF+lWgFg"; logging-data="10222"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19RaTcFydc7uNmp6Dq3PLwv" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20110928 Firefox/7.0.1 SeaMonkey/2.4.1 In-Reply-To: X-Face: "@)%Vlap6d%OVYDS}B4YUWE@yUy+^!w/+.q.,c5kjI#+uG?kYP&r/pTjNWgo:g[A,O=AL3/ j&4Le2cau$ version, or that it's a bug if there is. You may be right, but I've read in the Javadoc for java.util.logging.Logger, for example : | For the methods that do not take an explicit source name and | method name, the Logging framework will make a "best effort" to | determine which class and method called into the logging method. | However, it is important to realize that this automatically | inferred information may only be approximate (or may even be | quite wrong!). Virtual machines are allowed to do extensive | optimizations when JITing and may entirely remove stack frames, | making it impossible to reliably locate the calling class and | method. So it seems stack trace information is not guaranteed to be available to user code. This detail may be given somewhere in the language or VM specifications. -- Stanimir