diff --git a/build.gradle b/build.gradle index ac50b90..cb730ec 100644 --- a/build.gradle +++ b/build.gradle @@ -2,6 +2,8 @@ plugins { id 'java-library' } +apply from: '../spotless.gradle' + group 'com.bdware.sc' version '1.0-SNAPSHOT' diff --git a/src/main/java/org/bdware/sdk/consistency/ConsistencyPluginManager.java b/src/main/java/org/bdware/sdk/consistency/ConsistencyPluginManager.java index 3e606f0..ada8e37 100644 --- a/src/main/java/org/bdware/sdk/consistency/ConsistencyPluginManager.java +++ b/src/main/java/org/bdware/sdk/consistency/ConsistencyPluginManager.java @@ -115,13 +115,17 @@ public class ConsistencyPluginManager { while (enumeration.hasMoreElements()) { JarEntry entry = enumeration.nextElement(); String entryName = entry.getName(); - if (entryName.endsWith(".class") && entryName.lastIndexOf(".") >= entryName.lastIndexOf("/")) { + if (entryName.endsWith(".class") + && entryName.lastIndexOf(".") >= entryName.lastIndexOf("/")) { try { - String className = entryName.replaceAll("/", ".").substring(0, entryName.length() - 6); + String className = entryName.replaceAll("/", ".").substring(0, + entryName.length() - 6); Class clazz = urlClassLoader.loadClass(className); // ContractExecutorFactory子类 && 非抽象类 - if (ContractExecutorFactory.class.isAssignableFrom(clazz) && !Modifier.isAbstract(clazz.getModifiers())) { - ContractExecutorFactory factory = (ContractExecutorFactory) (clazz.newInstance()); + if (ContractExecutorFactory.class.isAssignableFrom(clazz) + && !Modifier.isAbstract(clazz.getModifiers())) { + ContractExecutorFactory factory = + (ContractExecutorFactory) (clazz.newInstance()); factoriesMap.put(factory.getExecutorName(), factory); } } catch (Exception e) { @@ -140,7 +144,8 @@ public class ConsistencyPluginManager { } @Deprecated - public ContractExecutor createContractExecutor(ContractExecType type, Map args) { + public ContractExecutor createContractExecutor(ContractExecType type, + Map args) { String name = ""; switch (type) { case Sole: