Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 1.2.0, 1.2.1, 1.3.0, 2.0.0-M1, 2.0.0-M2
    • Fix Version/s: 1.3.0, 2.0.0-M2
    • Component/s: logging
    • Labels:
      None

      Description

      There is a small oversight in DB2Dictionary - there is a check whether TRACE level is enabled and then an exception is logged on ERROR level.

      1. OPENJPA-884.patch
        3 kB
        Milosz Tylenda

        Activity

        Hide
        Milosz Tylenda added a comment -

        The patch fixes the logging issue and also corrects a few typos in comments and access to static constants.

        Show
        Milosz Tylenda added a comment - The patch fixes the logging issue and also corrects a few typos in comments and access to static constants.
        Hide
        Michael Dick added a comment -

        I think the intent was actually to use trace level logging. We're reporting an error, but one that we can recover from. The method doesn't re-throw the exception and the original intent appears to be just to recover silently. Still it's not obvious what the intent is and it needs to be fixed.

        Good catch Milosz

        Show
        Michael Dick added a comment - I think the intent was actually to use trace level logging. We're reporting an error, but one that we can recover from. The method doesn't re-throw the exception and the original intent appears to be just to recover silently. Still it's not obvious what the intent is and it needs to be fixed. Good catch Milosz
        Hide
        Milosz Tylenda added a comment -

        Yes, using the trace level should also be acceptable.

        On the other hand, I had another look at this and could not see any reasonable exception being thrown. So now I am in favor of removing this try/catch completely, at least in the trunk.

        Unfortunately this piece of code is too old too have its history in the SVN.

        Show
        Milosz Tylenda added a comment - Yes, using the trace level should also be acceptable. On the other hand, I had another look at this and could not see any reasonable exception being thrown. So now I am in favor of removing this try/catch completely, at least in the trunk. Unfortunately this piece of code is too old too have its history in the SVN.
        Hide
        Michael Dick added a comment -

        I noticed the same thing about history in SVN. This code was added when OpenJPA was in the incubator. If the incubator's svn repository is still available we could probably find it there.

        I think I agree with you regarding removing the try / catch. Seems to me if we can't detect the version of DB2 we'd want to fail early rather than having an empty forUpdateClause.

        Catalina, do you have a recommendation? You've done a lot of work with DB2 and might remember when this code was added.

        Show
        Michael Dick added a comment - I noticed the same thing about history in SVN. This code was added when OpenJPA was in the incubator. If the incubator's svn repository is still available we could probably find it there. I think I agree with you regarding removing the try / catch. Seems to me if we can't detect the version of DB2 we'd want to fail early rather than having an empty forUpdateClause. Catalina, do you have a recommendation? You've done a lot of work with DB2 and might remember when this code was added.
        Hide
        Catalina Wei added a comment -

        Milosz & Mike,
        That try/catch block seems unnecessary. I am OK with removing that try/catch.

        Show
        Catalina Wei added a comment - Milosz & Mike, That try/catch block seems unnecessary. I am OK with removing that try/catch.

          People

          • Assignee:
            Michael Dick
            Reporter:
            Milosz Tylenda
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development