Skip to content

Commit

Permalink
fix failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
nossr50 committed Nov 3, 2024
1 parent 39b0e87 commit 9f7dbc2
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
package com.gmail.nossr50.util.text;

import com.gmail.nossr50.datatypes.skills.SuperAbilityType;
import org.bukkit.Material;
import org.bukkit.entity.EntityType;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import com.gmail.nossr50.datatypes.party.PartyFeature;
import com.gmail.nossr50.datatypes.skills.SuperAbilityType;

import static org.junit.jupiter.api.Assertions.*;

class StringUtilsTest {
Expand Down Expand Up @@ -35,10 +33,6 @@ private void clearCaches() {
java.lang.reflect.Field materialCache = StringUtils.class.getDeclaredField("formattedMaterialStrings");
materialCache.setAccessible(true);
((java.util.Map<?, ?>) materialCache.get(null)).clear();

java.lang.reflect.Field partyFeatureCache = StringUtils.class.getDeclaredField("prettyPartyFeatureStringCache");
partyFeatureCache.setAccessible(true);
((java.util.Map<?, ?>) partyFeatureCache.get(null)).clear();
} catch (NoSuchFieldException | IllegalAccessException e) {
fail("Failed to clear caches: " + e.getMessage());
}
Expand Down

0 comments on commit 9f7dbc2

Please sign in to comment.