FELIX-3653 : Define the "@Reference" annotation on class level without a "referenceInterface" parameter.

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1380772 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/helper/Validator.java b/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/helper/Validator.java
index ac226c1..4dc8f48 100644
--- a/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/helper/Validator.java
+++ b/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/helper/Validator.java
@@ -398,11 +398,12 @@
         // validate interface
         if (StringUtils.isEmpty(ref.getInterfaceName())) {
             this.logError(ref, "Missing interface name");
-        }
-        try {
-            this.project.getClassLoader().loadClass(ref.getInterfaceName());
-        } catch (final ClassNotFoundException e) {
-            this.logError(ref, "Interface class can't be loaded: " + ref.getInterfaceName());
+        } else {
+            try {
+                this.project.getClassLoader().loadClass(ref.getInterfaceName());
+            } catch (final ClassNotFoundException e) {
+                this.logError(ref, "Interface class can't be loaded: " + ref.getInterfaceName());
+            }
         }
 
         // validate cardinality