Project

General

Profile

« Previous | Next » 

Revision a9fe6b8d

Added by Patrick Plitzner about 5 years ago

ref #7998 fix potential NPE

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/AbstractFilteredCdmResourceSelectionDialog.java
103 103

  
104 104
	protected AbstractFilteredCdmResourceSelectionDialog(Shell shell, //ConversationHolder conversation,
105 105
	        String title, boolean multi, String settings, T objectToBeFiltered) {
106
	    this(shell, title, multi, settings, Collections.singleton(objectToBeFiltered));
106
	    this(shell, title, multi, settings, objectToBeFiltered!=null?Collections.singleton(objectToBeFiltered):null);
107 107
	}
108 108

  
109 109
	/**
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/TermVocabularySelectionDialog.java
39 39
    }
40 40

  
41 41
    public static TermVocabulary select(String dialogTitle, Shell shell, TermVocabulary voc){
42
        return select_internal(dialogTitle, shell, Collections.singleton(voc), null);
42
        return select_internal(dialogTitle, shell, voc!=null?Collections.singleton(voc):null, null);
43 43
    }
44 44

  
45 45
    public static TermVocabulary select(Shell shell, TermVocabulary voc){
46
        return select_internal("Choose Vocabulary", shell, Collections.singleton(voc), null);
46
        return select_internal("Choose Vocabulary", shell, voc!=null?Collections.singleton(voc):null, null);
47 47
    }
48 48

  
49 49
    private static TermVocabulary select_internal(String dialogTitle, Shell shell, Set<TermVocabulary> vocabulariesToBeFiltered,

Also available in: Unified diff