mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-10-21 11:07:37 +08:00
🎨 格式化部分代码
This commit is contained in:
@@ -20,11 +20,15 @@ import java.util.Set;
|
||||
import java.util.SortedSet;
|
||||
import java.util.TreeSet;
|
||||
|
||||
// 目前仅仅处理@Data,且必须在lombok自己的processor之前执行,千万注意!!!!!
|
||||
/**
|
||||
* 目前仅仅处理@Data,且必须在lombok自己的processor之前执行,千万注意!!!!!
|
||||
*
|
||||
* @author outersky
|
||||
*/
|
||||
|
||||
@SupportedAnnotationTypes("lombok.Data")
|
||||
@SupportedSourceVersion(SourceVersion.RELEASE_7)
|
||||
public class GraalProcessor extends AbstractProcessor {
|
||||
|
||||
private static final String REFLECTION_CONFIG_JSON = "reflection-config.json";
|
||||
private static final String NATIVE_IMAGE_PROPERTIES = "native-image.properties";
|
||||
|
||||
@@ -40,10 +44,14 @@ public class GraalProcessor extends AbstractProcessor {
|
||||
}
|
||||
|
||||
//只有最后一轮才可以写文件,否则文件会被重复打开,报错!
|
||||
if (!roundEnv.processingOver()) return false;
|
||||
if (!roundEnv.processingOver()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// 如果没有文件要写,跳过
|
||||
if (classSet.isEmpty()) return false;
|
||||
if (classSet.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
writeFiles();
|
||||
|
||||
@@ -72,7 +80,9 @@ public class GraalProcessor extends AbstractProcessor {
|
||||
*/
|
||||
private String getPackageName(String fullClassName) {
|
||||
int last = fullClassName.lastIndexOf('.');
|
||||
if (last == -1) return fullClassName;
|
||||
if (last == -1) {
|
||||
return fullClassName;
|
||||
}
|
||||
return fullClassName.substring(0, last);
|
||||
}
|
||||
|
||||
@@ -158,7 +168,9 @@ public class GraalProcessor extends AbstractProcessor {
|
||||
TypeElement s = (TypeElement) ((DeclaredType) superclass).asElement();
|
||||
String sName = s.toString();
|
||||
// ignore java.**/javax.**
|
||||
if (sName.startsWith("java.") || sName.startsWith("javax.")) return;
|
||||
if (sName.startsWith("java.") || sName.startsWith("javax.")) {
|
||||
return;
|
||||
}
|
||||
registerClass(sName);
|
||||
handleSuperClass(s);
|
||||
}
|
||||
|
@@ -291,12 +291,12 @@ public class WxMaServiceImpl implements WxMaService, RequestHttp<CloseableHttpCl
|
||||
Lock lock = this.getWxMaConfig().getAccessTokenLock();
|
||||
lock.lock();
|
||||
try {
|
||||
if(StringUtils.equals(this.getWxMaConfig().getAccessToken(), accessToken)){
|
||||
if (StringUtils.equals(this.getWxMaConfig().getAccessToken(), accessToken)) {
|
||||
this.getWxMaConfig().expireAccessToken();
|
||||
}
|
||||
} catch (Exception ex){
|
||||
} catch (Exception ex) {
|
||||
this.getWxMaConfig().expireAccessToken();
|
||||
}finally {
|
||||
} finally {
|
||||
lock.unlock();
|
||||
}
|
||||
if (this.getWxMaConfig().autoRefreshToken()) {
|
||||
|
Reference in New Issue
Block a user