protected boolean checkArrayModel ( String currentPath , Object model , EvaluationContextImpl ctx ) { if ( model == null ) { if ( ! isUpstreamDefinite ( ) ) { return false ; } else { throw new PathNotFoundException ( "The path " + currentPath + " is null" ) ; } } if ( ! ctx . jsonProvider ( ) . isArray ( model ) ) { if ( ! isUpstreamDefinite ( ) ) { return false ; } else { throw new PathNotFoundException ( format ( "Filter: %s can only be applied to arrays. Current context is: %s" , toString ( ) , model ) ) ; } } return true ; }
Check if model is non - null and array .