check type of target resource
This commit is contained in:
parent
9b0324fb98
commit
5afc745424
|
@ -48,7 +48,7 @@ public interface IResourceValidator {
|
|||
IGNORE, CHECK_TYPE_IF_EXISTS, CHECK_EXISTS, CHECK_EXISTS_AND_TYPE, CHECK_VALID;
|
||||
|
||||
public boolean checkExists() {
|
||||
return this == CHECK_EXISTS_AND_TYPE || this == CHECK_EXISTS || this == CHECK_VALID;
|
||||
return this == CHECK_EXISTS_AND_TYPE || this == CHECK_EXISTS || this == CHECK_VALID || this == CHECK_TYPE_IF_EXISTS;
|
||||
}
|
||||
|
||||
public boolean checkType() {
|
||||
|
|
|
@ -1909,7 +1909,7 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
|
|||
we = fetcher.fetch(hostContext.appContext, ref);
|
||||
}
|
||||
}
|
||||
rule(errors, IssueType.STRUCTURE, element.line(), element.col(), path, we != null, "Unable to resolve resource '"+ref+"'");
|
||||
rule(errors, IssueType.STRUCTURE, element.line(), element.col(), path, we != null || pol == ReferenceValidationPolicy.CHECK_TYPE_IF_EXISTS, "Unable to resolve resource '"+ref+"'");
|
||||
}
|
||||
|
||||
String ft;
|
||||
|
|
Loading…
Reference in New Issue