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

devonfw / IDEasy / 19651727463

24 Nov 2025 10:43PM UTC coverage: 69.156% (+0.1%) from 69.024%
19651727463

push

github

web-flow
#1144: #1145: CVE warnings and suggestions (#1593)

Co-authored-by: KianRolf <kian.loroff@capgemini.com>
Co-authored-by: jan-vcapgemini <59438728+jan-vcapgemini@users.noreply.github.com>

3613 of 5721 branches covered (63.15%)

Branch coverage included in aggregate %.

9387 of 13077 relevant lines covered (71.78%)

3.15 hits per line

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

16.67
cli/src/main/java/com/devonfw/tools/ide/tool/DelegatingToolCommandlet.java
1
package com.devonfw.tools.ide.tool;
2

3
import java.nio.file.Path;
4
import java.util.Set;
5

6
import com.devonfw.tools.ide.common.Tag;
7
import com.devonfw.tools.ide.context.IdeContext;
8
import com.devonfw.tools.ide.environment.EnvironmentVariablesFiles;
9
import com.devonfw.tools.ide.process.ProcessContext;
10
import com.devonfw.tools.ide.step.Step;
11
import com.devonfw.tools.ide.version.VersionIdentifier;
12

13
/**
14
 * {@link ToolCommandlet} that delegates to another ToolCommandlet.
15
 *
16
 * @param <D> type of the {@link ToolCommandlet} to delegate to.
17
 */
18
public abstract class DelegatingToolCommandlet<D extends ToolCommandlet> extends ToolCommandlet {
19

20
  private final Class<D> delegateClass;
21

22
  /**
23
   * The constructor.
24
   *
25
   * @param context the {@link IdeContext}.
26
   * @param tool the {@link #getName() tool name}.
27
   * @param tags the {@link #getTags() tags} classifying the tool. Should be created via {@link Set#of(Object) Set.of} method.
28
   * @param delegateClass the {@link ToolCommandlet}.
29
   */
30
  public DelegatingToolCommandlet(IdeContext context, String tool, Set<Tag> tags, Class<D> delegateClass) {
31

32
    super(context, tool, tags);
5✔
33
    this.delegateClass = delegateClass;
3✔
34
  }
1✔
35

36
  private D getDelegate() {
37
    return getCommandlet(this.delegateClass);
×
38
  }
39

40
  @Override
41
  public final ToolInstallation install(boolean silent, VersionIdentifier version, ProcessContext processContext, Step step) {
42
    return getDelegate().install(silent, version, processContext, step);
×
43
  }
44

45
  @Override
46
  public VersionIdentifier getInstalledVersion() {
47
    return getDelegate().getInstalledVersion();
×
48
  }
49

50
  @Override
51
  public String getInstalledEdition() {
52
    return getDelegate().getInstalledEdition();
×
53
  }
54

55
  @Override
56
  protected Path getInstallationPath(String edition, VersionIdentifier resolvedVersion) {
57

58
    return getDelegate().getInstallationPath(edition, resolvedVersion);
×
59
  }
60

61
  @Override
62
  public void uninstall() {
63
    getDelegate().uninstall();
×
64
  }
×
65

66
  @Override
67
  public void listEditions() {
68
    getDelegate().listEditions();
×
69
  }
×
70

71
  @Override
72
  public void listVersions() {
73
    getDelegate().listVersions();
×
74
  }
×
75

76
  @Override
77
  public void setVersion(VersionIdentifier version, boolean hint, EnvironmentVariablesFiles destination) {
78
    getDelegate().setVersion(version, hint, destination);
×
79
  }
×
80

81
  @Override
82
  public void setEdition(String edition, boolean hint, EnvironmentVariablesFiles destination) {
83
    getDelegate().setEdition(edition, hint, destination);
×
84
  }
×
85
}
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