fix all OperatorWrap style error. The OperatorWrap style mandates that operator symbols should begin each new line, hence the need for adjusting the formatting.

pull/1224/head
DDDreame 2 years ago
parent d61260419d
commit 3e2aecf1aa

@ -151,8 +151,8 @@ public class KafkaThreadPoolAdapter implements ThreadPoolAdapter, ApplicationLis
ContainerProperties containerProperties = concurrentContainer.getContainerProperties(); ContainerProperties containerProperties = concurrentContainer.getContainerProperties();
TopicPartitionOffset[] topicPartitions = containerProperties.getTopicPartitions(); TopicPartitionOffset[] topicPartitions = containerProperties.getTopicPartitions();
if (topicPartitions != null && concurrency > topicPartitions.length) { if (topicPartitions != null && concurrency > topicPartitions.length) {
log.warn("[{}] Kafka consuming thread pool not support modify. " + log.warn("[{}] Kafka consuming thread pool not support modify. "
"When specific partitions are provided, the concurrency must be less than or " + "When specific partitions are provided, the concurrency must be less than or "
+ "equal to the number of partitions;", threadPoolKey); + "equal to the number of partitions;", threadPoolKey);
return false; return false;
} }

@ -370,6 +370,7 @@ public class Config {
} }
public static class Apollo { public static class Apollo {
public static class App { public static class App {
public static String ID; public static String ID;

@ -44,9 +44,9 @@ public abstract class AgentConfigChangeWatcher {
@Override @Override
public String toString() { public String toString() {
return "AgentConfigChangeWatcher{" + return "AgentConfigChangeWatcher{"
"propertyKey='" + propertyKey + '\'' + + "propertyKey='" + propertyKey + '\''
'}'; + '}';
} }
@Getter @Getter

@ -33,8 +33,8 @@ public class ReflectUtil {
Field[] fields = clazz.getFields(); Field[] fields = clazz.getFields();
List<Field> result = new ArrayList<>(); List<Field> result = new ArrayList<>();
for (Field field : fields) { for (Field field : fields) {
if (field.getType().isAssignableFrom(declaredType) && if (field.getType().isAssignableFrom(declaredType)
Modifier.isStatic(field.getModifiers())) { && Modifier.isStatic(field.getModifiers())) {
result.add(field); result.add(field);
} }
} }

@ -24,7 +24,6 @@ import java.util.List;
public class ApolloSpringBootProperties { public class ApolloSpringBootProperties {
public static class Spring { public static class Spring {
public static class Dynamic { public static class Dynamic {

@ -50,8 +50,8 @@ public class ExtensionRegisterBootstrap implements ApplicationContextAware, Appl
} }
private boolean filterClass(String beanName, Object bean) { private boolean filterClass(String beanName, Object bean) {
return bean.getClass().isAssignableFrom(IExtension.class) || return bean.getClass().isAssignableFrom(IExtension.class)
ScopedProxyUtils.isScopedTarget(beanName) || || ScopedProxyUtils.isScopedTarget(beanName)
!(bean instanceof IExtension); || !(bean instanceof IExtension);
} }
} }

@ -74,17 +74,17 @@ public class IdUtil {
long mostSigBits = uuid.getMostSignificantBits(); long mostSigBits = uuid.getMostSignificantBits();
long leastSigBits = uuid.getLeastSignificantBits(); long leastSigBits = uuid.getLeastSignificantBits();
if (isSimple) { if (isSimple) {
return (digits(mostSigBits >> 32, 8) + return (digits(mostSigBits >> 32, 8)
digits(mostSigBits >> 16, 4) + + digits(mostSigBits >> 16, 4)
digits(mostSigBits, 4) + + digits(mostSigBits, 4)
digits(leastSigBits >> 48, 4) + + digits(leastSigBits >> 48, 4)
digits(leastSigBits, 12)); + digits(leastSigBits, 12));
} else { } else {
return (digits(mostSigBits >> 32, 8) + "-" + return (digits(mostSigBits >> 32, 8) + "-"
digits(mostSigBits >> 16, 4) + "-" + + digits(mostSigBits >> 16, 4) + "-"
digits(mostSigBits, 4) + "-" + + digits(mostSigBits, 4) + "-"
digits(leastSigBits >> 48, 4) + "-" + + digits(leastSigBits >> 48, 4) + "-"
digits(leastSigBits, 12)); + digits(leastSigBits, 12));
} }
} }

@ -299,8 +299,8 @@ public class ReflectUtil {
public static Field findField(Object obj, String filedName, String fieldType) { public static Field findField(Object obj, String filedName, String fieldType) {
Field[] fields = ReflectUtil.getFields(obj.getClass()); Field[] fields = ReflectUtil.getFields(obj.getClass());
for (Field field : fields) { for (Field field : fields) {
if (field.getName().contains(filedName) && if (field.getName().contains(filedName)
(field.getType().getName().contains(fieldType))) { && (field.getType().getName().contains(fieldType))) {
return field; return field;
} }
} }

@ -161,14 +161,14 @@ public abstract class AbstractDynamicExecutorSupport extends ThreadPoolExecutor
try { try {
if (!executor.awaitTermination(this.awaitTerminationMillis, TimeUnit.MILLISECONDS)) { if (!executor.awaitTermination(this.awaitTerminationMillis, TimeUnit.MILLISECONDS)) {
if (log.isWarnEnabled()) { if (log.isWarnEnabled()) {
log.warn("Timed out while waiting for executor" + log.warn("Timed out while waiting for executor"
(this.threadPoolId != null ? " '" + this.threadPoolId + "'" : "") + " to terminate."); + (this.threadPoolId != null ? " '" + this.threadPoolId + "'" : "") + " to terminate.");
} }
} }
} catch (InterruptedException ex) { } catch (InterruptedException ex) {
if (log.isWarnEnabled()) { if (log.isWarnEnabled()) {
log.warn("Interrupted while waiting for executor" + log.warn("Interrupted while waiting for executor"
(this.threadPoolId != null ? " '" + this.threadPoolId + "'" : "") + " to terminate."); + (this.threadPoolId != null ? " '" + this.threadPoolId + "'" : "") + " to terminate.");
} }
Thread.currentThread().interrupt(); Thread.currentThread().interrupt();
} }

@ -58,12 +58,12 @@ public class DynamicThreadPoolBannerHandler implements InitializingBean {
* Print banner. * Print banner.
*/ */
private void printBanner() { private void printBanner() {
String banner = " __ __ ___ ___ __ \n" + String banner = " __ __ ___ ___ __ \n"
" | |--.|__|.-----..-----..-----.| | | |__|\n" + + " | |--.|__|.-----..-----..-----.| | | |__|\n"
" | || || _ || _ || _ || | | | |\n" + + " | || || _ || _ || _ || | | | |\n"
" |__|__||__|| __|| __||_____||____ | | |\n" + + " |__|__||__|| __|| __||_____||____ | | |\n"
" |__| |__| |: ||___|\n" + + " |__| |__| |: ||___|\n"
" `---' \n"; + " `---' \n";
if (Boolean.TRUE.equals(properties.getBanner())) { if (Boolean.TRUE.equals(properties.getBanner())) {
String bannerVersion = StringUtil.isNotEmpty(version) ? " (v" + version + ")" : "no version."; String bannerVersion = StringUtil.isNotEmpty(version) ? " (v" + version + ")" : "no version.";
StringBuilder padding = new StringBuilder(); StringBuilder padding = new StringBuilder();

@ -66,9 +66,9 @@ public interface HandlerManager<T> {
boolean b = cls.isAnnotationPresent(ChannelHandler.Sharable.class) boolean b = cls.isAnnotationPresent(ChannelHandler.Sharable.class)
|| HandlerManager.class.isAssignableFrom(cls); || HandlerManager.class.isAssignableFrom(cls);
if (!b) { if (!b) {
throw new IllegalException("Join the execution of the handler must add io.netty.channel.ChannelHandler." + throw new IllegalException("Join the execution of the handler must add io.netty.channel.ChannelHandler."
"Sharable annotations, Please for the handler class " + cls.getName() + " add io.netty.channel." + + "Sharable annotations, Please for the handler class " + cls.getName() + " add io.netty.channel."
"ChannelHandler.Sharable annotation"); + "ChannelHandler.Sharable annotation");
} }
return new HandlerEntity<>(order, handler, name); return new HandlerEntity<>(order, handler, name);
} }

@ -39,13 +39,13 @@ public interface HisRunDataMapper extends BaseMapper<HisRunDataInfo> {
* @param endTime * @param endTime
* @return * @return
*/ */
@Select("SELECT " + @Select("SELECT "
"tenant_id, item_id, tp_id, max(completed_task_count) as max_completed_task_count " + + "tenant_id, item_id, tp_id, max(completed_task_count) as max_completed_task_count "
"FROM his_run_data " + + "FROM his_run_data "
"where timestamp between #{startTime} and #{endTime} " + + "where timestamp between #{startTime} and #{endTime} "
"group by tenant_id, item_id, tp_id " + + "group by tenant_id, item_id, tp_id "
"order by max_completed_task_count desc " + + "order by max_completed_task_count desc "
"limit 8") + "limit 8")
List<ThreadPoolTaskRanking> queryThreadPoolTaskSumRanking(@Param("startTime") Long startTime, @Param("endTime") Long endTime); List<ThreadPoolTaskRanking> queryThreadPoolTaskSumRanking(@Param("startTime") Long startTime, @Param("endTime") Long endTime);
/** /**
@ -55,13 +55,13 @@ public interface HisRunDataMapper extends BaseMapper<HisRunDataInfo> {
* @param endTime * @param endTime
* @return * @return
*/ */
@Select("SELECT " + @Select("SELECT "
"tenant_id, item_id, tp_id, max(queue_size) as max_queue_size, max(reject_count) as max_reject_count, max(completed_task_count) as max_completed_task_count " + + "tenant_id, item_id, tp_id, max(queue_size) as max_queue_size, max(reject_count) as max_reject_count, max(completed_task_count) as max_completed_task_count "
"FROM his_run_data " + + "FROM his_run_data "
"where timestamp between #{startTime} and #{endTime} " + + "where timestamp between #{startTime} and #{endTime} "
"group by tenant_id, item_id, tp_id " + + "group by tenant_id, item_id, tp_id "
"order by max_completed_task_count desc " + + "order by max_completed_task_count desc "
"limit 4") + "limit 4")
List<ThreadPoolTaskRanking> queryThreadPoolMaxRanking(@Param("startTime") Long startTime, @Param("endTime") Long endTime); List<ThreadPoolTaskRanking> queryThreadPoolMaxRanking(@Param("startTime") Long startTime, @Param("endTime") Long endTime);
@Data @Data

Loading…
Cancel
Save