Skip to content

Commit 26d0063

Browse files
committed
style: change formatting
1 parent e97eac5 commit 26d0063

3 files changed

Lines changed: 9 additions & 7 deletions

File tree

core/src/main/java/org/extism/sdk/chicory/Kernel.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ public Kernel() {
6868
memoryBytes = kernel.export("memory_bytes");
6969
}
7070

71-
private static Instance instance(Function<Instance, Machine> machineFactory, MemoryLimits memoryLimits) {
71+
private static Instance instance(Function<Instance, Machine> machineFactory,
72+
MemoryLimits memoryLimits) {
7273
var kernelStream = Kernel.class.getClassLoader().getResourceAsStream("extism-runtime.wasm");
7374
WasmModule module = Parser.parse(kernelStream);
7475
if (machineFactory != null && machineFactory instanceof CachedAotMachineFactory) {

core/src/main/java/org/extism/sdk/chicory/Linker.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ Plugin link() {
5757
httpConfig = options.httpConfig;
5858

5959
// Register the HostEnv exports.
60-
var hostEnv = new HostEnv(new Kernel(machineFactory, options.memoryLimits), config, allowedHosts, enableHttpResponseHeaders, httpConfig, logger);
60+
var hostEnv =
61+
new HostEnv(new Kernel(machineFactory, options.memoryLimits), config, allowedHosts,
62+
enableHttpResponseHeaders, httpConfig, logger);
6163
dg.registerFunctions(hostEnv.toHostFunctions());
6264

6365
// Register the WASI host functions.

core/src/test/java/org/extism/sdk/chicory/e2e/PluginTest.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,8 @@ public void testGreetFailingMemory() {
7979

8080
public void testFailingMemoryHog()
8181
throws IOException, NoSuchFieldException, IllegalAccessException {
82-
byte[] bytes =
83-
PluginTest.class.getClassLoader().getResourceAsStream("memory-leaker/memory-leaker.wasm")
84-
.readAllBytes();
82+
byte[] bytes = PluginTest.class.getClassLoader()
83+
.getResourceAsStream("memory-leaker/memory-leaker.wasm").readAllBytes();
8584
var wasm = ManifestWasm.fromBytes(bytes).build();
8685
int memorySize = 1 << 8;
8786
var manifest = Manifest.ofWasms(wasm).withOptions(
@@ -94,8 +93,8 @@ public void testFailingMemoryHog()
9493
plugin.call("leak", new byte[0]);
9594
} catch (ExtismFunctionException ex) {
9695
assertTrue(ex.getMessage().contains("out of memory"));
97-
assertEquals(memorySize,plugin.memory().memory().initialPages());
98-
assertEquals(memorySize,plugin.memory().memory().maximumPages());
96+
assertEquals(memorySize, plugin.memory().memory().initialPages());
97+
assertEquals(memorySize, plugin.memory().memory().maximumPages());
9998
}
10099

101100
}

0 commit comments

Comments
 (0)