compatible with 2024.1
This commit is contained in:
parent
8f3f4fc44f
commit
2c4c8fafa4
|
@ -3,14 +3,16 @@ package com.novitechie.jetbra;
|
|||
import net.bytebuddy.asm.Advice;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public class VMOptionsAdvice {
|
||||
|
||||
@Advice.OnMethodExit
|
||||
public static void intercept(@Advice.Return(readOnly = false) Path r) throws Exception {
|
||||
RuntimeException e = new RuntimeException();
|
||||
Pattern pattern = Pattern.compile("\\A\\p{ASCII}*\\z");
|
||||
for (StackTraceElement stackTraceElement : e.getStackTrace()) {
|
||||
if (stackTraceElement.getFileName() == null){
|
||||
if (!pattern.matcher(stackTraceElement.getMethodName()).matches()){
|
||||
r = null;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue