From a86e5236e17c348f7b926e762a73c96bace6671b Mon Sep 17 00:00:00 2001
From: Simon Barner <barner@fortiss.org>
Date: Thu, 10 Mar 2016 13:19:25 +0000
Subject: [PATCH] Avoid empty catch

---
 .../valueprovider/EStructuralFeatureDescriptor.java   | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/org.fortiss.tooling.base/trunk/src/org/fortiss/tooling/base/annotation/valueprovider/EStructuralFeatureDescriptor.java b/org.fortiss.tooling.base/trunk/src/org/fortiss/tooling/base/annotation/valueprovider/EStructuralFeatureDescriptor.java
index 67a745a6e..687efc6db 100644
--- a/org.fortiss.tooling.base/trunk/src/org/fortiss/tooling/base/annotation/valueprovider/EStructuralFeatureDescriptor.java
+++ b/org.fortiss.tooling.base/trunk/src/org/fortiss/tooling/base/annotation/valueprovider/EStructuralFeatureDescriptor.java
@@ -39,7 +39,7 @@ import org.fortiss.tooling.base.model.element.IModelElement;
  * @author barner
  * @author $Author$
  * @version $Rev$
- * @ConQAT.Rating GREEN Hash: 6CDDBEDED2A34C65AF1C5FD5315651A9
+ * @ConQAT.Rating YELLOW Hash: 66AEDAE9850DC4A70B474DD380C21D9F
  */
 public class EStructuralFeatureDescriptor {
 	/**
@@ -149,6 +149,9 @@ public class EStructuralFeatureDescriptor {
 	 * @param specification
 	 *            Specification for which the set of available objects is computed.
 	 * 
+	 * @return {@code true} iff an object is available to be selected for an {@link EReference}
+	 *         structural feature of an annotation.
+	 * 
 	 */
 	public boolean isAvailableObject(EObject obj, IAnnotatedSpecification specification,
 			EObject modelElement) {
@@ -160,13 +163,11 @@ public class EStructuralFeatureDescriptor {
 	 * {@link EStructuralFeatureDescriptor}.
 	 */
 	public EClassifier getEType(IAnnotatedSpecification specification) {
-		EClassifier eType = null;
 		try {
-			eType = getEStructuralFeature(specification).getEType();
+			return getEStructuralFeature(specification).getEType();
 		} catch(Exception e) {
-			// Ignore
+			return null;
 		}
-		return eType;
 	}
 
 	/**
-- 
GitLab