diff options
Diffstat (limited to 'sca-java-2.x/trunk/modules/implementation-java/src/main/java')
5 files changed, 13 insertions, 13 deletions
diff --git a/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/AbstractPropertyProcessor.java b/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/AbstractPropertyProcessor.java index cf01ede748..180ea3e64d 100644 --- a/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/AbstractPropertyProcessor.java +++ b/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/AbstractPropertyProcessor.java @@ -113,7 +113,7 @@ public abstract class AbstractPropertyProcessor<A extends Annotation> extends Ba Annotation argAnnotations[] = paramsAnnotations[i]; for (int j = 0; j < argAnnotations.length; j++) { if(argAnnotations[j].annotationType() == org.oasisopen.sca.annotation.Property.class) { - throw new IllegalPropertyException("Argument " + (i+1) + " of method " + method.getName() + " in class " + method.getDeclaringClass() + " can not be a Property"); + throw new IllegalPropertyException("[JCA90001] Argument " + (i+1) + " of method " + method.getName() + " in class " + method.getDeclaringClass() + " can not be a Property"); } } } @@ -133,7 +133,7 @@ public abstract class AbstractPropertyProcessor<A extends Annotation> extends Ba } if(Modifier.isFinal(field.getModifiers())) { - throw new IllegalPropertyException("Final field " + field.getName() +" in class " + field.getDeclaringClass().getName() + " can not be annotated as a Property"); + throw new IllegalPropertyException("[JCA90011] Final field " + field.getName() +" in class " + field.getDeclaringClass().getName() + " can not be annotated as a Property"); } String name = getName(annotation); @@ -175,14 +175,14 @@ public abstract class AbstractPropertyProcessor<A extends Annotation> extends Ba throw new InvalidConstructorException("Mismatched property name: " + parameter); } if ("".equals(name) && "".equals(parameter.getName())) { - throw new InvalidPropertyException("Missing property name: " + parameter); + throw new InvalidPropertyException("[JCA90013] Missing property name: " + parameter); } if ("".equals(name)) { name = parameter.getName(); } if (!getRequired(annotation)) { - throw new InvalidPropertyException("JCA_90014 Constructor property must not have required=false: " + type.getName()); + throw new InvalidPropertyException("[JCA90014] Constructor property must not have required=false: " + type.getName()); } JavaElementImpl prop = properties.get(name); diff --git a/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/DestroyProcessor.java b/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/DestroyProcessor.java index 0c4c0a4731..a4b760760c 100644 --- a/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/DestroyProcessor.java +++ b/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/DestroyProcessor.java @@ -50,7 +50,7 @@ public class DestroyProcessor extends BaseJavaClassVisitor { return; } if (method.getParameterTypes().length != 0) { - throw new IllegalDestructorException("Destructor must not have argments", method); + throw new IllegalDestructorException("[JCA90004] Destructor must not have arguments", method); } if(!method.getReturnType().equals(void.class)) { throw new IllegalDestructorException("Destructor must return void.", method); diff --git a/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/InitProcessor.java b/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/InitProcessor.java index 8d67236fe2..a5227fc4f5 100644 --- a/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/InitProcessor.java +++ b/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/InitProcessor.java @@ -51,7 +51,7 @@ public class InitProcessor extends BaseJavaClassVisitor { return; } if (method.getParameterTypes().length != 0) { - throw new IllegalInitException("Initializer must not have argments", method); + throw new IllegalInitException("[JCA90008] Initializer must not have argments", method); } if(!method.getReturnType().equals(void.class)) { throw new IllegalInitException("Initializer must return void.", method); diff --git a/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ReferenceProcessor.java b/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ReferenceProcessor.java index d30ac074af..b5c3806166 100644 --- a/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ReferenceProcessor.java +++ b/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ReferenceProcessor.java @@ -143,11 +143,11 @@ public class ReferenceProcessor extends BaseJavaClassVisitor { } if (!refAnnotation.required()) { - throw new InvalidReferenceException("JCA90016 Constructor has @Reference with required=false: " + type.getName()); + throw new InvalidReferenceException("[JCA90016] Constructor has @Reference with required=false: " + type.getName()); } if (refAnnotation.name() == null || refAnnotation.name().length() < 1) { - throw new InvalidReferenceException("JCA90018 @Reference in a Constructor must have a name attribute" + type.getName()); + throw new InvalidReferenceException("[JCA90018] @Reference in a Constructor must have a name attribute" + type.getName()); } String paramName = parameter.getName(); diff --git a/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ServiceProcessor.java b/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ServiceProcessor.java index 30ed5dda44..99a29ece1c 100644 --- a/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ServiceProcessor.java +++ b/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ServiceProcessor.java @@ -94,7 +94,7 @@ public class ServiceProcessor extends BaseJavaClassVisitor { Class<?>[] interfaces = annotation.value(); if (annotation.names().length > 0) { if (annotation.names().length != interfaces.length) { - throw new IntrospectionException("JCA90050 The number of Strings in the names attribute array of the @Service annotation MUST match the number of elements in the value attribute array"); + throw new IntrospectionException("[JCA90050] The number of Strings in the names attribute array of the @Service annotation MUST match the number of elements in the value attribute array"); } Set<String> names = new HashSet<String>(); names.addAll(Arrays.asList(annotation.names())); @@ -106,7 +106,7 @@ public class ServiceProcessor extends BaseJavaClassVisitor { //validate no scope on servce interface for (Class<?> iface : interfaces) { if (iface.getAnnotation(org.oasisopen.sca.annotation.Scope.class) != null) { - throw new IntrospectionException("JCA90041 @Scope annotation not allowed on service interface " + iface + throw new IntrospectionException("[JCA90041] @Scope annotation not allowed on service interface " + iface .getName()); } } @@ -116,7 +116,7 @@ public class ServiceProcessor extends BaseJavaClassVisitor { for (Class<?> iface : interfaces) { for (Method m : iface.getMethods()) { if (!hasMethod(m, ms)) { - throw new IntrospectionException("JCA???? Implementation missing service method " + m.getName() + " service interface " + iface.getName()); + throw new IntrospectionException("[JCA90042] Implementation missing service method " + m.getName() + " service interface " + iface.getName()); } } } @@ -150,7 +150,7 @@ public class ServiceProcessor extends BaseJavaClassVisitor { } if (!(annotation.value() == null || annotation.value() == Void.class)) { - throw new IllegalCallbackReferenceException("JCA90046 @Callback on field of method must not have any parameters: " + type.getName() + "." + method.getName()); + throw new IllegalCallbackReferenceException("[JCA90046] @Callback on field of method must not have any parameters: " + type.getName() + "." + method.getName()); } if(Modifier.isPrivate(method.getModifiers())) { @@ -171,7 +171,7 @@ public class ServiceProcessor extends BaseJavaClassVisitor { return; } if (!(annotation.value() == null || annotation.value() == Void.class)) { - throw new IllegalCallbackReferenceException("JCA90046 @Callback on field of method must not have any parameters: " + type.getName() + "." + field.getName()); + throw new IllegalCallbackReferenceException("[JCA90046] @Callback on field of method must not have any parameters: " + type.getName() + "." + field.getName()); } if(Modifier.isPrivate(field.getModifiers())) { throw new IllegalCallbackReferenceException("Illegal annotation @Callback found on "+field, field); |