mirror of https://github.com/apache/ant-ivy
Throw an IllegalStateException when retrieving the resolutionCacheRoot on the DefaultResolutionCacheManager if the basedir (or IvySettings) is not set (IVY-1482)
This commit is contained in:
parent
9967600bdf
commit
c4bb60046d
|
|
@ -68,6 +68,7 @@ List of changes since Ivy 2.4.0:
|
|||
- FIX: Dependencies failed using branch attribute (and extra attributes) (IVY-1141) (Thanks to Stephen Haberman)
|
||||
- FIX: useCacheOnly should allow lookup of changing dependencies in cache (IVY-1515) (Thanks to Ilya)
|
||||
|
||||
- IMPROVEMENT: Throw an IllegalStateException when retrieving the resolutionCacheRoot on the DefaultResolutionCacheManager if the basedir (or IvySettings) is not set (IVY-1482)
|
||||
- IMPROVEMENT: Optimization: limit the revision numbers scanned if revision prefix is specified (Thanks to Ernestas Vaiciukevičius)
|
||||
- IMPROVEMENT: Update bouncycastle to 1.52 (IVY-1521) (Thanks to Michal Srb)
|
||||
|
||||
|
|
|
|||
|
|
@ -74,6 +74,12 @@ public class DefaultResolutionCacheManager implements ResolutionCacheManager, Iv
|
|||
}
|
||||
|
||||
public File getResolutionCacheRoot() {
|
||||
if (basedir == null) {
|
||||
if (settings == null) {
|
||||
throw new IllegalStateException("The 'basedir' or 'IvySettings' has not been set on the ResolutionCacheManager");
|
||||
}
|
||||
basedir = settings.getDefaultResolutionCacheBasedir();
|
||||
}
|
||||
return basedir;
|
||||
}
|
||||
|
||||
|
|
@ -213,7 +219,7 @@ public class DefaultResolutionCacheManager implements ResolutionCacheManager, Iv
|
|||
}
|
||||
|
||||
public void clean() {
|
||||
FileUtil.forceDelete(getBasedir());
|
||||
FileUtil.forceDelete(getResolutionCacheRoot());
|
||||
}
|
||||
|
||||
private static class CacheParserSettings implements ParserSettings {
|
||||
|
|
|
|||
Loading…
Reference in New Issue