[ https://issues.apache.org/jira/browse/IVY-1495?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nicolas Lalevée resolved IVY-1495. ---------------------------------- Resolution: Fixed Assignee: Nicolas Lalevée Fix Version/s: master > Using matcher attribute on ttl in settings file cause NullPointerException > -------------------------------------------------------------------------- > > Key: IVY-1495 > URL: https://issues.apache.org/jira/browse/IVY-1495 > Project: Ivy > Issue Type: Bug > Components: Core > Affects Versions: 2.4.0-RC1 > Reporter: Martin Krajc > Assignee: Nicolas Lalevée > Fix For: master > > > Using similar config in ivysettings cause NullPointerException > {code} > <caches default="ivyCache" > > <cache name="ivyCache" basedir="${default.cache.dir}" > defaultTTL="eternal" > > <ttl organisation="com.abc" duration="0ms" matcher="regexp"/> > </cache> > </caches> > {code} > Value of matcher doesn't matter > {code} > c:\test-ttl.xml:23: impossible to configure ivy:settings with given file: > c:\ivysettings.xml : java.text.ParseException: failed to load settings from > file:/c:/ivysettings.xml: impossible to add configured child for ttl on class > org.apache.ivy.core.cache.DefaultRepositoryCacheManager: > java.lang.NullPointerException at > org.apache.ivy.core.cache.DefaultRepositoryCacheManager.addConfiguredTtl(DefaultRepositoryCacheManager.java:252) > {code} > Looking and debugging line 252 in DefaultrepositoryCacheManager, the settings > variable is not yet initialized in that point of parsing > {code} > addTTL(attributes, > matcher == null ? ExactPatternMatcher.INSTANCE : > settings.getMatcher(matcher), > parseDuration(duration)); > {code} -- This message was sent by Atlassian JIRA (v6.3.15#6346)