Project

General

Profile

« Previous | Next » 

Revision 16a96c7c

Added by Patrick Plitzner almost 7 years ago

Fix possible NPE endless loop

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/PreferencesUtil.java
194 194
        } else{
195 195
            CdmPreference pref = getPreferenceFromDB(PreferencePredicate.ShowTaxonAssociations);
196 196

  
197
            return Boolean.valueOf(pref.getValue());
197
            return pref!=null?Boolean.valueOf(pref.getValue()):false;
198 198
        }
199 199
    }
200 200

  
......
224 224
        } else{
225 225
            CdmPreference pref = getPreferenceFromDB(PreferencePredicate.ShowCollectingAreasInGeneralSection);
226 226

  
227
            return Boolean.valueOf(pref.getValue());
227
            return pref!=null?Boolean.valueOf(pref.getValue()):false;
228 228
        }
229 229
    }
230 230

  
......
234 234
        } else{
235 235
            CdmPreference pref = getPreferenceFromDB(PreferencePredicate.NameDetailsView);
236 236

  
237
            return Boolean.valueOf(pref.getValue());
237
            return pref!=null?Boolean.valueOf(pref.getValue()):false;
238 238
        }
239 239
    }
240 240

  

Also available in: Unified diff