• Andy Wilkinson's avatar
    Truncate files before writing new content to them · 63402a29
    Andy Wilkinson authored
    Previously, UpgradeApplicator would open build.gradle
    using open options that left the fields existing content intact. It
    would then write the new content at the beginning of the file. If
    the new content was n bytes shorter than the existing content, this
    would leave n bytes of the existing content at the end of the file.
    
    This commit updates UpgradeApplicator to truncate the existing file
    when it opens it. This ensures that the existing content is
    completely replaced by the new content, irrespective of their lengths.
    
    Closes gh-25256
    63402a29
Name
Last commit
Last update
..
artifactory Loading commit data...
assertj Loading commit data...
bom Loading commit data...
context/properties Loading commit data...
log4j2 Loading commit data...
mavenplugin Loading commit data...
optional Loading commit data...
testing Loading commit data...
ConventionsPluginTests.java Loading commit data...