Revision: 14837
          http://gate.svn.sourceforge.net/gate/?rev=14837&view=rev
Author:   markagreenwood
Date:     2011-12-22 07:57:05 +0000 (Thu, 22 Dec 2011)
Log Message:
-----------
moved some initialization code into a static initializer to avoid any possible 
threading problems however unlikely they might be

Modified Paths:
--------------
    gate/trunk/src/gate/creole/orthomatcher/OrthoMatcherHelper.java

Modified: gate/trunk/src/gate/creole/orthomatcher/OrthoMatcherHelper.java
===================================================================
--- gate/trunk/src/gate/creole/orthomatcher/OrthoMatcherHelper.java     
2011-12-22 07:52:02 UTC (rev 14836)
+++ gate/trunk/src/gate/creole/orthomatcher/OrthoMatcherHelper.java     
2011-12-22 07:57:05 UTC (rev 14837)
@@ -80,19 +80,17 @@
           */
          public static boolean[] rulesUsedTable=null;
          
+         static {
+           rulesUsedTable = new boolean[18];
+      for(int i=0;i<rulesUsedTable.length;i++) rulesUsedTable[i]=false;
+         }
+         
          /**
           * It is used for test purposes.
           * It sets that a specific rule has returned 'true'. 
           */
-         public static void usedRule(int rule) {
-           
-           if (rulesUsedTable==null) {
-             rulesUsedTable = new boolean[18];
-             for(int i=0;i<rulesUsedTable.length;i++) rulesUsedTable[i]=false;
-           }
-           
+         public static void usedRule(int rule) {    
            rulesUsedTable[rule]=true;
-           
          }
          
          /**

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs

Reply via email to