You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@beehive.apache.org by "Chad Schoettger (JIRA)" <de...@beehive.apache.org> on 2005/11/02 19:11:55 UTC

[jira] Created: (BEEHIVE-990) Controls Annotation processor throws null pointer exception when an annotation type cannot be resolved

Controls Annotation processor throws null pointer exception when an annotation type cannot be resolved
------------------------------------------------------------------------------------------------------

         Key: BEEHIVE-990
         URL: http://issues.apache.org/jira/browse/BEEHIVE-990
     Project: Beehive
        Type: Bug
  Components: Controls  
    Reporter: Chad Schoettger
 Assigned to: Chad Schoettger 


If an annotation type cannot be resolved by the controls annotation processor, a null pointer exception is thrown by the annotation processor.  This would typically happen when the import for the annotation was not added to the source file.

Need to update AnnotationConstraintAptValidator to handle this case correctly.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (BEEHIVE-990) Controls Annotation processor throws null pointer exception when an annotation type cannot be resolved

Posted by "Chad Schoettger (JIRA)" <de...@beehive.apache.org>.
     [ http://issues.apache.org/jira/browse/BEEHIVE-990?page=all ]

Chad Schoettger updated BEEHIVE-990:
------------------------------------

    Attachment: BEEHIVE-990.patch

Attached patch.

Fixed code to properly handle NPE from APT call.

> Controls Annotation processor throws null pointer exception when an annotation type cannot be resolved
> ------------------------------------------------------------------------------------------------------
>
>          Key: BEEHIVE-990
>          URL: http://issues.apache.org/jira/browse/BEEHIVE-990
>      Project: Beehive
>         Type: Bug
>   Components: Controls
>     Reporter: Chad Schoettger
>     Assignee: Chad Schoettger
>  Attachments: BEEHIVE-990.patch
>
> If an annotation type cannot be resolved by the controls annotation processor, a null pointer exception is thrown by the annotation processor.  This would typically happen when the import for the annotation was not added to the source file.
> Need to update AnnotationConstraintAptValidator to handle this case correctly.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (BEEHIVE-990) Controls Annotation processor throws null pointer exception when an annotation type cannot be resolved

Posted by "matt c (JIRA)" <de...@beehive.apache.org>.
    [ http://issues.apache.org/jira/browse/BEEHIVE-990?page=comments#action_12376092 ] 

matt c commented on BEEHIVE-990:
--------------------------------

Verified fixed using local beehive build synced to SVN 393036 by adding an erroneous annotation to an interface and confirming the compiler error.

added the annotation '@NotAnAnno' to a control at the class and again at the method level.  In both cases a 'cannot find symbol' error was given.

      [apt] D:\beehive\trunk\controls\test\src\controls\org\apache\beehive\contr
ols\test\controls\myTests\SubHello.java:38: cannot find symbol
      [apt] symbol  : class NotAnAnno
      [apt] location: interface org.apache.beehive.controls.test.controls.myTest
s.SubHello
      [apt]     @NotAnAnno

 
This bug may be closed.

> Controls Annotation processor throws null pointer exception when an annotation type cannot be resolved
> ------------------------------------------------------------------------------------------------------
>
>          Key: BEEHIVE-990
>          URL: http://issues.apache.org/jira/browse/BEEHIVE-990
>      Project: Beehive
>         Type: Bug

>   Components: Controls
>     Reporter: Chad Schoettger
>     Assignee: Eddie O'Neil
>      Fix For: 1.0.1
>  Attachments: BEEHIVE-990.patch
>
> If an annotation type cannot be resolved by the controls annotation processor, a null pointer exception is thrown by the annotation processor.  This would typically happen when the import for the annotation was not added to the source file.
> Need to update AnnotationConstraintAptValidator to handle this case correctly.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Assigned: (BEEHIVE-990) Controls Annotation processor throws null pointer exception when an annotation type cannot be resolved

Posted by "Eddie O'Neil (JIRA)" <de...@beehive.apache.org>.
     [ http://issues.apache.org/jira/browse/BEEHIVE-990?page=all ]

Eddie O'Neil reassigned BEEHIVE-990:
------------------------------------

    Assign To: Eddie O'Neil  (was: Chad Schoettger)

> Controls Annotation processor throws null pointer exception when an annotation type cannot be resolved
> ------------------------------------------------------------------------------------------------------
>
>          Key: BEEHIVE-990
>          URL: http://issues.apache.org/jira/browse/BEEHIVE-990
>      Project: Beehive
>         Type: Bug
>   Components: Controls
>     Reporter: Chad Schoettger
>     Assignee: Eddie O'Neil
>  Attachments: BEEHIVE-990.patch
>
> If an annotation type cannot be resolved by the controls annotation processor, a null pointer exception is thrown by the annotation processor.  This would typically happen when the import for the annotation was not added to the source file.
> Need to update AnnotationConstraintAptValidator to handle this case correctly.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (BEEHIVE-990) Controls Annotation processor throws null pointer exception when an annotation type cannot be resolved

Posted by "Eddie O'Neil (JIRA)" <de...@beehive.apache.org>.
     [ http://issues.apache.org/jira/browse/BEEHIVE-990?page=all ]
     
Eddie O'Neil resolved BEEHIVE-990:
----------------------------------

    Fix Version: 1.1
     Resolution: Fixed

Fixed in SVN 331882.  Couldn't quite use the provided patch because the AP should be more failure-resistant and shouldn't throw an exception.  Just changed the for {} loop to continue when the type can't be found.

> Controls Annotation processor throws null pointer exception when an annotation type cannot be resolved
> ------------------------------------------------------------------------------------------------------
>
>          Key: BEEHIVE-990
>          URL: http://issues.apache.org/jira/browse/BEEHIVE-990
>      Project: Beehive
>         Type: Bug
>   Components: Controls
>     Reporter: Chad Schoettger
>     Assignee: Eddie O'Neil
>      Fix For: 1.1
>  Attachments: BEEHIVE-990.patch
>
> If an annotation type cannot be resolved by the controls annotation processor, a null pointer exception is thrown by the annotation processor.  This would typically happen when the import for the annotation was not added to the source file.
> Need to update AnnotationConstraintAptValidator to handle this case correctly.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira