Skip to content

Commit 1871a8b

Browse files
committed
Help certain callers of the TestUtils class
In certain components, it is very convenient to have utility methods for testing data structures involving temporary directories. For example, the updater tests want to create a temporary directory for the ImageJ.app/ directory, another one for the update site, and then bundle them into a FilesCollection data structure. Such methods are typically stored in classes with the suffix ...TestUtils, so let's special-case those classes and ignore them when trying to figure out the call site. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent e6ca650 commit 1871a8b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/main/java/org/scijava/test/TestUtils.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ public static Map.Entry<Class<?>, String> getCallingCodeLocation(final Class<?>
165165
final String thatClassName = element.getClassName();
166166
if (thatClassName == null || thatClassName.equals(thisClassName) ||
167167
thatClassName.equals(thisClassName2) ||
168+
thatClassName.endsWith("TestUtils") ||
168169
thatClassName.startsWith("java.lang.")) {
169170
continue;
170171
}

0 commit comments

Comments
 (0)