File tree Expand file tree Collapse file tree
src/main/java/org/variantsync/vevos/simulation/io Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88 <groupId >org.variantsync.vevos</groupId >
99 <!-- Adjust the generateVariant name -->
1010 <artifactId >simulation</artifactId >
11- <version >1.1.1 </version >
11+ <version >1.1.2 </version >
1212
1313 <properties >
1414 <!-- Adjust your java version here -->
Original file line number Diff line number Diff line change 1919// TODO: Implement readLinesAs(Path p, Function<> f) with which one can load a file into a desired format
2020
2121public class TextIO {
22- public final static String LINEBREAK = "\r \n " ;
23- public final static String LINEBREAK_REGEX = "\\ r?\\ n" ;
22+ public final static String LINEBREAK = System .lineSeparator ();
2423
2524 public static String [] readLinesAsArray (final File file ) throws IOException {
2625 final LinkedList <String > lines = new LinkedList <>();
Original file line number Diff line number Diff line change 11package org .variantsync .vevos .simulation .io .kernelhaven ;
22
3- import de .ovgu .featureide .fm .core .base .FeatureUtils ;
4- import de .ovgu .featureide .fm .core .base .IFeature ;
53import de .ovgu .featureide .fm .core .base .IFeatureModel ;
6- import de .ovgu .featureide .fm .core .base .impl .DefaultFeatureModelFactory ;
74import net .ssehub .kernel_haven .variability_model .JsonVariabilityModelCache ;
85import org .variantsync .functjonal .Result ;
96import org .variantsync .vevos .simulation .io .ResourceLoader ;
@@ -25,7 +22,7 @@ public boolean canLoad(Path p) {
2522 @ Override
2623 public Result <IFeatureModel , ? extends Exception > load (Path p ) {
2724 return Result .Try (() -> {
28- if (p .endsWith (".json" )) {
25+ if (p .toString (). endsWith (".json" )) {
2926 JsonVariabilityModelCache cache = new JsonVariabilityModelCache (p .getParent ().toFile ());
3027 return FeatureModelUtils .FromVariabilityModel (cache .readFixed (p .toFile ()));
3128 } else {
You can’t perform that action at this time.
0 commit comments