portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject cvs commit: jakarta-jetspeed/src/java/org/apache/jetspeed/services/idgenerator JetspeedIdGeneratorService.java
Date Tue, 04 Mar 2003 17:02:14 GMT
taylor      2003/03/04 09:02:14

  Modified:    src/java/org/apache/jetspeed/services/idgenerator
                        JetspeedIdGeneratorService.java
  Log:
  IdGenerator patch from Ryan Christianson
  
  Revision  Changes    Path
  1.3       +5 -3      jakarta-jetspeed/src/java/org/apache/jetspeed/services/idgenerator/JetspeedIdGeneratorService.java
  
  Index: JetspeedIdGeneratorService.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/services/idgenerator/JetspeedIdGeneratorService.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- JetspeedIdGeneratorService.java	4 Mar 2003 00:05:08 -0000	1.2
  +++ JetspeedIdGeneratorService.java	4 Mar 2003 17:02:14 -0000	1.3
  @@ -171,13 +171,15 @@
        */
       public String getNextPeid()
       {
  +        long newid;
  +
           synchronized(JetspeedIdGeneratorService.class)
           {
  -            idCounter++;
  +            newid = idCounter++;
           }
           
           return peidPrefix + Long.toHexString(System.currentTimeMillis()) + "-" 
  -               + Long.toHexString(idCounter) + peidSuffix;
  +               + Long.toHexString(newid) + peidSuffix;
       }
       
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Mime
View raw message