You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Chris Custine (JIRA)" <ji...@apache.org> on 2007/04/16 08:17:15 UTC

[jira] Created: (DIRSERVER-902) Turning on DEBUG logging causes ArrayIndexOutOfBounds in AbstractSchemaObject.java

Turning on DEBUG logging causes ArrayIndexOutOfBounds in AbstractSchemaObject.java
----------------------------------------------------------------------------------

                 Key: DIRSERVER-902
                 URL: https://issues.apache.org/jira/browse/DIRSERVER-902
             Project: Directory ApacheDS
          Issue Type: Bug
          Components: ldap
    Affects Versions: 1.5.0
            Reporter: Chris Custine


The names array is initialized as an empty array but the toString method is only checking for names ==null.  When DEBUG logging is on, the calls to toString() are causing AIOOB exceptions.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (DIRSERVER-902) Turning on DEBUG logging causes ArrayIndexOutOfBounds in AbstractSchemaObject.java

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-902?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Lecharny reopened DIRSERVER-902:
-----------------------------------------


Chris, you are plain right !

I must have been tired today when I mark this issue as resolved...

Let me apply the patch immediatly


> Turning on DEBUG logging causes ArrayIndexOutOfBounds in AbstractSchemaObject.java
> ----------------------------------------------------------------------------------
>
>                 Key: DIRSERVER-902
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-902
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: ldap
>    Affects Versions: 1.5.0
>            Reporter: Chris Custine
>             Fix For: 1.5.0
>
>         Attachments: DIRSERVER-902-2.diff, DIRSERVER-902.diff
>
>
> The names array is initialized as an empty array but the toString method is only checking for names ==null.  When DEBUG logging is on, the calls to toString() are causing AIOOB exceptions.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (DIRSERVER-902) Turning on DEBUG logging causes ArrayIndexOutOfBounds in AbstractSchemaObject.java

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-902?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Lecharny resolved DIRSERVER-902.
-----------------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 1.5.0)
                   1.5.1

Fixed by applying Chris patch :
http://svn.apache.org/viewvc?view=rev&rev=529404

> Turning on DEBUG logging causes ArrayIndexOutOfBounds in AbstractSchemaObject.java
> ----------------------------------------------------------------------------------
>
>                 Key: DIRSERVER-902
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-902
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: ldap
>    Affects Versions: 1.5.0
>            Reporter: Chris Custine
>             Fix For: 1.5.1
>
>         Attachments: DIRSERVER-902-2.diff, DIRSERVER-902.diff
>
>
> The names array is initialized as an empty array but the toString method is only checking for names ==null.  When DEBUG logging is on, the calls to toString() are causing AIOOB exceptions.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (DIRSERVER-902) Turning on DEBUG logging causes ArrayIndexOutOfBounds in AbstractSchemaObject.java

Posted by "Chris Custine (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-902?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Custine closed DIRSERVER-902.
-----------------------------------


> Turning on DEBUG logging causes ArrayIndexOutOfBounds in AbstractSchemaObject.java
> ----------------------------------------------------------------------------------
>
>                 Key: DIRSERVER-902
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-902
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: ldap
>    Affects Versions: 1.5.0
>            Reporter: Chris Custine
>             Fix For: 1.5.1
>
>         Attachments: DIRSERVER-902-2.diff, DIRSERVER-902.diff
>
>
> The names array is initialized as an empty array but the toString method is only checking for names ==null.  When DEBUG logging is on, the calls to toString() are causing AIOOB exceptions.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DIRSERVER-902) Turning on DEBUG logging causes ArrayIndexOutOfBounds in AbstractSchemaObject.java

Posted by "Chris Custine (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-902?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Custine updated DIRSERVER-902:
------------------------------------

    Attachment: DIRSERVER-902-2.diff

I still think this is a valid issue since the check that is in place currently is just a check for null on the actual array and not a check that the array has an element at 0.  The array is initialized as an empty array so if there are no additions to the array it will not be null, but there won't be an element at 0 and that is what was causing the ArrayIndexOutOfBounds exception in some cases when DEBUG logging is on.

Since there is a mutator for names ( setNames() ) the names array can also be set back to null, so I have attached another patch that restores the null check as well as the length check and should cover all of the scenarios.

> Turning on DEBUG logging causes ArrayIndexOutOfBounds in AbstractSchemaObject.java
> ----------------------------------------------------------------------------------
>
>                 Key: DIRSERVER-902
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-902
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: ldap
>    Affects Versions: 1.5.0
>            Reporter: Chris Custine
>             Fix For: 1.5.0
>
>         Attachments: DIRSERVER-902-2.diff, DIRSERVER-902.diff
>
>
> The names array is initialized as an empty array but the toString method is only checking for names ==null.  When DEBUG logging is on, the calls to toString() are causing AIOOB exceptions.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (DIRSERVER-902) Turning on DEBUG logging causes ArrayIndexOutOfBounds in AbstractSchemaObject.java

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-902?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Lecharny resolved DIRSERVER-902.
-----------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.5.0

I think the fix has been already applied in 1.5.0

> Turning on DEBUG logging causes ArrayIndexOutOfBounds in AbstractSchemaObject.java
> ----------------------------------------------------------------------------------
>
>                 Key: DIRSERVER-902
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-902
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: ldap
>    Affects Versions: 1.5.0
>            Reporter: Chris Custine
>             Fix For: 1.5.0
>
>         Attachments: DIRSERVER-902.diff
>
>
> The names array is initialized as an empty array but the toString method is only checking for names ==null.  When DEBUG logging is on, the calls to toString() are causing AIOOB exceptions.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DIRSERVER-902) Turning on DEBUG logging causes ArrayIndexOutOfBounds in AbstractSchemaObject.java

Posted by "Chris Custine (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-902?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Custine updated DIRSERVER-902:
------------------------------------

    Attachment: DIRSERVER-902.diff

This patch fixes this issue.  Replaced check of names==null with names.length==0.

> Turning on DEBUG logging causes ArrayIndexOutOfBounds in AbstractSchemaObject.java
> ----------------------------------------------------------------------------------
>
>                 Key: DIRSERVER-902
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-902
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: ldap
>    Affects Versions: 1.5.0
>            Reporter: Chris Custine
>         Attachments: DIRSERVER-902.diff
>
>
> The names array is initialized as an empty array but the toString method is only checking for names ==null.  When DEBUG logging is on, the calls to toString() are causing AIOOB exceptions.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.