tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andy...@apache.org
Subject svn commit: r723440 - /tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/OneShotLock.java
Date Thu, 04 Dec 2008 21:15:52 GMT
Author: andyhot
Date: Thu Dec  4 13:15:51 2008
New Revision: 723440

URL: http://svn.apache.org/viewvc?rev=723440&view=rev
Log:
comment on java 1.6 difference

Modified:
    tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/OneShotLock.java

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/OneShotLock.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/OneShotLock.java?rev=723440&r1=723439&r2=723440&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/OneShotLock.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/OneShotLock.java
Thu Dec  4 13:15:51 2008
@@ -48,6 +48,9 @@
             // that creates the actual array, and includes itself as [0], getStackTrace()
as [1], etc.
             // Maybe it's something to do with synchronized?
 
+            // On the other hand, for 1.6 VMs, the correct element to get is 3. So, perhaps
check if
+            // [0] contains getStackTrace() and if it does, use 3 - otherwise use 4.
+
             StackTraceElement element = Thread.currentThread().getStackTrace()[4];
 
             throw new IllegalStateException(UtilMessages.oneShotLock(element));



Mime
View raw message