svn commit: r570872 - /lenya/trunk/src/impl/java/org/apache/lenya/cms/repository/AxisUUIDGenerator.java

[email protected]
Newsgroups gmane.comp.cms.lenya.cvs
Message-ID <[email protected]>
Author: andreas
Date: Wed Aug 29 10:27:56 2007
New Revision: 570872

URL: http://svn.apache.org/viewvc?rev=570872&view=rev
Log:
[minor change] refactoring - extract field

Modified:
    lenya/trunk/src/impl/java/org/apache/lenya/cms/repository/AxisUUIDGenerator.java

Modified: lenya/trunk/src/impl/java/org/apache/lenya/cms/repository/AxisUUIDGenerator.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/impl/java/org/apache/lenya/cms/repository/AxisUUIDGenerator.java?rev=570872&r1=570871&r2=570872&view=diff
==============================================================================
--- lenya/trunk/src/impl/java/org/apache/lenya/cms/repository/AxisUUIDGenerator.java (original)
+++ lenya/trunk/src/impl/java/org/apache/lenya/cms/repository/AxisUUIDGenerator.java Wed Aug 29 10:27:56 2007
@@ -27,9 +27,17 @@
  */
 public class AxisUUIDGenerator extends AbstractLogEnabled implements UUIDGenerator, ThreadSafe {
 
+    private UUIDGen delegate;
+
+    protected UUIDGen getDelegate() {
+        if (this.delegate == null) {
+            this.delegate = UUIDGenFactory.getUUIDGen();
+        }
+        return this.delegate;
+    }
+
     public String nextUUID() {
-        UUIDGen generator = UUIDGenFactory.getUUIDGen();
-        return generator.nextUUID();
+        return getDelegate().nextUUID();
     }
 
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.