Skip to content

Commit 309a00c

Browse files
committed
Add more informative errors for null ElementCache
1 parent 7fe17f8 commit 309a00c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/org/labkey/test/components/Component.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727

2828
import java.util.ArrayList;
2929
import java.util.List;
30+
import java.util.Objects;
3031
import java.util.Optional;
3132
import java.util.function.Function;
3233

@@ -69,8 +70,9 @@ protected EC elementCache()
6970
// Pass if element doesn't exist. Might be checking if component is visible.
7071
}
7172

72-
_elementCache = newElementCache();
73+
_elementCache = Objects.requireNonNull(newElementCache());
7374
waitForReady();
75+
Objects.requireNonNull(_elementCache, "waitForReady() cleared the element cache");
7476
}
7577
return _elementCache;
7678
}

0 commit comments

Comments
 (0)