You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by hl...@apache.org on 2010/07/11 21:05:58 UTC
svn commit: r963127 - in
/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform:
PerThreadState.java PersistWorker.java RetainWorker.java
Author: hlship
Date: Sun Jul 11 19:05:58 2010
New Revision: 963127
URL: http://svn.apache.org/viewvc?rev=963127&view=rev
Log:
TAP5-1197: Refctor PerThreadState out into a top-level class
Added:
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/PerThreadState.java (with props)
Modified:
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/PersistWorker.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/RetainWorker.java
Added: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/PerThreadState.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/PerThreadState.java?rev=963127&view=auto
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/PerThreadState.java (added)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/PerThreadState.java Sun Jul 11 19:05:58 2010
@@ -0,0 +1,31 @@
+// Copyright 2010 The Apache Software Foundation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package org.apache.tapestry5.internal.transform;
+
+import org.apache.tapestry5.ioc.services.PerthreadManager;
+
+/**
+ * Captures a value that is stored in the {@link PerthreadManager}. The extra indirection
+ * makes it possible to distinguish a stored value of null from no stored value at all.
+ */
+class PerThreadState
+{
+ Object value;
+
+ PerThreadState(Object defaultValue)
+ {
+ value = defaultValue;
+ }
+}
Propchange: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/PerThreadState.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/PersistWorker.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/PersistWorker.java?rev=963127&r1=963126&r2=963127&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/PersistWorker.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/PersistWorker.java Sun Jul 11 19:05:58 2010
@@ -34,16 +34,6 @@ import org.apache.tapestry5.services.Tra
*/
public class PersistWorker implements ComponentClassTransformWorker
{
- class PerThreadState
- {
- Object value;
-
- PerThreadState(Object defaultValue)
- {
- value = defaultValue;
- }
- }
-
class PersistentFieldConduit implements FieldValueConduit
{
private final InternalComponentResources resources;
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/RetainWorker.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/RetainWorker.java?rev=963127&r1=963126&r2=963127&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/RetainWorker.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/RetainWorker.java Sun Jul 11 19:05:58 2010
@@ -4,7 +4,7 @@
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
-// http://www.apache.org/licenses/LICENSE-2.0
+// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
@@ -21,7 +21,7 @@ import org.apache.tapestry5.services.Com
/**
* Identifies fields with the {@link org.apache.tapestry5.annotations.Retain} annotation, and "claims" them so that no
- * special work will occur on them.
+ * special work will occur on them. Retain has been deprecated in Tapestry 5.2 and will likely be removed in the future.
*/
public final class RetainWorker implements ComponentClassTransformWorker
{