Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-15852

NPE on the propertyValues REST API end point when a document cannot be viewed

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 10.9
    • Fix Version/s: 10.10-rc-1
    • Component/s: REST
    • Labels:
      None
    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      Found by the CI: https://ci.xwiki.org/job/xwiki-platform_Sonar/2283/org.xwiki.platform$xwiki-platform-rest-server/testReport/org.xwiki.rest.internal.resources.classes/PageClassPropertyValuesProviderTest/getValues/

      Stacktrace:

      java.lang.NullPointerException
      	at org.xwiki.rest.internal.resources.classes.PageClassPropertyValuesProvider.getLabel(PageClassPropertyValuesProvider.java:103)
      	at org.xwiki.rest.internal.resources.classes.PageClassPropertyValuesProvider.getLabel(PageClassPropertyValuesProvider.java:119)
      	at org.xwiki.rest.internal.resources.classes.AbstractDocumentListClassPropertyValuesProvider.getValueFromQueryResult(AbstractDocumentListClassPropertyValuesProvider.java:134)
      	at org.xwiki.rest.internal.resources.classes.AbstractDocumentListClassPropertyValuesProvider.getValueFromQueryResult(AbstractDocumentListClassPropertyValuesProvider.java:55)
      	at org.xwiki.rest.internal.resources.classes.AbstractClassPropertyValuesProvider.getValuesFromQueryResults(AbstractClassPropertyValuesProvider.java:144)
      	at org.xwiki.rest.internal.resources.classes.AbstractClassPropertyValuesProvider.getValues(AbstractClassPropertyValuesProvider.java:135)
      	at org.xwiki.rest.internal.resources.classes.PageClassPropertyValuesProviderTest.getValues(PageClassPropertyValuesProviderTest.java:93)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:515)
      	at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:115)
      	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$6(TestMethodTestDescriptor.java:171)
      	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:72)
      	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:167)
      	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:114)
      	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:59)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:105)
      	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:72)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:95)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:71)
      	at java.util.ArrayList.forEach(ArrayList.java:1249)
      	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:110)
      	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:72)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:95)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:71)
      	at java.util.ArrayList.forEach(ArrayList.java:1249)
      	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:110)
      	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:72)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:95)
      	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:71)
      	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32)
      	at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
      	at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51)
      	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:220)
      	at org.junit.platform.launcher.core.DefaultLauncher.lambda$execute$6(DefaultLauncher.java:188)
      	at org.junit.platform.launcher.core.DefaultLauncher.withInterceptedStreams(DefaultLauncher.java:202)
      	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:181)
      	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:128)
      	at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:142)
      	at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:117)
      	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:383)
      	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:344)
      	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:125)
      	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:417)

        Attachments

          Activity

            People

            • Assignee:
              atallahade Adel Atallah
              Reporter:
              atallahade Adel Atallah
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: