mirror of
https://gitee.com/BDWare/consistency-sdk
synced 2025-01-09 17:34:12 +00:00
build: config spotless plugin and reformat code
This commit is contained in:
parent
35ac40cd76
commit
c8accd5c22
@ -2,6 +2,8 @@ plugins {
|
||||
id 'java-library'
|
||||
}
|
||||
|
||||
apply from: '../spotless.gradle'
|
||||
|
||||
group 'com.bdware.sc'
|
||||
version '1.0-SNAPSHOT'
|
||||
|
||||
|
@ -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<String, Object> args) {
|
||||
public ContractExecutor createContractExecutor(ContractExecType type,
|
||||
Map<String, Object> args) {
|
||||
String name = "";
|
||||
switch (type) {
|
||||
case Sole:
|
||||
|
Loading…
Reference in New Issue
Block a user