Ivy
  1. Ivy
  2. IVY-1133

ChainResolver Checkmodified override bug

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.0-RC2
    • Fix Version/s: 2.2.0-RC1
    • Component/s: Core
    • Labels:
      None

      Description

      I have found an issue some time ago with resolving dependencies via a
      chain resolver.
      I can not remember the exact scenario, but had to do with resolving A
      -> B -> C where A and C comes from a local repo and B from a 'shared'
      repo.

      The issue seems to be with ChainResolver that overrides 'public void
      setCheckmodified(boolean check)'. The 'checkModified' value is not
      propagated through to the base class 'AbstractResolver'. This results
      in the 'AbstractResolver.getCacheOptions(ResolveData data)' behaving
      incorrectly when creating the 'CacheMetadataOptions'.

      The fix I made was to change the 'ChainResolver.setCheckmodified' to:

      public void setCheckmodified(boolean check)

      { checkmodified = Boolean.valueOf(check); super.setCheckmodified(check); }

      I've attached an svn patch for it.

        Activity

        jaco uys created issue -
        jaco uys made changes -
        Field Original Value New Value
        Attachment Checkmodified.patch [ 12421207 ]
        jaco uys made changes -
        Description I have found an issue some time ago with resolving dependencies via a
        chain resolver.
        I can not remember the exact scenario, but had to do with resolving A
        -> B -> C where A and C comes from a local repo and B from a 'shared'
        repo.

        The issue seems to be with ChainResolver that overrides 'public void
        setCheckmodified(boolean check)'. The 'checkModified' value is not
        propagated through to the base class 'AbstractResolver'. This results
        in the 'AbstractResolver.getCacheOptions(ResolveData data)' behaving
        incorrectly when creating the 'CacheMetadataOptions'.
        I have found an issue some time ago with resolving dependencies via a
        chain resolver.
        I can not remember the exact scenario, but had to do with resolving A
        -> B -> C where A and C comes from a local repo and B from a 'shared'
        repo.

        The issue seems to be with ChainResolver that overrides 'public void
        setCheckmodified(boolean check)'. The 'checkModified' value is not
        propagated through to the base class 'AbstractResolver'. This results
        in the 'AbstractResolver.getCacheOptions(ResolveData data)' behaving
        incorrectly when creating the 'CacheMetadataOptions'.

        The fix I made was to change the 'ChainResolver.setCheckmodified' to:

        public void setCheckmodified(boolean check) {
               checkmodified = Boolean.valueOf(check);
               super.setCheckmodified(check);
        }

        I've attached an svn patch for it.
        jaco uys made changes -
        Fix Version/s 2.1.0-RC2 [ 12314062 ]
        Hide
        Maarten Coene added a comment -

        I've completely removed the checkmodified field/methods from the ChainResolver so everything is passed correctly to the AbstractResolver.
        Thanks for the report + patch.

        Maarten

        Show
        Maarten Coene added a comment - I've completely removed the checkmodified field/methods from the ChainResolver so everything is passed correctly to the AbstractResolver. Thanks for the report + patch. Maarten
        Maarten Coene made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Maarten Coene [ maartenc ]
        Fix Version/s trunk [ 12313426 ]
        Fix Version/s 2.1.0-RC2 [ 12314062 ]
        Resolution Fixed [ 1 ]
        Maarten Coene made changes -
        Fix Version/s 2.2.0-RC1 [ 12315013 ]
        Fix Version/s trunk [ 12313426 ]

          People

          • Assignee:
            Maarten Coene
            Reporter:
            jaco uys
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development