Skip to content

Commit a3ff5aa

Browse files
andiclaude
authored andcommitted
Add TYPE target to @VisibleForTesting and annotate CallStack
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 4f8eb7c commit a3ff5aa

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

src/main/java/graphql/VisibleForTesting.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@
77
import static java.lang.annotation.ElementType.CONSTRUCTOR;
88
import static java.lang.annotation.ElementType.FIELD;
99
import static java.lang.annotation.ElementType.METHOD;
10+
import static java.lang.annotation.ElementType.TYPE;
1011

1112
/**
12-
* Marks fields, methods etc as more visible than actually needed for testing purposes.
13+
* Marks fields, methods, types etc as more visible than actually needed for testing purposes.
1314
*/
1415
@Retention(RetentionPolicy.RUNTIME)
15-
@Target(value = {CONSTRUCTOR, METHOD, FIELD})
16+
@Target(value = {CONSTRUCTOR, METHOD, FIELD, TYPE})
1617
@Internal
1718
public @interface VisibleForTesting {
1819
}

src/main/java/graphql/execution/instrumentation/dataloader/ExhaustedDataLoaderDispatchStrategy.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public class ExhaustedDataLoaderDispatchStrategy implements DataLoaderDispatchSt
3232
private final Map<AlternativeCallContext, CallStack> alternativeCallContextMap = new ConcurrentHashMap<>();
3333

3434

35-
// VisibleForTesting - package-private to allow test subclassing for CAS contention tests
35+
@VisibleForTesting
3636
static class CallStack {
3737

3838
// 30 bits for objectRunningCount

0 commit comments

Comments
 (0)