summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/context/impl/ComponentContextImpl.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/context/impl/ComponentContextImpl.java b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/context/impl/ComponentContextImpl.java
index f8df72241c..cfa2a3c7e3 100644
--- a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/context/impl/ComponentContextImpl.java
+++ b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/context/impl/ComponentContextImpl.java
@@ -219,11 +219,10 @@ public class ComponentContextImpl implements RuntimeComponentContext {
public <B> B getProperty(Class<B> type, String propertyName) {
for (ComponentProperty p : component.getProperties()) {
if (propertyName.equals(p.getName())) {
- B o = propertyFactory.createPropertyValue(p, type);
- return o;
+ return propertyFactory.createPropertyValue(p, type);
}
}
- throw new ServiceRuntimeException("Property not found: " + propertyName);
+ throw new IllegalArgumentException("Property not found: " + propertyName);
}
/**