Changeset 23436

Show
Ignore:
Timestamp:
10.12.2010 20:40:28 (9 years ago)
Author:
ak19
Message:

Synchronising a couple of methods in FilenameEncoding? to ensure proper lock on state variable (refreshRequired) used in conditions

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/gli/src/org/greenstone/gatherer/metadata/FilenameEncoding.java

    r23433 r23436  
    6969    public static Map map = new HashMap(); 
    7070 
     71//*********************** BUSY REFRESHING / REQUIRING  REFRESH ********************* 
     72 
    7173    /** Set to true if filename encoding metadata was changed. Called by the enter keyPress  
    7274    * event in gui.EnrichPane and when the gs.FilenameEncoding field loses focus. */ 
    7375    private static boolean refreshRequired = false; 
    74      
    75 //*********************** BUSY REFRESHING / REQUIRING  REFRESH ********************* 
    76  
    77     public static boolean isRefreshRequired() {  
     76 
     77    synchronized public static boolean isRefreshRequired() {  
    7878        return refreshRequired;  
    7979    } 
    8080     
    81     public static void setRefreshRequired(boolean state) {  
     81    synchronized public static void setRefreshRequired(boolean state) {  
    8282        if(MULTIPLE_FILENAME_ENCODINGS_SUPPORTED) { 
    8383            refreshRequired = state;