You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by cs...@apache.org on 2006/09/21 00:03:26 UTC

svn commit: r448360 - /beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/generator/apt/ControlClientAnnotationProcessor.java

Author: cschoett
Date: Wed Sep 20 15:03:25 2006
New Revision: 448360

URL: http://svn.apache.org/viewvc?view=rev&rev=448360
Log:
Fix for minor apt issue when an '@Control' annotation is placed on a POJO field instead of a control field.  Behavior was to fail with an assertion error, updated to let apt fail and report error instead.

DRTs: Controls, passed.

Modified:
    beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/generator/apt/ControlClientAnnotationProcessor.java

Modified: beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/generator/apt/ControlClientAnnotationProcessor.java
URL: http://svn.apache.org/viewvc/beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/generator/apt/ControlClientAnnotationProcessor.java?view=diff&rev=448360&r1=448359&r2=448360
==============================================================================
--- beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/generator/apt/ControlClientAnnotationProcessor.java (original)
+++ beehive/trunk/controls/src/runtime/org/apache/beehive/controls/runtime/generator/apt/ControlClientAnnotationProcessor.java Wed Sep 20 15:03:25 2006
@@ -531,7 +531,9 @@
 
                 // per the code in checkControlField, this set must be of size 1
                 // and the 1 super interface must be a control interface/extension
-                assert ( intfs.size() == 1 );
+                // a value of zero may be valid if the control field is not referencing
+                // a control -- for this case fall through and return null.
+                assert ( intfs.size() <= 1 );
                 for ( InterfaceType intfType : intfs )
                     return intfType.getDeclaration();
             }