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

devonfw / IDEasy / 13160073324

05 Feb 2025 02:52PM UTC coverage: 68.252% (-0.1%) from 68.379%
13160073324

Pull #1002

github

web-flow
Merge 61eb7829f into 62fa12bac
Pull Request #1002: #786: Upgrade commandlet

2901 of 4667 branches covered (62.16%)

Branch coverage included in aggregate %.

7504 of 10578 relevant lines covered (70.94%)

3.09 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
  /** The fallback version used if the version is undefined (in local development). */
12
  public static final String VERSION_UNDEFINED = "SNAPSHOT";
13

14
  private static final IdeVersion INSTANCE = new IdeVersion();
5✔
15

16
  private final String version;
17

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

22
  private IdeVersion() {
23

24
    super();
2✔
25
    String v = getClass().getPackage().getImplementationVersion();
5✔
26
    if (v == null) {
2!
27
      v = VERSION_UNDEFINED;
2✔
28
    }
29
    this.version = v;
3✔
30
  }
1✔
31

32
  private String getValue(Manifest manifest, Name name) {
33

34
    return manifest.getMainAttributes().getValue(name);
×
35
  }
36

37
  /**
38
   * @return the current version of this IDE product.
39
   */
40
  public static String get() {
41

42
    // return VERSION;
43
    return INSTANCE.version;
3✔
44
  }
45

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