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

devonfw / IDEasy / 22203456564

19 Feb 2026 10:51PM UTC coverage: 70.112% (-0.4%) from 70.474%
22203456564

Pull #1710

github

web-flow
Merge 97cf467e5 into 379acdc9d
Pull Request #1710: #404: allow logging via SLF4J

4065 of 6386 branches covered (63.65%)

Branch coverage included in aggregate %.

10580 of 14502 relevant lines covered (72.96%)

3.16 hits per line

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

69.57
cli/src/main/java/com/devonfw/tools/ide/environment/IdeSystemImpl.java
1
package com.devonfw.tools.ide.environment;
2

3
import java.util.Map;
4
import java.util.Objects;
5
import java.util.Properties;
6

7
import org.slf4j.Logger;
8
import org.slf4j.LoggerFactory;
9

10
/**
11
 * Implementation of {@link IdeSystem}.
12
 */
13
public class IdeSystemImpl implements IdeSystem {
14

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

17
  final Properties systemProperties;
18

19
  final Map<String, String> environmentVariables;
20

21
  /**
22
   * The constructor.
23
   */
24
  public IdeSystemImpl() {
25

26
    this(System.getProperties(), System.getenv());
×
27
  }
×
28

29
  /**
30
   * The constructor.
31
   *
32
   * @param systemProperties the {@link System#getProperties() system properties}.
33
   * @param environmentVariables the {@link System#getenv() environment variables}.
34
   */
35
  protected IdeSystemImpl(Properties systemProperties, Map<String, String> environmentVariables) {
36

37
    super();
2✔
38
    this.systemProperties = systemProperties;
3✔
39
    this.environmentVariables = environmentVariables;
3✔
40
  }
1✔
41

42
  @Override
43
  public String getProperty(String key) {
44

45
    return this.systemProperties.getProperty(key);
5✔
46
  }
47

48
  @Override
49
  public String getProperty(String key, String fallback) {
50

51
    return this.systemProperties.getProperty(key, fallback);
×
52
  }
53

54
  @Override
55
  public void setProperty(String key, String value) {
56

57
    String old = getProperty(key);
4✔
58
    if (Objects.equals(old, value)) {
4!
59
      LOG.trace("System property was already set to {}={}", key, value);
×
60
    } else {
61
      this.systemProperties.put(key, value);
6✔
62
      if (old == null) {
2!
63
        LOG.trace("System property was set to {}={}", key, value);
6✔
64
      } else {
65
        LOG.trace("System property was changed to {}={} from {}", key, value, old);
×
66
      }
67
    }
68
  }
1✔
69

70
  @Override
71
  public String getEnv(String key) {
72

73
    return this.environmentVariables.get(key);
6✔
74
  }
75

76
  @Override
77
  public Map<String, String> getEnv() {
78

79
    return this.environmentVariables;
3✔
80
  }
81
}
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