OpenJPA
  1. OpenJPA
  2. OPENJPA-2005

PostgresDictionary.isOwnedSequence needs a null check

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.0
    • Fix Version/s: 2.2.0
    • Component/s: jdbc
    • Labels:
      None

      Description

      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.

        Issue Links

          Activity

          Hide
          Michael Dick added a comment -

          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.

          Show
          Michael Dick added a comment - 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.
          Hide
          Michael Dick added a comment -

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

          Show
          Michael Dick added a comment - Thanks for reporting this. Do you have an example of what strName is when you get the failure?

            People

            • Assignee:
              Michael Dick
              Reporter:
              Mark Lilback
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 5m
                5m
                Remaining:
                Remaining Estimate - 5m
                5m
                Logged:
                Time Spent - Not Specified
                Not Specified

                  Development