Changeset 32704

Show
Ignore:
Timestamp:
17.12.2018 22:45:42 (4 weeks ago)
Author:
ak19
Message:

GLI GUI testing with AssertJ Swing discovered a NullPointerException? after a sequence of events, reproduced when the same event sequence was repeated manually with GLI: when user pref mode is changed to librarian, then lucene-demo collection opened and closed, then collection pinky created, closed and deleted, and lucene-demo collection exported to GS METS, and then finally the user pref mode changed back to expert. This triggered the NullPointerException? in cdm first in plugin_manager, and when fixed, in the next line of classifier_manager. So have corrected all such cases.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/gli/src/org/greenstone/gatherer/cdm/CollectionDesignManager.java

    r22970 r32704  
    189189     */ 
    190190    public void modeChanged(int mode) { 
    191     plugin_manager.modeChanged(mode); 
    192     classifier_manager.modeChanged(mode); 
    193     subcollection_manager.modeChanged(mode); 
    194     supercollection_manager.modeChanged(mode); 
    195     //format_manager.modeChanged(mode); 
    196     index_manager.modeChanged(mode); 
    197     translation_manager.modeChanged(mode); 
    198     general_manager.modeChanged(mode); 
    199     language_manager.modeChanged(mode); 
    200     searchmetadata_manager.modeChanged(mode); 
    201     depositormetadata_manager.modeChanged(mode); 
     191    if (plugin_manager != null) plugin_manager.modeChanged(mode);    
     192    if(classifier_manager != null) classifier_manager.modeChanged(mode); 
     193    if(subcollection_manager != null) subcollection_manager.modeChanged(mode); 
     194    if(supercollection_manager != null) supercollection_manager.modeChanged(mode); 
     195    //if(format_manager != null) format_manager.modeChanged(mode); 
     196    if(index_manager != null) index_manager.modeChanged(mode); 
     197    if(translation_manager != null) translation_manager.modeChanged(mode); 
     198    if(general_manager != null) general_manager.modeChanged(mode); 
     199    if(language_manager != null) language_manager.modeChanged(mode); 
     200    if(searchmetadata_manager != null) searchmetadata_manager.modeChanged(mode); 
     201    if(depositormetadata_manager != null) depositormetadata_manager.modeChanged(mode); 
    202202    } 
    203203