Derby
  1. Derby
  2. DERBY-5022

[patch] override equals correctly

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 10.7.1.1
    • Fix Version/s: 10.8.1.2
    • Component/s: Network Server
    • Labels:
      None
    • Urgency:
      Normal
    • Bug behavior facts:
      Deviation from standard

      Description

      code implements equals w/o an Object parm. Calling code that doesn't have first class signature of FormatableBitSet will not work as expected. Properly override equals to fix.

      1. test.tgz
        3.87 MB
        Tiago R. Espinha
      2. override_equals_correctly.diff
        0.9 kB
        Dave Brosius
      3. allpackages_before1069981.txt
        2.09 MB
        Lily Wei
      4. allpackages_1069981.txt
        2.28 MB
        Lily Wei

        Activity

        Hide
        Tiago R. Espinha added a comment -

        This patch looks good and compiles cleanly. I'll run regressions before committing.

        Show
        Tiago R. Espinha added a comment - This patch looks good and compiles cleanly. I'll run regressions before committing.
        Hide
        Tiago R. Espinha added a comment -

        I'm hitting a few regressions with this patch, but when ran individually the tests pass. Will investigate.

        Show
        Tiago R. Espinha added a comment - I'm hitting a few regressions with this patch, but when ran individually the tests pass. Will investigate.
        Hide
        Tiago R. Espinha added a comment -

        The failures are consistent when the whole jdbcapi._Suite is ran. There are also other failures resulting from this test, which are all included in the fail/ folder within this attachment.

        I'm unassigning myself and ticking off patch available.

        Show
        Tiago R. Espinha added a comment - The failures are consistent when the whole jdbcapi._Suite is ran. There are also other failures resulting from this test, which are all included in the fail/ folder within this attachment. I'm unassigning myself and ticking off patch available.
        Hide
        Bryan Pendleton added a comment -

        I think maybe you should leave "Patch available" checked, as the patch is still available, though it's clearly not ready for commit as is.

        Your observations about the behavior changes that are caused by the patch are important to record; can you attach any information about the test failures? Can you briefly summarize the behavior that was altered by the patch?

        Do you have any theories about how the patch caused these changes in behavior?

        Show
        Bryan Pendleton added a comment - I think maybe you should leave "Patch available" checked, as the patch is still available, though it's clearly not ready for commit as is. Your observations about the behavior changes that are caused by the patch are important to record; can you attach any information about the test failures? Can you briefly summarize the behavior that was altered by the patch? Do you have any theories about how the patch caused these changes in behavior?
        Hide
        Bryan Pendleton added a comment -

        Oh silly me, I see that you did attach your test results. Sorry for missing that.

        Show
        Bryan Pendleton added a comment - Oh silly me, I see that you did attach your test results. Sorry for missing that.
        Hide
        Bryan Pendleton added a comment -

        I had a quick look at your test results; they seem to have to do with driver auto-loading, and with the UpdateStatistics test. I've seen some traffic on other Derby issues recently indicating that these tests are currently unreliable with the head of trunk; is it possible that your test results are problematic even without the patch applied?

        Show
        Bryan Pendleton added a comment - I had a quick look at your test results; they seem to have to do with driver auto-loading, and with the UpdateStatistics test. I've seen some traffic on other Derby issues recently indicating that these tests are currently unreliable with the head of trunk; is it possible that your test results are problematic even without the patch applied?
        Hide
        Dave Brosius added a comment -

        this would imply that some code is now finding two FormattableBitSets equal when they weren't before, as it was only expecting reference equality before.

        If that is what is wanted, the comparison should be changed to

        mybitset == anotherbitset

        Show
        Dave Brosius added a comment - this would imply that some code is now finding two FormattableBitSets equal when they weren't before, as it was only expecting reference equality before. If that is what is wanted, the comparison should be changed to mybitset == anotherbitset
        Hide
        Tiago R. Espinha added a comment -

        @ Bryan,

        I haven't tested it without the patch applied but I'm doing that now. It seems that in the meanwhile, Lily has committed a patch that touches those classes (which I have only now picked up on my trunk) so maybe the trunk was indeed having issues. I'll comment again when I have more results.

        Show
        Tiago R. Espinha added a comment - @ Bryan, I haven't tested it without the patch applied but I'm doing that now. It seems that in the meanwhile, Lily has committed a patch that touches those classes (which I have only now picked up on my trunk) so maybe the trunk was indeed having issues. I'll comment again when I have more results.
        Hide
        Tiago R. Espinha added a comment -

        Aha! Lily's patches seem to have fixed it. I'm going to give suites.All another spin anyway, just to make sure everything runs cleanly with the patch.

        Show
        Tiago R. Espinha added a comment - Aha! Lily's patches seem to have fixed it. I'm going to give suites.All another spin anyway, just to make sure everything runs cleanly with the patch.
        Hide
        Lily Wei added a comment -

        Hi Tiago: Just FYI. I run Suites.all before and after my check-in (svn 1069981). I have 6 failures, 377 errors and 5 failures and 388 errors. Most of the errors due to database 'wombat' already existed. If I may guess, it is because of testStatsCreatedOnGrowthThenDeleteDb. It had failure information like:
        2) testStatsCreatedOnGrowthThenDeleteDb(org.apache.derbyTesting.functionTests.te
        sts.store.AutomaticIndexStatisticsTest)junit.framework.AssertionFailedError: Fai
        led to delete 3 files (root=c:\derby3\trunk\testallpackages\system\wombat: c:\de
        rby3\trunk\testallpackages\system\wombat\seg0\c580.dat (isDir=false, canRead=tru
        e, canWrite=true, size=65536), c:\derby3\trunk\testallpackages\system\wombat\seg
        0 (isDir=true, canRead=true, canWrite=true, size=65536), c:\derby3\trunk\testall
        packages\system\wombat (isDir=true, canRead=true, canWrite=true, size=4096)
        at org.apache.derbyTesting.junit.BaseJDBCTestCase.assertDirectoryDeleted
        (BaseJDBCTestCase.java:1496)
        at org.apache.derbyTesting.functionTests.tests.store.AutomaticIndexStati
        sticsTest.testStatsCreatedOnGrowthThenDeleteDb(AutomaticIndexStatisticsTest.java
        sticsTest.testStatsCreatedOnGrowthThenDeleteDb(AutomaticIndexStatisticsTest.java
        :120)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
        java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
        sorImpl.java:25)
        at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:
        112)
        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
        at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
        at junit.extensions.TestSetup.run(TestSetup.java:23)
        at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57
        )
        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
        at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
        at junit.extensions.TestSetup.run(TestSetup.java:23)

        I attached both output file for you to reference. Hope this help, thanks!

        Show
        Lily Wei added a comment - Hi Tiago: Just FYI. I run Suites.all before and after my check-in (svn 1069981). I have 6 failures, 377 errors and 5 failures and 388 errors. Most of the errors due to database 'wombat' already existed. If I may guess, it is because of testStatsCreatedOnGrowthThenDeleteDb. It had failure information like: 2) testStatsCreatedOnGrowthThenDeleteDb(org.apache.derbyTesting.functionTests.te sts.store.AutomaticIndexStatisticsTest)junit.framework.AssertionFailedError: Fai led to delete 3 files (root=c:\derby3\trunk\testallpackages\system\wombat: c:\de rby3\trunk\testallpackages\system\wombat\seg0\c580.dat (isDir=false, canRead=tru e, canWrite=true, size=65536), c:\derby3\trunk\testallpackages\system\wombat\seg 0 (isDir=true, canRead=true, canWrite=true, size=65536), c:\derby3\trunk\testall packages\system\wombat (isDir=true, canRead=true, canWrite=true, size=4096) at org.apache.derbyTesting.junit.BaseJDBCTestCase.assertDirectoryDeleted (BaseJDBCTestCase.java:1496) at org.apache.derbyTesting.functionTests.tests.store.AutomaticIndexStati sticsTest.testStatsCreatedOnGrowthThenDeleteDb(AutomaticIndexStatisticsTest.java sticsTest.testStatsCreatedOnGrowthThenDeleteDb(AutomaticIndexStatisticsTest.java :120) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java: 112) at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22) at junit.extensions.TestSetup$1.protect(TestSetup.java:19) at junit.extensions.TestSetup.run(TestSetup.java:23) at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57 ) at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22) at junit.extensions.TestSetup$1.protect(TestSetup.java:19) at junit.extensions.TestSetup.run(TestSetup.java:23) I attached both output file for you to reference. Hope this help, thanks!
        Hide
        Tiago R. Espinha added a comment -

        I only saw your comment now Lily, but on my end, with your patch (and with Dave's patch), suites.All runs cleanly without failures or errors.

        I've committed it with revision 1070190.

        Thanks, Dave!

        Show
        Tiago R. Espinha added a comment - I only saw your comment now Lily, but on my end, with your patch (and with Dave's patch), suites.All runs cleanly without failures or errors. I've committed it with revision 1070190. Thanks, Dave!
        Hide
        Lily Wei added a comment -

        You are right, Tiago. suites.all also run clean with tinderbox_trunk16 1069981 and tinderbox_trunk16 1070190. Thanks!

        Show
        Lily Wei added a comment - You are right, Tiago. suites.all also run clean with tinderbox_trunk16 1069981 and tinderbox_trunk16 1070190. Thanks!

          People

          • Assignee:
            Dave Brosius
            Reporter:
            Dave Brosius
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 1h
              1h
              Remaining:
              Remaining Estimate - 1h
              1h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development