• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

devonfw / IDEasy / 12750410851

13 Jan 2025 03:23PM UTC coverage: 68.077% (+0.5%) from 67.541%
12750410851

Pull #820

github

web-flow
Merge b7b0d1004 into 8e971e1a8
Pull Request #820: #759: upgrade settings commandlet

2689 of 4311 branches covered (62.38%)

Branch coverage included in aggregate %.

6946 of 9842 relevant lines covered (70.58%)

3.1 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

40.0
cli/src/main/java/com/devonfw/tools/ide/merge/FallbackMerger.java
1
package com.devonfw.tools.ide.merge;
2

3
import java.nio.file.Files;
4
import java.nio.file.Path;
5

6
import com.devonfw.tools.ide.context.IdeContext;
7
import com.devonfw.tools.ide.environment.EnvironmentVariables;
8

9
/**
10
 * Implementation of {@link FileMerger} to use as fallback. It can not actually merge but will simply overwrite the files.
11
 */
12
public class FallbackMerger extends FileMerger {
13

14
  /**
15
   * The constructor.
16
   *
17
   * @param context the {@link #context}.
18
   */
19
  public FallbackMerger(IdeContext context) {
20

21
    super(context);
3✔
22
  }
1✔
23

24
  @Override
25
  protected void doMerge(Path setup, Path update, EnvironmentVariables variables, Path workspace) {
26

27
    if (Files.exists(update)) {
5!
28
      copy(update, workspace);
5✔
29
    } else if (Files.exists(setup) && !Files.exists(workspace)) {
×
30
      copy(setup, workspace);
×
31
    }
32
  }
1✔
33

34
  @Override
35
  public void inverseMerge(Path workspaceFile, EnvironmentVariables resolver, boolean addNewProperties, Path updateFile) {
36

37
    // nothing by default, we could copy the workspace file back to the update file if it exists...
38
  }
×
39

40
  @Override
41
  protected boolean doUpgrade(Path workspaceFile) throws Exception {
42

43
    return false;
×
44
  }
45
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc