Skip to content

Commit

Permalink
fix reflectionhelper bork
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed May 14, 2021
1 parent 4d4df81 commit 251b7ee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Expand Up @@ -559,7 +559,7 @@ public static void registerTags() {
// @attribute <TimeTag.start_of_year>
// @returns TimeTag
// @description
// Returns this time tag, with the month/day/hour/minute/second/millisecond zeroed (that is, midnight the morning of the first day of the same month).
// Returns this time tag, with the month/day/hour/minute/second/millisecond zeroed (that is, midnight the morning of the first day of the same year).
// -->
registerTag("start_of_year", (attribute, object) -> {
return new TimeTag(object.year(), 1, 1, 0, 0, 0, 0, object.instant.getOffset());
Expand Down
Expand Up @@ -146,9 +146,9 @@ public static MethodHandle getFinalSetter(Class<?> clazz, String field) {
private static void validateUnsafe() {
if (UNSAFE == null) {
try {
UNSAFE = getFields(Class.forName("sun.misc.Unsafe")).get("theUnsafe");
UNSAFE = getFields(Class.forName("sun.misc.Unsafe")).get("theUnsafe").get(null);
}
catch (Exception ex) {
catch (Throwable ex) {
Debug.echoError(ex);
}
UNSAFE_STATIC_FIELD_OFFSET = getMethodHandle(UNSAFE.getClass(), "staticFieldOffset", Field.class).bindTo(UNSAFE);
Expand Down

0 comments on commit 251b7ee

Please sign in to comment.