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

wurstscript / WurstScript / 248

03 Mar 2024 01:36PM UTC coverage: 62.309% (-0.05%) from 62.363%
248

push

circleci

Frotty
allow unsafe injection of lua files

17282 of 27736 relevant lines covered (62.31%)

0.62 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
de.peeeq.wurstscript/src/main/java/de/peeeq/wurstio/languageserver/requests/MapRequest.java
1
package de.peeeq.wurstio.languageserver.requests;
2

3
import com.google.common.base.Charsets;
4
import com.google.common.io.Files;
5
import config.WurstProjectConfigData;
6
import de.peeeq.wurstio.Pjass;
7
import de.peeeq.wurstio.TimeTaker;
8
import de.peeeq.wurstio.UtilsIO;
9
import de.peeeq.wurstio.WurstCompilerJassImpl;
10
import de.peeeq.wurstio.languageserver.ModelManager;
11
import de.peeeq.wurstio.languageserver.ProjectConfigBuilder;
12
import de.peeeq.wurstio.languageserver.WFile;
13
import de.peeeq.wurstio.languageserver.WurstLanguageServer;
14
import de.peeeq.wurstio.mpq.MpqEditor;
15
import de.peeeq.wurstio.mpq.MpqEditorFactory;
16
import de.peeeq.wurstio.utils.W3InstallationData;
17
import de.peeeq.wurstscript.RunArgs;
18
import de.peeeq.wurstscript.WLogger;
19
import de.peeeq.wurstscript.ast.CompilationUnit;
20
import de.peeeq.wurstscript.ast.WImport;
21
import de.peeeq.wurstscript.ast.WPackage;
22
import de.peeeq.wurstscript.ast.WurstModel;
23
import de.peeeq.wurstscript.attributes.CompileError;
24
import de.peeeq.wurstscript.gui.WurstGui;
25
import de.peeeq.wurstscript.jassAst.JassProg;
26
import de.peeeq.wurstscript.jassprinter.JassPrinter;
27
import de.peeeq.wurstscript.luaAst.LuaCompilationUnit;
28
import de.peeeq.wurstscript.parser.WPos;
29
import de.peeeq.wurstscript.utils.LineOffsets;
30
import de.peeeq.wurstscript.utils.Utils;
31
import net.moonlightflower.wc3libs.bin.Wc3BinOutputStream;
32
import net.moonlightflower.wc3libs.bin.app.W3I;
33
import net.moonlightflower.wc3libs.port.Orient;
34
import org.apache.commons.lang.StringUtils;
35
import org.eclipse.lsp4j.MessageParams;
36
import org.eclipse.lsp4j.MessageType;
37
import org.eclipse.lsp4j.services.LanguageClient;
38
import org.jetbrains.annotations.Nullable;
39

40
import java.io.ByteArrayOutputStream;
41
import java.io.File;
42
import java.io.FileNotFoundException;
43
import java.io.IOException;
44
import java.nio.channels.NonWritableChannelException;
45
import java.nio.charset.StandardCharsets;
46
import java.nio.file.Path;
47
import java.nio.file.Paths;
48
import java.nio.file.StandardOpenOption;
49
import java.time.Duration;
50
import java.util.*;
51
import java.util.concurrent.CompletableFuture;
52
import java.util.concurrent.atomic.AtomicReference;
53
import java.util.stream.Collectors;
54

