You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Mark Lilback (JIRA)" <ji...@apache.org> on 2011/05/24 20:24:47 UTC

[jira] [Created] (OPENJPA-2005) PostgresDictionary.isOwnedSequence needs a null check

PostgresDictionary.isOwnedSequence needs a null check
-----------------------------------------------------

                 Key: OPENJPA-2005
                 URL: https://issues.apache.org/jira/browse/OPENJPA-2005
             Project: OpenJPA
          Issue Type: Bug
          Components: jdbc
    Affects Versions: 2.1.0
            Reporter: Mark Lilback
            Priority: Minor


In PostgresDictionary.java, Line 430 calls buildNames(strName) to get a String[][]. Right below this, a for loop references namePairs.length. However, buildNames can return null, which results in a NullPointerException. While this is inside a try/catch, it still fills my logs up with warning messages (10 stack traces at launch for a single table with a sequence). Skipping the loop when namePairs is null would solve this.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (OPENJPA-2005) PostgresDictionary.isOwnedSequence needs a null check

Posted by "Michael Dick (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-2005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13039131#comment-13039131 ] 

Michael Dick commented on OPENJPA-2005:
---------------------------------------

Thanks for reporting this. Do you have an example of what strName is when you get the failure? 

> PostgresDictionary.isOwnedSequence needs a null check
> -----------------------------------------------------
>
>                 Key: OPENJPA-2005
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2005
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jdbc
>    Affects Versions: 2.1.0
>            Reporter: Mark Lilback
>            Assignee: Michael Dick
>            Priority: Minor
>   Original Estimate: 5m
>  Remaining Estimate: 5m
>
> In PostgresDictionary.java, Line 430 calls buildNames(strName) to get a String[][]. Right below this, a for loop references namePairs.length. However, buildNames can return null, which results in a NullPointerException. While this is inside a try/catch, it still fills my logs up with warning messages (10 stack traces at launch for a single table with a sequence). Skipping the loop when namePairs is null would solve this.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Assigned] (OPENJPA-2005) PostgresDictionary.isOwnedSequence needs a null check

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

Michael Dick reassigned OPENJPA-2005:
-------------------------------------

    Assignee: Michael Dick

> PostgresDictionary.isOwnedSequence needs a null check
> -----------------------------------------------------
>
>                 Key: OPENJPA-2005
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2005
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jdbc
>    Affects Versions: 2.1.0
>            Reporter: Mark Lilback
>            Assignee: Michael Dick
>            Priority: Minor
>   Original Estimate: 5m
>  Remaining Estimate: 5m
>
> In PostgresDictionary.java, Line 430 calls buildNames(strName) to get a String[][]. Right below this, a for loop references namePairs.length. However, buildNames can return null, which results in a NullPointerException. While this is inside a try/catch, it still fills my logs up with warning messages (10 stack traces at launch for a single table with a sequence). Skipping the loop when namePairs is null would solve this.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (OPENJPA-2005) PostgresDictionary.isOwnedSequence needs a null check

Posted by "Michael Dick (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-2005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13039699#comment-13039699 ] 

Michael Dick commented on OPENJPA-2005:
---------------------------------------

Just checked in the changes to trunk. If you enable trace logging you'll still see some messages - but at least they won't include the stack trace. If having trace messages is an issue reopen the JIRA and I'll remove at least one of them. 

> PostgresDictionary.isOwnedSequence needs a null check
> -----------------------------------------------------
>
>                 Key: OPENJPA-2005
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2005
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jdbc
>    Affects Versions: 2.1.0
>            Reporter: Mark Lilback
>            Assignee: Michael Dick
>            Priority: Minor
>             Fix For: 2.2.0
>
>   Original Estimate: 5m
>  Remaining Estimate: 5m
>
> In PostgresDictionary.java, Line 430 calls buildNames(strName) to get a String[][]. Right below this, a for loop references namePairs.length. However, buildNames can return null, which results in a NullPointerException. While this is inside a try/catch, it still fills my logs up with warning messages (10 stack traces at launch for a single table with a sequence). Skipping the loop when namePairs is null would solve this.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (OPENJPA-2005) PostgresDictionary.isOwnedSequence needs a null check

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

Michael Dick resolved OPENJPA-2005.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 2.2.0

> PostgresDictionary.isOwnedSequence needs a null check
> -----------------------------------------------------
>
>                 Key: OPENJPA-2005
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2005
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jdbc
>    Affects Versions: 2.1.0
>            Reporter: Mark Lilback
>            Assignee: Michael Dick
>            Priority: Minor
>             Fix For: 2.2.0
>
>   Original Estimate: 5m
>  Remaining Estimate: 5m
>
> In PostgresDictionary.java, Line 430 calls buildNames(strName) to get a String[][]. Right below this, a for loop references namePairs.length. However, buildNames can return null, which results in a NullPointerException. While this is inside a try/catch, it still fills my logs up with warning messages (10 stack traces at launch for a single table with a sequence). Skipping the loop when namePairs is null would solve this.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira