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

devonfw / IDEasy / 12765847701

14 Jan 2025 10:34AM UTC coverage: 68.082% (+0.5%) from 67.541%
12765847701

push

github

web-flow
#759: upgrade settings commandlet (#820)

2689 of 4311 branches covered (62.38%)

Branch coverage included in aggregate %.

6946 of 9841 relevant lines covered (70.58%)

3.1 hits per line

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

83.33
cli/src/main/java/com/devonfw/tools/ide/merge/AbstractWorkspaceMerger.java
1
package com.devonfw.tools.ide.merge;
2

3
import java.io.IOException;
4
import java.nio.file.Files;
5
import java.nio.file.Path;
6

7
import com.devonfw.tools.ide.context.IdeContext;
8

9
/**
10
 * {@link WorkspaceMerger} responsible for a single type of {@link Path}.
11
 */
12
public abstract class AbstractWorkspaceMerger implements WorkspaceMerger {
13

14
  /** The {@link IdeContext} for logging. */
15
  protected final IdeContext context;
16

17
  /**
18
   * The constructor.
19
   *
20
   * @param context the {@link IdeContext}.
21
   */
22
  public AbstractWorkspaceMerger(IdeContext context) {
23

24
    super();
2✔
25
    this.context = context;
3✔
26
  }
1✔
27

28
  /**
29
   * @param file the {@link Path} for which the {@link Path#getParent() parent directory} needs to exist and will be created if absent by this method.
30
   */
31
  protected static void ensureParentDirectoryExists(Path file) {
32

33
    Path parentDir = file.getParent();
3✔
34
    if (!Files.exists(parentDir)) {
5✔
35
      try {
36
        Files.createDirectories(parentDir);
5✔
37
      } catch (IOException e) {
×
38
        throw new IllegalStateException("Could not create required directories for file: " + file, e);
×
39
      }
1✔
40
    }
41
  }
1✔
42

43
}
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