Skip to content

Commit

Permalink
fix: ClassNotFoundException
Browse files Browse the repository at this point in the history
  • Loading branch information
Metaphoriker committed Sep 6, 2024
1 parent 20071b4 commit bc5fb26
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public void onEnable() {
// Create a new Pathfinder instance with a custom configuration
Pathfinder reusablePathfinder =
PatheticMapper.newPathfinder(
PathfinderConfiguration.createAsyncConfiguration()
PathfinderConfiguration.createConfiguration()
.withAllowingFailFast(true) // Allow pathfinding to fail fast if necessary
.withAllowingFallback(true) // Allow fallback strategies if the primary fails
.withLoadingChunks(true) // Allow chunks to be loaded during pathfinding
Expand Down
3 changes: 3 additions & 0 deletions pathetic-model/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@
<include>org/jheaps/tree/FibonacciHeap$Node.class</include>
<include>org/jheaps/annotations/ConstantTime.class</include>
<include>org/jheaps/annotations/LogarithmicTime.class</include>
<include>org/jheaps/MergeableAddressableHeap.class</include>
<include>org/jheaps/AddressableHeap.class</include>
<include>org/jheaps/AddressableHeap$Handle.class</include>
</includes>
</filter>
</filters>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ private CompletionStage<PathfinderResult> initiatePathing(
() -> executePathingAndCleanupFilters(start, target, filters, filterStages),
PATHING_EXECUTOR)
.thenApply(this::finishPathing)
.exceptionally(throwable -> handleException(start, target))
.exceptionally(throwable -> handleException(start, target, throwable))
: initiateSyncPathing(start, target, filters, filterStages);
}

Expand Down Expand Up @@ -240,7 +240,9 @@ private PathfinderResult executePathingAndCleanupFilters(
return pathfinderResult;
}

private PathfinderResult handleException(PathPosition start, PathPosition target) {
private PathfinderResult handleException(
PathPosition start, PathPosition target, Throwable throwable) {
ErrorLogger.logFatalError("Failed to find path async", throwable);
return finishPathing(
new PathfinderResultImpl(
PathState.FAILED, new PathImpl(start, target, EMPTY_LINKED_HASHSET)));
Expand Down

0 comments on commit bc5fb26

Please sign in to comment.