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

devonfw / IDEasy / 22300285724

23 Feb 2026 09:32AM UTC coverage: 70.754% (+0.3%) from 70.474%
22300285724

Pull #1714

github

web-flow
Merge caa980897 into 379acdc9d
Pull Request #1714: #404: #1713: advanced logging

4064 of 6348 branches covered (64.02%)

Branch coverage included in aggregate %.

10640 of 14434 relevant lines covered (73.71%)

3.1 hits per line

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

80.95
cli/src/main/java/com/devonfw/tools/ide/environment/EnvironmentVariablesMap.java
1
package com.devonfw.tools.ide.environment;
2

3
import java.util.Map;
4

5
import org.slf4j.Logger;
6
import org.slf4j.LoggerFactory;
7

8
import com.devonfw.tools.ide.context.IdeContext;
9
import com.devonfw.tools.ide.os.WindowsPathSyntax;
10

11
/**
12
 * Implementation of {@link EnvironmentVariables}.
13
 */
14
abstract class EnvironmentVariablesMap extends AbstractEnvironmentVariables {
15

16
  private static final Logger LOG = LoggerFactory.getLogger(EnvironmentVariablesMap.class);
4✔
17

18
  /**
19
   * The constructor.
20
   *
21
   * @param parent the parent {@link EnvironmentVariables} to inherit from.
22
   * @param context the {@link IdeContext}.
23
   */
24
  EnvironmentVariablesMap(AbstractEnvironmentVariables parent, IdeContext context) {
25

26
    super(parent, context);
4✔
27
  }
1✔
28

29
  /**
30
   * @return the {@link Map} with the underlying variables. Internal method do not call from outside and never manipulate this {@link Map} externally.
31
   */
32
  protected abstract Map<String, String> getVariables();
33

34
  @Override
35
  public String getFlat(String name) {
36

37
    String value = getVariables().get(name);
6✔
38
    if (value == null) {
2✔
39
      LOG.trace("{}: Variable {} is undefined.", getSource(), name);
7✔
40
    } else {
41
      LOG.trace("{}: Variable {}={}", getSource(), name, value);
18✔
42
      WindowsPathSyntax pathSyntax = this.context.getPathSyntax();
4✔
43
      if (pathSyntax != null) {
2✔
44
        String normalized = pathSyntax.normalize(value);
4✔
45
        if (!value.equals(normalized)) {
4!
46
          LOG.trace("Normalized {} using {} to {}", value, pathSyntax, normalized);
×
47
          value = normalized;
×
48
        }
49
      }
50
    }
51
    return value;
2✔
52
  }
53

54
  @Override
55
  public String toString() {
56

57
    return getSource() + ":\n" + getVariables();
×
58
  }
59

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