mirror of
https://gitea.998043.xyz/novice/plugin-privacy.git
synced 2026-07-13 22:11:21 +08:00
hook LicensingFacade
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
package com.novitechie;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
|
||||
public class StackTraceRule {
|
||||
public static boolean check() {
|
||||
RuntimeException e = new RuntimeException();
|
||||
@@ -10,4 +13,16 @@ public class StackTraceRule {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static Date hook() {
|
||||
RuntimeException e = new RuntimeException();
|
||||
for (StackTraceElement stackTraceElement : e.getStackTrace()) {
|
||||
if (stackTraceElement.getFileName() == null) {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.add(Calendar.DAY_OF_MONTH, 180);
|
||||
return calendar.getTime();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user