[ 
https://issues.apache.org/jira/browse/FELIX-3136?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Daniel Kuffner updated FELIX-3136:
----------------------------------

    Description: 
I try to use the Felix SCR generator library in a intellij plugin. I
created subclass the JavaClassDescriptorManager to return the sources
for the current build module. I have more or less copy cat the code
form the ANT SCR. It seems like that the 
JavaClassDescriptorManager.getJavaClassDescription method
will go into a endless loop if I return a source file which doesn't have a 
Component annotation. 

The problem seems to be in the while loop of the getJavaClassDescription 
method. The index variable will not increased. 


398  while ( result == null && index < javaClasses.length )
399            {
400                final JavaClass javaClass = javaClasses[index];
401                if ( javaClass.getFullyQualifiedName().equals( className ) )
402                {

    // <SNIP>   NO loop break condition in case javaClass is not annotated.

424                }
425                else
426                {
427                    index++;
428                }
429            }


I think by increasing the index always would resolve the bug.

Addtional Information: 
parse JavaDoc tags disabled



  was:
I try to use the Felix SCR generator library in a intellij plugin. I
created subclass the JavaClassDescriptorManager to return the sources
for the current build module. I have more or less copy cat the code
form the ANT SCR. It seems like that the 
JavaClassDescriptorManager.getJavaClassDescription method
will go into a endless loop if I return a source file which doesn't have a 
Component annotation. 

The problem seems to be in the while loop of the getJavaClassDescription 
method. The index variable will not increased. 

{code}
398  while ( result == null && index < javaClasses.length )
399            {
400                final JavaClass javaClass = javaClasses[index];
401                if ( javaClass.getFullyQualifiedName().equals( className ) )
402                {

    // <SNIP>   NO loop break condition in case javaClass is not annotated.

424                }
425                else
426                {
427                    index++;
428                }
429            }
{code}

I think by increasing the index always would resolve the bug.

Addtional Information: 
parse JavaDoc tags disabled



    
> Endless loop: JavaClassDescriptorManager.getJavaClassDescription()
> ------------------------------------------------------------------
>
>                 Key: FELIX-3136
>                 URL: https://issues.apache.org/jira/browse/FELIX-3136
>             Project: Felix
>          Issue Type: Bug
>          Components: SCR Annotations
>    Affects Versions: scr generator 1.1.2
>            Reporter: Daniel Kuffner
>
> I try to use the Felix SCR generator library in a intellij plugin. I
> created subclass the JavaClassDescriptorManager to return the sources
> for the current build module. I have more or less copy cat the code
> form the ANT SCR. It seems like that the 
> JavaClassDescriptorManager.getJavaClassDescription method
> will go into a endless loop if I return a source file which doesn't have a 
> Component annotation. 
> The problem seems to be in the while loop of the getJavaClassDescription 
> method. The index variable will not increased. 
> 398  while ( result == null && index < javaClasses.length )
> 399            {
> 400                final JavaClass javaClass = javaClasses[index];
> 401                if ( javaClass.getFullyQualifiedName().equals( className ) 
> )
> 402                {
>     // <SNIP>   NO loop break condition in case javaClass is not annotated.
> 424                }
> 425                else
> 426                {
> 427                    index++;
> 428                }
> 429            }
> I think by increasing the index always would resolve the bug.
> Addtional Information: 
> parse JavaDoc tags disabled

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to