You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "stefanseifert (via GitHub)" <gi...@apache.org> on 2023/02/20 13:50:09 UTC

[GitHub] [sling-org-apache-sling-testing-jcr-mock] stefanseifert commented on a diff in pull request #10: Add implementation for addMixin method

stefanseifert commented on code in PR #10:
URL: https://github.com/apache/sling-org-apache-sling-testing-jcr-mock/pull/10#discussion_r1111981040


##########
src/main/java/org/apache/sling/testing/mock/jcr/MockNodeType.java:
##########
@@ -54,6 +54,12 @@ public boolean hasOrderableChildNodes() {
         // support only well-known built-in node type
         return StringUtils.equals(getName(), JcrConstants.NT_UNSTRUCTURED);
     }
+    
+        @Override
+    public boolean isMixin() {
+        // if it has at least 1 supertype -> isMixin
+       return (getDeclaredSupertypes().length > 0);

Review Comment:
   this method is not covered by unit tests - and it will fail for sure, as it references getDeclaredSupertypes which throws an UnsupportedOperationException.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@sling.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org