minor fixes

This commit is contained in:
Himadri Singh 2013-12-19 10:49:38 +05:30
parent 3752122a7b
commit c58fbfe40c
2 changed files with 6 additions and 4 deletions

View File

@ -111,9 +111,12 @@ public class Initialization
*/
public static<T> Set<T> getLoadedModules(Class<T> clazz)
{
return extensionsMap.get(clazz);
Set<T> retVal = extensionsMap.get(clazz);
if (retVal == null) {
return Sets.newHashSet();
}
return retVal;
}
public synchronized static <T> Collection<T> getFromExtensions(ExtensionsConfig config, Class<T> clazz)
{

View File

@ -148,7 +148,7 @@ public class StatusResource
@Override
public String toString()
{
if (artifact.isEmpty()) {
if (artifact == null || artifact.isEmpty()) {
return String.format(" - %s ", name);
} else {
return String.format(" - %s (%s-%s)", name, artifact, version);
@ -194,6 +194,5 @@ public class StatusResource
{
return usedMemory;
}
}
}