Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-7516

Improve javadocs for JavaBinCodec, ObjectResolver and enforce the single-usage policy

    Details

      Description

      The Javadocs of this class can use some improvements. It doesn't adequately describe the purpose of the ObjectResolver. Also, since it says that this object should be used only once for marshalling or unmarshalling operation, we should enforce it in code via asserts and/or exceptions.

      1. SOLR-7516.patch
        4 kB
        Jason Gerlowski
      2. SOLR-7516.patch
        4 kB
        Shalin Shekhar Mangar
      3. SOLR-7516.patch
        6 kB
        Shalin Shekhar Mangar
      4. SOLR-7516.patch
        7 kB
        Shalin Shekhar Mangar

        Activity

        Hide
        gerlowskija Jason Gerlowski added a comment -

        I took a stab at this, after piecing together how JBC and ObjectResolver work. Might've gotten some things wrong, but if nothing else this should get the ball rolling.

        Show
        gerlowskija Jason Gerlowski added a comment - I took a stab at this, after piecing together how JBC and ObjectResolver work. Might've gotten some things wrong, but if nothing else this should get the ball rolling.
        Hide
        b.vanalderweireldt Benoit Vanalderweireldt added a comment - - edited

        I would love to step in and improve the ObjectResolver (javadoc + assertion errors)

        Show
        b.vanalderweireldt Benoit Vanalderweireldt added a comment - - edited I would love to step in and improve the ObjectResolver (javadoc + assertion errors)
        Hide
        b.vanalderweireldt Benoit Vanalderweireldt added a comment -

        I'm looking at your patch and will add test cases and comments then will push it for you.

        Show
        b.vanalderweireldt Benoit Vanalderweireldt added a comment - I'm looking at your patch and will add test cases and comments then will push it for you.
        Hide
        githubbot ASF GitHub Bot added a comment -

        GitHub user bvanalderweireldt opened a pull request:

        https://github.com/apache/lucene-solr/pull/17

        SOLR-7516 add asserts and Improve Javadoc comments (patch from gerlow…

        add asserts and Improve Javadoc comments (patch from gerlowskija)

        You can merge this pull request into a Git repository by running:

        $ git pull https://github.com/bvanalderweireldt/lucene-solr SOLR-7516

        Alternatively you can review and apply these changes as the patch at:

        https://github.com/apache/lucene-solr/pull/17.patch

        To close this pull request, make a commit to your master/trunk branch
        with (at least) the following in the commit message:

        This closes #17


        commit 59ea719566a6df47309a1696af3629a545f17d24
        Author: bvanalderweireldt <benoit.vanalder@hybhub.com>
        Date: 2016-02-29T00:09:57Z

        SOLR-7516 add asserts and Improve Javadoc comments (patch from gerlowskija)


        Show
        githubbot ASF GitHub Bot added a comment - GitHub user bvanalderweireldt opened a pull request: https://github.com/apache/lucene-solr/pull/17 SOLR-7516 add asserts and Improve Javadoc comments (patch from gerlow… add asserts and Improve Javadoc comments (patch from gerlowskija) You can merge this pull request into a Git repository by running: $ git pull https://github.com/bvanalderweireldt/lucene-solr SOLR-7516 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/lucene-solr/pull/17.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #17 commit 59ea719566a6df47309a1696af3629a545f17d24 Author: bvanalderweireldt <benoit.vanalder@hybhub.com> Date: 2016-02-29T00:09:57Z SOLR-7516 add asserts and Improve Javadoc comments (patch from gerlowskija)
        Hide
        shalinmangar Shalin Shekhar Mangar added a comment -

        Fixed javadoc formatting and a typo s/suported/supported. Also changed the javadoc of the returned value of ObjectResolver#resolve to say.

        * @return the object {@code o} itself if it could not be serialized, or {@code null} if the whole object was successfully serialized.
        
        Show
        shalinmangar Shalin Shekhar Mangar added a comment - Fixed javadoc formatting and a typo s/suported/supported. Also changed the javadoc of the returned value of ObjectResolver#resolve to say. * @ return the object {@code o} itself if it could not be serialized, or {@code null } if the whole object was successfully serialized.
        Hide
        shalinmangar Shalin Shekhar Mangar added a comment -

        Fixes CursorMark to always create new JavaBinCodec options instead of re-using them for multiple unmarshall operations.

        Show
        shalinmangar Shalin Shekhar Mangar added a comment - Fixes CursorMark to always create new JavaBinCodec options instead of re-using them for multiple unmarshall operations.
        Hide
        shalinmangar Shalin Shekhar Mangar added a comment -

        This passes all tests. Ironically, TestJavaBinCodec itself was re-using JavaBinCodec against its own recommendations

        I'll commit after the 6.0 branch is cut.

        Show
        shalinmangar Shalin Shekhar Mangar added a comment - This passes all tests. Ironically, TestJavaBinCodec itself was re-using JavaBinCodec against its own recommendations I'll commit after the 6.0 branch is cut.
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit d87d8da17d7067ac873a11ba748beb7d82beb95e in lucene-solr's branch refs/heads/master from Shalin Shekhar Mangar
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=d87d8da ]

        • SOLR-7516: Improve javadocs for JavaBinCodec, ObjectResolver and enforce the single-usage policy

        This closes #17

        Show
        jira-bot ASF subversion and git services added a comment - Commit d87d8da17d7067ac873a11ba748beb7d82beb95e in lucene-solr's branch refs/heads/master from Shalin Shekhar Mangar [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=d87d8da ] SOLR-7516 : Improve javadocs for JavaBinCodec, ObjectResolver and enforce the single-usage policy This closes #17
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user asfgit closed the pull request at:

        https://github.com/apache/lucene-solr/pull/17

        Show
        githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/lucene-solr/pull/17
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit d346af3994fd2784c8550ccfea1f1d22afa0cd32 in lucene-solr's branch refs/heads/branch_6x from Shalin Shekhar Mangar
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=d346af3 ]

        • SOLR-7516: Improve javadocs for JavaBinCodec, ObjectResolver and enforce the single-usage policy

        This closes #17
        (cherry picked from commit d87d8da)

        Show
        jira-bot ASF subversion and git services added a comment - Commit d346af3994fd2784c8550ccfea1f1d22afa0cd32 in lucene-solr's branch refs/heads/branch_6x from Shalin Shekhar Mangar [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=d346af3 ] SOLR-7516 : Improve javadocs for JavaBinCodec, ObjectResolver and enforce the single-usage policy This closes #17 (cherry picked from commit d87d8da)
        Hide
        shalinmangar Shalin Shekhar Mangar added a comment -

        This is committed to master and branch_6x. Thanks Jason and Benoit!

        Show
        shalinmangar Shalin Shekhar Mangar added a comment - This is committed to master and branch_6x. Thanks Jason and Benoit!
        Hide
        hossman Hoss Man added a comment -

        Manually correcting fixVersion per Step #S5 of LUCENE-7271

        Show
        hossman Hoss Man added a comment - Manually correcting fixVersion per Step #S5 of LUCENE-7271
        Hide
        steve_rowe Steve Rowe added a comment -

        Reopening to backport to 6.0.1.

        Show
        steve_rowe Steve Rowe added a comment - Reopening to backport to 6.0.1.
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit d9d33a61be5ded162267413edddf1250500b4ae2 in lucene-solr's branch refs/heads/branch_6_0 from Shalin Shekhar Mangar
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=d9d33a6 ]

        • SOLR-7516: Improve javadocs for JavaBinCodec, ObjectResolver and enforce the single-usage policy

        This closes #17
        (cherry picked from commit d87d8da)

        Show
        jira-bot ASF subversion and git services added a comment - Commit d9d33a61be5ded162267413edddf1250500b4ae2 in lucene-solr's branch refs/heads/branch_6_0 from Shalin Shekhar Mangar [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=d9d33a6 ] SOLR-7516 : Improve javadocs for JavaBinCodec, ObjectResolver and enforce the single-usage policy This closes #17 (cherry picked from commit d87d8da)
        Hide
        steve_rowe Steve Rowe added a comment -

        Bulk close issues included in the 6.0.1 release.

        Show
        steve_rowe Steve Rowe added a comment - Bulk close issues included in the 6.0.1 release.
        Hide
        steve_rowe Steve Rowe added a comment -

        Reopening to backport to 5.6 and 5.5.2.

        Show
        steve_rowe Steve Rowe added a comment - Reopening to backport to 5.6 and 5.5.2.
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit ca7c21a98d024af03c1f0309e850879b23b69e60 in lucene-solr's branch refs/heads/branch_5_5 from Shalin Shekhar Mangar
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=ca7c21a ]

        • SOLR-7516: Improve javadocs for JavaBinCodec, ObjectResolver and enforce the single-usage policy

        (cherry picked from commit d87d8da)

        Show
        jira-bot ASF subversion and git services added a comment - Commit ca7c21a98d024af03c1f0309e850879b23b69e60 in lucene-solr's branch refs/heads/branch_5_5 from Shalin Shekhar Mangar [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=ca7c21a ] SOLR-7516 : Improve javadocs for JavaBinCodec, ObjectResolver and enforce the single-usage policy (cherry picked from commit d87d8da)
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 2d4d3f1a7fa1f1aaab6484d44839b4703ec4507f in lucene-solr's branch refs/heads/branch_5x from Shalin Shekhar Mangar
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=2d4d3f1 ]

        • SOLR-7516: Improve javadocs for JavaBinCodec, ObjectResolver and enforce the single-usage policy

        (cherry picked from commit d87d8da)

        Show
        jira-bot ASF subversion and git services added a comment - Commit 2d4d3f1a7fa1f1aaab6484d44839b4703ec4507f in lucene-solr's branch refs/heads/branch_5x from Shalin Shekhar Mangar [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=2d4d3f1 ] SOLR-7516 : Improve javadocs for JavaBinCodec, ObjectResolver and enforce the single-usage policy (cherry picked from commit d87d8da)
        Hide
        shalinmangar Shalin Shekhar Mangar added a comment -

        This was resolved and backported already.

        Show
        shalinmangar Shalin Shekhar Mangar added a comment - This was resolved and backported already.

          People

          • Assignee:
            shalinmangar Shalin Shekhar Mangar
            Reporter:
            shalinmangar Shalin Shekhar Mangar
          • Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development