55
public abstract class MapRequest extends UserRequest<Object> {
56
    protected final WurstLanguageServer langServer;
57
    protected final Optional<File> map;
58
    protected final List<String> compileArgs;
59
    protected final WFile workspaceRoot;
60
    protected final RunArgs runArgs;
61
    protected final Optional<String> wc3Path;
62
    protected final W3InstallationData w3data;
63
    protected final TimeTaker timeTaker;
64

65
    /**
66
     * makes the compilation slower, but more safe by discarding results from the editor and working on a copy of the model
67
     */
68
    protected SafetyLevel safeCompilation = SafetyLevel.KindOfSafe;
×
69

70
    public TimeTaker getTimeTaker() {
71
        return timeTaker;
×
72
    }
73

74

75
    enum SafetyLevel {
×
76
        QuickAndDirty, KindOfSafe
×
77
    }
78

79
    public static class CompilationResult {
×
80
        public File script;
81
        public File w3i;
82
    }
83

84
    public MapRequest(WurstLanguageServer langServer, Optional<File> map, List<String> compileArgs, WFile workspaceRoot,
85
                      Optional<String> wc3Path) {
×
86
        this.langServer = langServer;
×
87
        this.map = map;
×
88
        this.compileArgs = compileArgs;
×
89
        this.workspaceRoot = workspaceRoot;
×
90
        this.runArgs = new RunArgs(compileArgs);
×
91
        this.wc3Path = wc3Path;
×
92
        this.w3data = getBestW3InstallationData();
×
93
        if (runArgs.isMeasureTimes()) {
×
94
            this.timeTaker = new TimeTaker.Recording();
×
95
        } else {
96
            this.timeTaker = new TimeTaker.Default();
×
97
        }
98
    }
×
99

100
    @Override
101
    public void handleException(LanguageClient languageClient, Throwable err, CompletableFuture<Object> resFut) {
102
        if (err instanceof RequestFailedException) {
×
103
            RequestFailedException rfe = (RequestFailedException) err;
×
104
            languageClient.showMessage(new MessageParams(rfe.getMessageType(), rfe.getMessage()));
×
105
            resFut.complete(new Object());
×
106
        } else {
×
107
            super.handleException(languageClient, err, resFut);
×
108
        }
109
    }
×
110

111
    protected File compileMap(File projectFolder, WurstGui gui, Optional<File> mapCopy, RunArgs runArgs, WurstModel model,
112
                              WurstProjectConfigData projectConfigData, boolean isProd) {
113
        try (@Nullable MpqEditor mpqEditor = MpqEditorFactory.getEditor(mapCopy)) {
×
114
            if (mpqEditor != null && !mpqEditor.canWrite()) {
×
115
                WLogger.severe("The supplied map is invalid/corrupted/protected and Wurst cannot write to it.\n" +
×
116
                    "Please supply a valid .w3x input map that can be opened in the world editor.");
117
                throw new NonWritableChannelException();
×
118
            }
119
            WurstCompilerJassImpl compiler = new WurstCompilerJassImpl(timeTaker, projectFolder, gui, mpqEditor, runArgs);
×
120
            compiler.setMapFile(mapCopy);
×
121
            purgeUnimportedFiles(model);
×
122

123
            gui.sendProgress("Check program");
×
124
            compiler.checkProg(model);
×
125

126
            if (gui.getErrorCount() > 0) {
×
127
                throw new RequestFailedException(MessageType.Warning, "Could not compile project: ", gui.getErrorList().get(0));
×
128
            }
129

130
            print("translating program ... ");
×
131
            compiler.translateProgToIm(model);
×
132

133
            if (gui.getErrorCount() > 0) {
×
134
                throw new RequestFailedException(MessageType.Error, "Could not compile project (error in translation): " + gui.getErrorList().get(0));
×
135
            }
136

137
            timeTaker.measure("Runinng Compiletime Functions", () -> compiler.runCompiletime(projectConfigData, isProd, runArgs.isCompiletimeCache()));
×
138

139
            if (runArgs.isLua()) {
×
140
                print("Translating program to Lua ... ");
×
141
                Optional<LuaCompilationUnit> luaCode = Optional.ofNullable(compiler.transformProgToLua());
×
142

143
                if (!luaCode.isPresent()) {
×
144
                    print("Could not compile project\n");
×
145
                    throw new RuntimeException("Could not compile project (error in LUA translation)");
×
146
                }
147

148
                StringBuilder sb = new StringBuilder();
×
149
                luaCode.get().print(sb, 0);
×
150

151
                String compiledMapScript = sb.toString();
×
152
                File buildDir = getBuildDir();
×
153
                File outFile = new File(buildDir, "compiled.lua");
×
154
                Files.write(compiledMapScript.getBytes(Charsets.UTF_8), outFile);
×
155
                return outFile;
×
156

157
            } else {
158
                print("Translating program to jass ... ");
×
159
                compiler.transformProgToJass();
×
160

161
                Optional<JassProg> jassProg = Optional.ofNullable(compiler.getProg());
×
162
                if (!jassProg.isPresent()) {
×
163
                    print("Could not compile project\n");
×
164
                    throw new RuntimeException("Could not compile project (error in JASS translation)");
×
165
                }
166

167
                gui.sendProgress("Printing program");
×
168
                JassPrinter printer = new JassPrinter(!runArgs.isOptimize(), jassProg.get());
×
169
                String compiledMapScript = printer.printProg();
×
170
                File buildDir = getBuildDir();
×
171
                File outFile = new File(buildDir, "compiled.j.txt");
×
172
                Files.write(compiledMapScript.getBytes(Charsets.UTF_8), outFile);
×
173

174
                if (!runArgs.isDisablePjass()) {
×
175
                    gui.sendProgress("Running PJass");
×
176
                    Pjass.Result pJassResult = Pjass.runPjass(outFile,
×
177
                        new File(buildDir, "common.j").getAbsolutePath(),
×
178
                        new File(buildDir, "blizzard.j").getAbsolutePath());
×
179
                    WLogger.info(pJassResult.getMessage());
×
180
                    if (!pJassResult.isOk()) {
×
181
                        for (CompileError err : pJassResult.getErrors()) {
×
182
                            gui.sendError(err);
×
183
                        }
×
184
                        throw new RuntimeException("Could not compile project (PJass error)");
×
185
                    }
186
                }
187

188
                if (runArgs.isHotStartmap()) {
×
189
                    gui.sendProgress("Running JHCR");
×
190
                    return runJassHotCodeReload(outFile);
×
191
                }
192
                return outFile;
×
193
            }
194
        } catch (Exception e) {
×
195
            throw new RuntimeException(e);
×
196
        }
197
    }
198

199
    private File runJassHotCodeReload(File mapScript) throws IOException, InterruptedException {
200
        File buildDir = getBuildDir();
×
201
        File commonJ = new File(buildDir, "common.j");
×
202
        File blizzardJ = new File(buildDir, "blizzard.j");
×
203

204
        if (!commonJ.exists()) {
×
205
            throw new IOException("Could not find file " + commonJ.getAbsolutePath());
×
206
        }
207

208
        if (!blizzardJ.exists()) {
×
209
            throw new IOException("Could not find file " + blizzardJ.getAbsolutePath());
×
210
        }
211

212
        ProcessBuilder pb = new ProcessBuilder(langServer.getConfigProvider().getJhcrExe(), "init", commonJ.getName(), blizzardJ.getName(), mapScript.getName());
×
213
        pb.directory(buildDir);
×
214
        Utils.exec(pb, Duration.ofSeconds(30), System.err::println);
×
215
        return new File(buildDir, "jhcr_war3map.j");
×
216
    }
217

218
    /**
219
     * removes everything compilation unit which is neither
220
     * - inside a wurst folder
221
     * - a jass file
222
     * - imported by a file in a wurst folder
223
     */
224
    private void purgeUnimportedFiles(WurstModel model) {
225

226
        Set<CompilationUnit> imported = model.stream()
×
227
            .filter(cu -> isInWurstFolder(cu.getCuInfo().getFile()) || cu.getCuInfo().getFile().endsWith(".j")).collect(Collectors.toSet());
×
228
        addImports(imported, imported);
×
229

230
        model.removeIf(cu -> !imported.contains(cu));
×
231
    }
×
232

233
    private boolean isInWurstFolder(String file) {
234
        Path p = Paths.get(file);
×
235
        Path w;
236
        try {
237
            w = workspaceRoot.getPath();
×
238
        } catch (FileNotFoundException e) {
×
239
            return false;
×
240
        }
×
241
        return p.startsWith(w)
×
242
            && java.nio.file.Files.exists(p)
×
243
            && Utils.isWurstFile(file);
×
244
    }
245

246
    protected File getBuildDir() {
247
        File buildDir;
248
        try {
249
            buildDir = new File(workspaceRoot.getFile(), "_build");
×
250
        } catch (FileNotFoundException e) {
×
251
            throw new RuntimeException("Cannot get build dir", e);
×
252
        }
×
253
        if (!buildDir.exists()) {
×
254
            UtilsIO.mkdirs(buildDir);
×
255
        }
256
        return buildDir;
×
257
    }
258

259
    private void addImports(Set<CompilationUnit> result, Set<CompilationUnit> toAdd) {
260
        Set<CompilationUnit> imported =
×
261
            toAdd.stream()
×
262
                .flatMap((CompilationUnit cu) -> cu.getPackages().stream())
×
263
                .flatMap((WPackage p) -> p.getImports().stream())
×
264
                .map(WImport::attrImportedPackage)
×
265
                .filter(Objects::nonNull)
×
266
                .map(WPackage::attrCompilationUnit)
×
267
                .collect(Collectors.toSet());
×
268
        boolean changed = result.addAll(imported);
×
269
        if (changed) {
×
270
            // recursive call terminates, as there are only finitely many compilation units
271
            addImports(result, imported);
×
272
        }
273
    }
×
274

275
    protected void print(String s) {
276
        WLogger.info(s);
×
277
    }
×
278

279
    protected void println(String s) {
280
        WLogger.info(s);
×
281
    }
×
282

283

284
    protected File compileScript(WurstGui gui, ModelManager modelManager, List<String> compileArgs, Optional<File> mapCopy,
285
                                 WurstProjectConfigData projectConfigData, boolean isProd, File scriptFile) throws Exception {
286
        RunArgs runArgs = new RunArgs(compileArgs);
×
287

288
        gui.sendProgress("Compiling Script");
×
289
        print("Compile Script : ");
×
290
        for (File dep : modelManager.getDependencyWurstFiles()) {
×
291
            WLogger.info("dep: " + dep.getPath());
×
292
        }
×
293
        print("Dependencies done.");
×
294
        if (safeCompilation != RunMap.SafetyLevel.QuickAndDirty) {
×
295
            // it is safer to rebuild the project, instead of taking the current editor state
296
            gui.sendProgress("Cleaning project");
×
297
            modelManager.clean();
×
298
            gui.sendProgress("Building project");
×
299
            modelManager.buildProject();
×
300
        }
301

302
        replaceBaseScriptWithConfig(modelManager, scriptFile);
×
303

304
        if (modelManager.hasErrors()) {
×
305
            for (CompileError compileError : modelManager.getParseErrors()) {
×
306
                gui.sendError(compileError);
×
307
            }
×
308
            throw new RequestFailedException(MessageType.Warning, "Cannot run code with syntax errors.");
×
309
        }
310

311
        WurstModel model = modelManager.getModel();
×
312
        if (safeCompilation != RunMap.SafetyLevel.QuickAndDirty) {
×
313
            // compilation will alter the model (e.g. remove unused imports),
314
            // so it is safer to create a copy
315
            model = ModelManager.copy(model);
×
316
        }
317

318
        return compileMap(modelManager.getProjectPath(), gui, mapCopy, runArgs, model, projectConfigData, isProd);
×
319
    }
320

321
    private static void replaceBaseScriptWithConfig(ModelManager modelManager, File scriptFile) throws IOException {
322
        Optional<CompilationUnit> war3mapJ = modelManager.getModel()
×
323
            .stream()
×
324
            .filter((CompilationUnit cu) -> cu.getCuInfo().getFile().endsWith("war3map.j"))
×
325
            .findFirst();
×
326

327
        if (war3mapJ.isPresent()) {
×
328
            modelManager.syncCompilationUnitContent(WFile.create(war3mapJ.get().getCuInfo().getFile()),
×
329
                java.nio.file.Files.readString(scriptFile.toPath()));
×
330
        }
331
    }
×
332

333

334
    protected CompilationResult compileScript(ModelManager modelManager, WurstGui gui, Optional<File> testMap, WurstProjectConfigData projectConfigData, File buildDir, boolean isProd) throws Exception {
335
        if (testMap.isPresent() && testMap.get().exists()) {
×
336
            boolean deleteOk = testMap.get().delete();
×
337
            if (!deleteOk) {
×
338
                throw new RequestFailedException(MessageType.Error, "Could not delete old mapfile: " + testMap);
×
339
            }
340
        }
341
        if (map.isPresent() && testMap.isPresent()) {
×
342
            Files.copy(map.get(), testMap.get());
×
343
        }
344

345
        CompilationResult result;
346

347
        if (runArgs.isHotReload()) {
×
348
            // For hot reload use cached war3map if it exists
349
            result = new CompilationResult();
×
350
            result.script = new File(buildDir, "war3mapj_with_config.j.txt");
×
351
            if (!result.script.exists()) {
×
352
                result.script = new File(new File(workspaceRoot.getFile(), "wurst"), "war3map.j");
×
353
            }
354
            if (!result.script.exists()) {
×
355
                throw new RequestFailedException(MessageType.Error, "Could not find war3map.j file");
×
356
            }
357
        } else {
358
            timeTaker.beginPhase("load map script");
×
359
            File scriptFile = loadMapScript(testMap, modelManager, gui);
×
360
            timeTaker.endPhase();
×
361
            result = applyProjectConfig(gui, testMap, buildDir, projectConfigData, scriptFile);
×
362
        }
363

364

365
        // first compile the script:
366
        result.script = compileScript(gui, modelManager, compileArgs, testMap, projectConfigData, isProd, result.script);
×
367

368
        Optional<WurstModel> model = Optional.ofNullable(modelManager.getModel());
×
369
        if (!model.isPresent()
×
370
            || model
371
            .get()
×
372
            .stream()
×
373
            .noneMatch((CompilationUnit cu) -> cu.getCuInfo().getFile().endsWith("war3map.j"))) {
×
374
            println("No 'war3map.j' file could be found inside the map nor inside the wurst folder");
×
375
            println("If you compile the map with WurstPack once, this file should be in your wurst-folder. ");
×
376
            println("We will try to start the map now, but it will probably fail. ");
×
377
        }
378
        return result;
×
379
    }
380

381
    private static Long lastMapModified = 0L;
×
382

383
    private File loadMapScript(Optional<File> mapCopy, ModelManager modelManager, WurstGui gui) throws Exception {
384
        File scriptFile = new File(new File(workspaceRoot.getFile(), "wurst"), "war3map.j");
×
385
        // If runargs are no extract, either use existing or throw error
386
        // Otherwise try loading from map, if map was saved with wurst, try existing script, otherwise error
387
        if (!mapCopy.isPresent() || runArgs.isNoExtractMapScript()) {
×
388
            if (scriptFile.exists()) {
×
389
                modelManager.syncCompilationUnit(WFile.create(scriptFile));
×
390
                return scriptFile;
×
391
            } else {
392
                throw new CompileError(new WPos("", new LineOffsets(), 0, 0),
×
393
                    "RunArg noExtractMapScript is set but no mapscript is provided inside the wurst folder");
394
            }
395
        }
396
        long mapLastModified = mapCopy.get().lastModified();
×
397
        if (mapLastModified > lastMapModified) {
×
398
            lastMapModified = mapLastModified;
×
399
            WLogger.info("extracting mapscript");
×
400
            byte[] extractedScript = null;
×
401
            try (@Nullable MpqEditor mpqEditor = MpqEditorFactory.getEditor(mapCopy, true)) {
×
402
                if (mpqEditor.hasFile("war3map.j")) {
×
403
                    extractedScript = mpqEditor.extractFile("war3map.j");
×
404
                }
405
            }
406
            if (extractedScript == null) {
×
407
                if (scriptFile.exists()) {
×
408
                    String msg = "No war3map.j in map file, using old extracted file";
×
409
                    WLogger.info(msg);
×
410
                } else {
×
411
                    CompileError err = new CompileError(new WPos(mapCopy.toString(), new LineOffsets(), 0, 0),
×
412
                        "No war3map.j found in map file.");
413
                    gui.showInfoMessage(err.getMessage());
×
414
                    WLogger.severe(err);
×
415
                }
×
416
            } else if (new String(extractedScript, StandardCharsets.UTF_8).startsWith(JassPrinter.WURST_COMMENT_RAW)) {
×
417
                WLogger.info("map has already been compiled with wurst");
×
418
                // file generated by wurst, do not use
419
                if (scriptFile.exists()) {
×
420
                    String msg = "Cannot use war3map.j from map file, because it already was compiled with wurst. " + "Using war3map.j from Wurst directory instead.";
×
421
                    WLogger.info(msg);
×
422
                } else {
×
423
                    CompileError err = new CompileError(new WPos(mapCopy.toString(), new LineOffsets(), 0, 0),
×
424
                        "Cannot use war3map.j from map file, because it already was compiled with wurst. " + "Please add war3map.j to the wurst directory.");
425
                    gui.showInfoMessage(err.getMessage());
×
426
                    WLogger.severe(err);
×
427
                }
×
428
            } else {
429
                WLogger.info("new map, use extracted");
×
430
                // write mapfile from map to workspace
431
                Files.write(extractedScript, scriptFile);
×
432
            }
433
        } else {
×
434
            System.out.println("Map not modified, not extracting script");
×
435
        }
436

437

438
        return scriptFile;
×
439
    }
440

441
    private CompilationResult applyProjectConfig(WurstGui gui, Optional<File> testMap, File buildDir, WurstProjectConfigData projectConfig, File scriptFile) {
442
        AtomicReference<CompilationResult> result = new AtomicReference<>();
×
443
        gui.sendProgress("Applying Map Config...");
×
444
        timeTaker.measure("Applying Map Config", () -> {
×
445
            try {
446
                result.set(ProjectConfigBuilder.apply(projectConfig, testMap.get(), scriptFile, buildDir, runArgs, w3data));
×
447
            } catch (IOException e) {
×
448
                throw new RuntimeException(e);
×
449
            }
×
450
        });
×
451
        return result.get();
×
452
    }
453

454
    private W3InstallationData getBestW3InstallationData() throws RequestFailedException {
455
        if (Orient.isLinuxSystem()) {
×
456
            // no Warcraft installation supported on Linux
457
            return new W3InstallationData(Optional.empty(), Optional.empty());
×
458
        }
459
        if (wc3Path.isPresent() && StringUtils.isNotBlank(wc3Path.get())) {
×
460
            W3InstallationData w3data = new W3InstallationData(langServer, new File(wc3Path.get()),
×
461
                this instanceof RunMap && !runArgs.isHotReload());
×
462
            if (w3data.getWc3PatchVersion().isEmpty()) {
×
463
                throw new RequestFailedException(MessageType.Error, "Could not find Warcraft III installation at specified path: " + wc3Path);
×
464
            }
465

466
            return w3data;
×
467
        } else {
468
            return new W3InstallationData(langServer, this instanceof RunMap && !runArgs.isHotReload());
×
469
        }
470
    }
471

472
    protected void injectMapData(WurstGui gui, Optional<File> testMap, CompilationResult result) throws Exception {
473
        gui.sendProgress("Injecting map data");
×
474
        try (MpqEditor mpqEditor = MpqEditorFactory.getEditor(testMap)) {
×
475
            String mapScriptName;
476
            if (runArgs.isLua()) {
×
477
                mapScriptName = "war3map.lua";
×
478
                injectExternalLuaFiles(result.script);
×
479
            } else {
480
                mapScriptName = "war3map.j";
×
481
            }
482
            // delete both original mapscripts, just to be sure:
483
            mpqEditor.deleteFile("war3map.j");
×
484
            mpqEditor.deleteFile("war3map.lua");
×
485
            if (result.w3i != null) {
×
486
                mpqEditor.deleteFile(W3I.GAME_PATH.getName());
×
487
                mpqEditor.insertFile(W3I.GAME_PATH.getName(), result.w3i);
×
488
            }
489
            mpqEditor.insertFile(mapScriptName, result.script);
×
490
        }
491
    }
×
492

493
    private void injectExternalLuaFiles(File script) {
494
        File luaDir;
495
        try {
496
            luaDir = new File(workspaceRoot.getFile(), "lua");
×
497
        } catch (FileNotFoundException e) {
×
498
            throw new RuntimeException("Cannot get build dir", e);
×
499
        }
×
500
        if (luaDir.exists()) {
×
501
            File[] children = luaDir.listFiles();
×
502
            if (children != null) {
×
503
                Arrays.stream(children).forEach(child -> {
×
504
                    try {
505
                        byte[] bytes = java.nio.file.Files.readAllBytes(child.toPath());
×
506
                        if (child.getName().startsWith("pre_")) {
×
507
                            byte[] existingBytes = java.nio.file.Files.readAllBytes(script.toPath());
×
508
                            java.nio.file.Files.write(
×
509
                                script.toPath(),
×
510
                                bytes);
511
                            java.nio.file.Files.write(
×
512
                                script.toPath(),
×
513
                                existingBytes,
514
                                StandardOpenOption.APPEND);
515
                        } else {
×
516
                            java.nio.file.Files.write(
×
517
                                script.toPath(),
×
518
                                bytes,
519
                                StandardOpenOption.APPEND);
520
                        }
521
                    } catch (IOException e) {
×
522
                        throw new RuntimeException(e);
×
523
                    }
×
524
                });
×
525
            }
526
        }
527
    }
×
528

529

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

© 2025 Coveralls, Inc