Skip to content

Commit

Permalink
fix(generator): make javaFile path platform-agnostic
Browse files Browse the repository at this point in the history
Close #99
  • Loading branch information
jdewaen committed Oct 20, 2023
1 parent 757a607 commit 1b4e1f8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/codegen/IconsetEnumCompiler.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import java.io.IOException;
import java.io.PrintStream;
import java.nio.charset.StandardCharsets;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
Expand Down Expand Up @@ -117,7 +118,8 @@ private static Map<String,String[]> rewrite() throws IOException {
cfg.setStoreTokens(false);
JavaParser parser = new JavaParser(cfg);

File javaFile = new File(sources, "com\\flowingcode\\vaadin\\addons\\fontawesome\\FontAwesome.java");
Path filePath = Path.of("com","flowingcode","vaadin","addons","fontawesome","FontAwesome.java");
File javaFile = new File(sources, filePath.toString());
CompilationUnit cu = parser.parse(javaFile).getResult().get();

TypeDeclaration typeDecl = cu.getPrimaryType().get();
Expand Down

0 comments on commit 1b4e1f8

Please sign in to comment.