Skip to content

Commit

Permalink
Add EE.getRelease() method
Browse files Browse the repository at this point in the history
  • Loading branch information
laeubi committed Aug 24, 2022
1 parent 74b8924 commit b578959
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions biz.aQute.bndlib/src/aQute/bnd/build/model/EE.java
Expand Up @@ -145,6 +145,17 @@ public Version getCapabilityVersion() {
return capabilityVersion;
}

/**
* @return the java release number for this EE
*/
public int getRelease() {
int major = getCapabilityVersion().getMajor();
if (major > 8) {
return major;
}
return 0;
}

public static Optional<EE> highestFromTargetVersion(String targetVersion) {
Version version = Optional.of(targetVersion)
.map(Analyzer::cleanupVersion)
Expand Down
@@ -1,4 +1,4 @@
@Version("4.1.0")
@Version("4.2.0")
package aQute.bnd.build.model;

import org.osgi.annotation.versioning.Version;

0 comments on commit b578959

Please sign in to comment.