You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by GitBox <gi...@apache.org> on 2018/08/27 16:30:46 UTC

[GitHub] raducotescu closed pull request #2: SLING-7755 - JavaUseProvider might attempt to instantiate interfaces or abstract classes

raducotescu closed pull request #2: SLING-7755 - JavaUseProvider might attempt to instantiate interfaces or abstract classes
URL: https://github.com/apache/sling-org-apache-sling-scripting-sightly-testing/pull/2
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/src/test/java/org/apache/sling/scripting/sightly/it/SlingSpecificsSightlyIT.java b/src/test/java/org/apache/sling/scripting/sightly/it/SlingSpecificsSightlyIT.java
index bdbc878..e452199 100644
--- a/src/test/java/org/apache/sling/scripting/sightly/it/SlingSpecificsSightlyIT.java
+++ b/src/test/java/org/apache/sling/scripting/sightly/it/SlingSpecificsSightlyIT.java
@@ -44,6 +44,8 @@
     private static String launchpadURL;
     private static final String SLING_USE = "/sightly/use.html";
     private static final String SLING_JAVA_USE_NPE = "/sightly/use.javaerror.html";
+    private static final String SLING_JAVA_USE_INTERFACE = "/sightly/use.interface.html";
+    private static final String SLING_JAVA_USE_ABSTRACT = "/sightly/use.abstractClass.html";
     private static final String SLING_RESOURCE = "/sightly/resource.html";
     private static final String SLING_RESOURCE_ACTUAL = "/sightly/actualresource.html";
     private static final String SLING_TEMPLATE = "/sightly/template.html";
@@ -114,6 +116,20 @@ public void testErroneousUseObject() {
         String pageContent = client.getStringContent(url, 500);
         assertTrue(pageContent.contains("java.lang.NullPointerException"));
     }
+    
+    @Test
+    public void testInterfaceUset() {
+        String url = launchpadURL + SLING_JAVA_USE_INTERFACE;
+        String pageContent = client.getStringContent(url, 500);
+        assertTrue(pageContent.contains("No use provider could resolve identifier"));
+    }
+    
+    @Test
+    public void testAbstractClassUse() {
+        String url = launchpadURL + SLING_JAVA_USE_ABSTRACT;
+        String pageContent = client.getStringContent(url, 500);
+        assertTrue(pageContent.contains("No use provider could resolve identifier"));
+    }
 
     @Test
     public void testDataSlyResourceArraySelectors() {


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services