Skip to content
This repository was archived by the owner on Sep 3, 2020. It is now read-only.

Be more precise about matching scala versions #203

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ public void evaluate() throws Throwable {

public Statement apply(Statement stmt, FrameworkMethod meth, Object arg2) {
ScalaVersion onlyOn = meth.getAnnotation(ScalaVersion.class);
String versionString = Properties.versionString();
String versionNumberString = Properties.versionNumberString();

if (onlyOn != null) {
if (!onlyOn.doesNotMatch().isEmpty() && versionString.contains(onlyOn.doesNotMatch())) {
if (!onlyOn.doesNotMatch().isEmpty() && versionNumberString.startsWith(onlyOn.doesNotMatch())) {
return new EmptyStatement();
} else if (versionString.contains(onlyOn.matches())) {
} else if (versionNumberString.startsWith(onlyOn.matches())) {
return stmt;
} else {
return new EmptyStatement();
Expand Down