Merge branch 'main' into bugfix/UIMA-6345-RutaBasicUtils-should-not-require-RutaBasic-type
diff --git a/ruta-core/src/main/java/org/apache/uima/ruta/RutaBasicUtils.java b/ruta-core/src/main/java/org/apache/uima/ruta/RutaBasicUtils.java
index f371d49..473f75d 100644
--- a/ruta-core/src/main/java/org/apache/uima/ruta/RutaBasicUtils.java
+++ b/ruta-core/src/main/java/org/apache/uima/ruta/RutaBasicUtils.java
@@ -62,6 +62,11 @@
CAS cas = annotation.getCAS();
TypeSystem typeSystem = cas.getTypeSystem();
Type basicType = typeSystem.getType(RutaBasic.class.getName());
+
+ if (basicType == null) {
+ return false;
+ }
+
Type type = annotation.getType();
if (typeSystem.subsumes(basicType, type)) {
@@ -107,6 +112,11 @@
CAS cas = annotation.getCAS();
TypeSystem typeSystem = cas.getTypeSystem();
Type basicType = typeSystem.getType(RutaBasic.class.getName());
+
+ if (basicType == null) {
+ return false;
+ }
+
Type type = annotation.getType();
if (typeSystem.subsumes(basicType, type)) {