Skip to content

Commit

Permalink
Merge pull request #2 from jburel/omero_properties
Browse files Browse the repository at this point in the history
Fix possible NPE
  • Loading branch information
dominikl committed Mar 10, 2015
2 parents 648d1e2 + 2df2ee5 commit ec9e652
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import org.openmicroscopy.shoola.agents.dataBrowser.DataBrowserAgent;
import org.openmicroscopy.shoola.env.LookupNames;
import org.openmicroscopy.shoola.env.config.Registry;
import org.openmicroscopy.shoola.util.CommonsLangUtils;

//Third-party libraries

Expand Down Expand Up @@ -79,8 +80,12 @@ private static String getTypeName(int type)

switch (type) {
case MOVIE: return "Movies";
case ORPHANED_IMAGES:
return (String) reg.lookup(LookupNames.ORPHANED_IMAGE_NAME);
case ORPHANED_IMAGES:
String v = (String) reg.lookup(LookupNames.ORPHANED_IMAGE_NAME);
if (CommonsLangUtils.isNotBlank(v)) {
return v;
}
return "Orphaned Images";
case TAG:
return "Tags used not owned";
case OTHER:
Expand Down

0 comments on commit ec9e652

Please sign in to comment.