Skip to content
Snippets Groups Projects
Commit 6b92dba4 authored by Vincent Aravantinos's avatar Vincent Aravantinos
Browse files

shorten methods

refs 2553
parent 2a2b5e8e
No related branches found
No related tags found
No related merge requests found
......@@ -43,7 +43,7 @@ import org.fortiss.tooling.kernel.utils.LoggingUtils;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: 48071ECDD1BF677507C8039C956F8C62
* @ConQAT.Rating YELLOW Hash: 2D2D4877EAFC4F0C40E1C6A744EBACC1
*/
public class ModelElementHandlerService extends
EObjectAwareServiceBase<IModelElementHandler<EObject>> implements
......@@ -116,10 +116,7 @@ public class ModelElementHandlerService extends
@Override
public String getName(EObject modelElement) {
IModelElementHandler<EObject> handler = getModelElementHandler(modelElement);
if(handler != null) {
return handler.getName(modelElement);
}
return null;
return handler == null ? null : handler.getName(modelElement);
}
/** {@inheritDoc} */
......@@ -136,10 +133,7 @@ public class ModelElementHandlerService extends
@Override
public Image getIcon(EObject modelElement) {
IModelElementHandler<EObject> handler = getModelElementHandler(modelElement);
if(handler != null) {
return handler.getIcon(modelElement);
}
return null;
return handler == null ? null : handler.getIcon(modelElement);
}
/** {@inheritDoc} */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment