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'
|
id 'java-library'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
apply from: '../spotless.gradle'
|
||||||
|
|
||||||
group 'com.bdware.sc'
|
group 'com.bdware.sc'
|
||||||
version '1.0-SNAPSHOT'
|
version '1.0-SNAPSHOT'
|
||||||
|
|
||||||
|
@ -115,13 +115,17 @@ public class ConsistencyPluginManager {
|
|||||||
while (enumeration.hasMoreElements()) {
|
while (enumeration.hasMoreElements()) {
|
||||||
JarEntry entry = enumeration.nextElement();
|
JarEntry entry = enumeration.nextElement();
|
||||||
String entryName = entry.getName();
|
String entryName = entry.getName();
|
||||||
if (entryName.endsWith(".class") && entryName.lastIndexOf(".") >= entryName.lastIndexOf("/")) {
|
if (entryName.endsWith(".class")
|
||||||
|
&& entryName.lastIndexOf(".") >= entryName.lastIndexOf("/")) {
|
||||||
try {
|
try {
|
||||||
String className = entryName.replaceAll("/", ".").substring(0, entryName.length() - 6);
|
String className = entryName.replaceAll("/", ".").substring(0,
|
||||||
|
entryName.length() - 6);
|
||||||
Class<?> clazz = urlClassLoader.loadClass(className);
|
Class<?> clazz = urlClassLoader.loadClass(className);
|
||||||
// ContractExecutorFactory子类 && 非抽象类
|
// ContractExecutorFactory子类 && 非抽象类
|
||||||
if (ContractExecutorFactory.class.isAssignableFrom(clazz) && !Modifier.isAbstract(clazz.getModifiers())) {
|
if (ContractExecutorFactory.class.isAssignableFrom(clazz)
|
||||||
ContractExecutorFactory factory = (ContractExecutorFactory) (clazz.newInstance());
|
&& !Modifier.isAbstract(clazz.getModifiers())) {
|
||||||
|
ContractExecutorFactory factory =
|
||||||
|
(ContractExecutorFactory) (clazz.newInstance());
|
||||||
factoriesMap.put(factory.getExecutorName(), factory);
|
factoriesMap.put(factory.getExecutorName(), factory);
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@ -140,7 +144,8 @@ public class ConsistencyPluginManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public ContractExecutor createContractExecutor(ContractExecType type, Map<String, Object> args) {
|
public ContractExecutor createContractExecutor(ContractExecType type,
|
||||||
|
Map<String, Object> args) {
|
||||||
String name = "";
|
String name = "";
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case Sole:
|
case Sole:
|
||||||
|
Loading…
Reference in New Issue
Block a user