Skip to content

Commit

Permalink
java: fix lint issues according to spotless
Browse files Browse the repository at this point in the history
  • Loading branch information
axic committed Mar 22, 2021
1 parent b1a1592 commit 8d7e3fb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package org.ethereum.evmc;

public class EvmcLoaderException extends Exception {
public EvmcLoaderException(String message) {
super(message);
}
public EvmcLoaderException(String message) {
super(message);
}
}
10 changes: 3 additions & 7 deletions bindings/java/java/src/main/java/org/ethereum/evmc/EvmcVm.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
// Licensed under the Apache License, Version 2.0.
package org.ethereum.evmc;

import org.ethereum.evmc.EvmcLoaderException;

import java.nio.ByteBuffer;
import java.util.Objects;

Expand All @@ -21,7 +19,7 @@ public final class EvmcVm implements AutoCloseable {
* This method loads the specified evm shared library and loads/initializes the jni bindings.
*
* @param filename /path/filename of the evm shared object
* @throws EvmcLoaderException
* @throws org.ethereum.evmc.EvmcLoaderException
*/
public static EvmcVm create(String filename) throws EvmcLoaderException {
if (!EvmcVm.isEvmcLibraryLoaded) {
Expand Down Expand Up @@ -49,7 +47,7 @@ private EvmcVm(String filename) throws EvmcLoaderException {
*
* @param Path to the dynamic object representing the EVM implementation.
* @return Internal object pointer.
* @throws EvmcLoaderException
* @throws org.ethereum.evmc.EvmcLoaderException
*/
private static native ByteBuffer load_and_create(String filename) throws EvmcLoaderException;

Expand Down Expand Up @@ -152,9 +150,7 @@ public int set_option(String name, String value) {
/** get size of result struct */
private static native int get_result_size();

/**
* This method cleans up resources.
*/
/** This method cleans up resources. */
@Override
public void close() {
destroy(nativeVm);
Expand Down
10 changes: 3 additions & 7 deletions bindings/java/java/src/main/java/org/ethereum/evmc/Host.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,19 @@
// Licensed under the Apache License, Version 2.0.
package org.ethereum.evmc;

import static java.util.Objects.requireNonNull;

import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
* The Host interface.
*
* <p>The set of all callback functions expected by VM instances.
*/
final class Host {
static private ByteBuffer ensureDirectBuffer(ByteBuffer input) {
private static ByteBuffer ensureDirectBuffer(ByteBuffer input) {
// Reallocate if needed.
if (!input.isDirect())
if (!input.isDirect()) {
return ByteBuffer.allocateDirect(input.remaining()).put(input);
}
return input;
}

Expand Down

0 comments on commit 8d7e3fb

Please sign in to comment.