michael-o commented on a change in pull request #194: MNG-6350 - Test + System
property to disable global model cache
URL: https://github.com/apache/maven/pull/194#discussion_r238847910
##########
File path:
maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java
##########
@@ -115,14 +118,21 @@
public ProjectBuildingResult build( File pomFile, ProjectBuildingRequest
request )
throws ProjectBuildingException
{
- return build( pomFile, new FileModelSource( pomFile ), new
InternalConfig( request, null ) );
+ return build( pomFile, new FileModelSource( pomFile ),
+ new InternalConfig( request, null, useGlobalModelCache() ?
getModelCache() : null ) );
+ }
+
+ private boolean useGlobalModelCache()
+ {
+ return !Boolean.parseBoolean( System.getProperty(
DISABLE_GLOBAL_MODEL_CACHE_SYSTEM_PROPERTY ) );
Review comment:
Why don't you just use `Boolean#getBoolean()`?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services