Revision: 15260
http://gate.svn.sourceforge.net/gate/?rev=15260&view=rev
Author: valyt
Date: 2012-01-30 10:34:33 +0000 (Mon, 30 Jan 2012)
Log Message:
-----------
Change the way unique IDs are used for generates class names, so that we avoid
possible clashes in different sessions.
Modified Paths:
--------------
futures/JAPE_PlusC/src/gate/jape/plus/SPTBuilder.java
Modified: futures/JAPE_PlusC/src/gate/jape/plus/SPTBuilder.java
===================================================================
--- futures/JAPE_PlusC/src/gate/jape/plus/SPTBuilder.java 2012-01-30
02:27:05 UTC (rev 15259)
+++ futures/JAPE_PlusC/src/gate/jape/plus/SPTBuilder.java 2012-01-30
10:34:33 UTC (rev 15260)
@@ -65,7 +65,6 @@
"\t\t\t\t\t\t\t\t"};
private static final String GENERATED_CLASS_PACKAGE = "japephases";
- private static AtomicInteger generatedClassUID = new AtomicInteger();
/**
* Stores the states for the optimised transducer.
@@ -110,7 +109,8 @@
optimisePredicates();
StringBuilder sptCode = new StringBuilder();
- String className = "Phase" + oldSpt.getName() +
generatedClassUID.getAndIncrement();
+ String className = "Phase" + oldSpt.getName() +
+ Long.toString(System.currentTimeMillis(), Character.MAX_RADIX);
writeClassHeader(className, sptCode);
writeConstructor(className, oldSpt, 1, sptCode);
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs