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

devonfw / IDEasy / 9907372175

12 Jul 2024 11:49AM UTC coverage: 61.142% (-0.02%) from 61.162%
9907372175

push

github

hohwille
fixed tests

1997 of 3595 branches covered (55.55%)

Branch coverage included in aggregate %.

5296 of 8333 relevant lines covered (63.55%)

2.8 hits per line

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

81.82
cli/src/main/java/com/devonfw/tools/ide/version/IdeVersion.java
1
package com.devonfw.tools.ide.version;
2

3
import java.util.jar.Attributes.Name;
4
import java.util.jar.Manifest;
5

6
/**
7
 * Class to {@link #get()} the current version of this IDE product.
8
 */
9
public final class IdeVersion {
10

11
  private static final IdeVersion INSTANCE = new IdeVersion();
5✔
12

13
  private final String version;
14

15
  // most simple solution would be maven filtering but that is kind of tricky for java files
16
  // http://www.mojohaus.org/templating-maven-plugin/examples/source-filtering.html
17
  // private static final String VERSION = "${project.version}";
18

19
  private IdeVersion() {
20

21
    super();
2✔
22
    String v = getClass().getPackage().getImplementationVersion();
5✔
23
    if (v == null) {
2!
24
      v = "SNAPSHOT";
2✔
25
    }
26
    this.version = v;
3✔
27
  }
1✔
28

29
  private String getValue(Manifest manifest, Name name) {
30

31
    return manifest.getMainAttributes().getValue(name);
×
32
  }
33

34
  /**
35
   * @return the current version of this IDE product.
36
   */
37
  public static String get() {
38

39
    // return VERSION;
40
    return INSTANCE.version;
3✔
41
  }
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