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 net.bytebuddy.asm.Advice;
|
||||||
|
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
public class VMOptionsAdvice {
|
public class VMOptionsAdvice {
|
||||||
|
|
||||||
@Advice.OnMethodExit
|
@Advice.OnMethodExit
|
||||||
public static void intercept(@Advice.Return(readOnly = false) Path r) throws Exception {
|
public static void intercept(@Advice.Return(readOnly = false) Path r) throws Exception {
|
||||||
RuntimeException e = new RuntimeException();
|
RuntimeException e = new RuntimeException();
|
||||||
|
Pattern pattern = Pattern.compile("\\A\\p{ASCII}*\\z");
|
||||||
for (StackTraceElement stackTraceElement : e.getStackTrace()) {
|
for (StackTraceElement stackTraceElement : e.getStackTrace()) {
|
||||||
if (stackTraceElement.getFileName() == null){
|
if (!pattern.matcher(stackTraceElement.getMethodName()).matches()){
|
||||||
r = null;
|
r = null;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue