ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Krajc (JIRA)" <j...@apache.org>
Subject [jira] [Created] (IVY-1495) Using matcher attribute on ttl in settings file cause NullPointerException
Date Tue, 28 Oct 2014 07:48:33 GMT
Martin Krajc created IVY-1495:
---------------------------------

             Summary: 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


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.4#6332)

Mime
View raw message