[GitHub] [sling-org-apache-sling-graphql-core] kwin commented on pull request #29: SLING-11458 - fixed a regresssion for the original Ticket SLING-9626
kwin commented on PR #29: URL: https://github.com/apache/sling-org-apache-sling-graphql-core/pull/29#issuecomment-1186096566 I would suggest using https://commons.apache.org/proper/commons-io/apidocs/org/apache/commons/io/output/CloseShieldWriter.html#wrap-java.io.Writer- instead. Then you can continue using try with resources because not calling close on JSONWriter is dangerous as it might perform other operations than just closing the underlying writer. -- 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-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [sling-org-apache-sling-caconfig-integration-tests] sonarcloud[bot] commented on pull request #1: SLING-11114 update SLING API to 2.21.0
sonarcloud[bot] commented on PR #1: URL: https://github.com/apache/sling-org-apache-sling-caconfig-integration-tests/pull/1#issuecomment-1186038730 Kudos, SonarCloud Quality Gate passed! [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](https://sonarcloud.io/dashboard?id=apache_sling-org-apache-sling-caconfig-integration-tests=1) [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-caconfig-integration-tests=1=false=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-caconfig-integration-tests=1=false=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-caconfig-integration-tests=1=false=BUG) [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-caconfig-integration-tests=1=false=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-caconfig-integration-tests=1=false=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-caconfig-integration-tests=1=false=VULNERABILITY) [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-caconfig-integration-tests=1=false=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-caconfig-integration-tests=1=false=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-caconfig-integration-tests=1=false=SECURITY_HOTSPOT) [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-caconfig-integration-tests=1=false=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-caconfig-integration-tests=1=false=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-caconfig-integration-tests=1=false=CODE_SMELL) [![No Coverage information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo-16px.png 'No Coverage information')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-caconfig-integration-tests=1) No Coverage information [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-caconfig-integration-tests=1=new_duplicated_lines_density=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-caconfig-integration-tests=1=new_duplicated_lines_density=list) -- 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-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [sling-org-apache-sling-discovery-oak] sonarcloud[bot] commented on pull request #5: SLING-11355: sling discovery bundles: update to sling 48
sonarcloud[bot] commented on PR #5: URL: https://github.com/apache/sling-org-apache-sling-discovery-oak/pull/5#issuecomment-1186002602 SonarCloud Quality Gate failed. [![Quality Gate failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonarcloud.io/dashboard?id=apache_sling-org-apache-sling-discovery-oak=5) [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-discovery-oak=5=false=BUG) [![B](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/B-16px.png 'B')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-discovery-oak=5=false=BUG) [1 Bug](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-discovery-oak=5=false=BUG) [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-discovery-oak=5=false=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-discovery-oak=5=false=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-discovery-oak=5=false=VULNERABILITY) [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-discovery-oak=5=false=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-discovery-oak=5=false=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-discovery-oak=5=false=SECURITY_HOTSPOT) [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-discovery-oak=5=false=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-discovery-oak=5=false=CODE_SMELL) [18 Code Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-discovery-oak=5=false=CODE_SMELL) [![39.5%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/25-16px.png '39.5%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-discovery-oak=5=new_coverage=list) [39.5% Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-discovery-oak=5=new_coverage=list) [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-discovery-oak=5=new_duplicated_lines_density=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-discovery-oak=5=new_duplicated_lines_density=list) -- 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-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [sling-org-apache-sling-graphql-core] sonarcloud[bot] commented on pull request #29: SLING-11458 - fixed a regresssion for the original Ticket SLING-9626
sonarcloud[bot] commented on PR #29: URL: https://github.com/apache/sling-org-apache-sling-graphql-core/pull/29#issuecomment-1185989302 SonarCloud Quality Gate failed. [![Quality Gate failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonarcloud.io/dashboard?id=apache_sling-org-apache-sling-graphql-core=29) [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core=29=false=BUG) [![E](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/E-16px.png 'E')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core=29=false=BUG) [2 Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core=29=false=BUG) [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core=29=false=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core=29=false=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core=29=false=VULNERABILITY) [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-graphql-core=29=false=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-graphql-core=29=false=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-graphql-core=29=false=SECURITY_HOTSPOT) [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core=29=false=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core=29=false=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core=29=false=CODE_SMELL) [![100.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/100-16px.png '100.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-graphql-core=29=new_coverage=list) [100.0% Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-graphql-core=29=new_coverage=list) [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-graphql-core=29=new_duplicated_lines_density=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-graphql-core=29=new_duplicated_lines_density=list) -- 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-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [sling-org-apache-sling-graphql-core] sonarcloud[bot] commented on pull request #29: SLING-11458 - fixed a regresssion for the original Ticket SLING-9626
sonarcloud[bot] commented on PR #29: URL: https://github.com/apache/sling-org-apache-sling-graphql-core/pull/29#issuecomment-1185969433 SonarCloud Quality Gate failed. [![Quality Gate failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonarcloud.io/dashboard?id=apache_sling-org-apache-sling-graphql-core=29) [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core=29=false=BUG) [![E](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/E-16px.png 'E')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core=29=false=BUG) [1 Bug](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core=29=false=BUG) [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core=29=false=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core=29=false=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core=29=false=VULNERABILITY) [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-graphql-core=29=false=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-graphql-core=29=false=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-graphql-core=29=false=SECURITY_HOTSPOT) [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core=29=false=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core=29=false=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-graphql-core=29=false=CODE_SMELL) [![100.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/100-16px.png '100.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-graphql-core=29=new_coverage=list) [100.0% Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-graphql-core=29=new_coverage=list) [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-graphql-core=29=new_duplicated_lines_density=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-graphql-core=29=new_duplicated_lines_density=list) -- 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-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Commented] (SLING-11458) Regress - "Writer has already been closed" exception in GraphQLServlet
[ https://issues.apache.org/jira/browse/SLING-11458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17567402#comment-17567402 ] Andreas Schaefer commented on SLING-11458: -- I encountered that issue in AEM when using the AEM GraphiQL UI: 15.07.2022 13:36:29.907 *ERROR* [127.0.0.1 [1657917208499] POST /content/cq:graphql/as-conf-1/endpoint.json HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl Writer has already been closed. org.apache.sling.engine.impl.SlingHttpServletResponseImpl$WriterAlreadyClosedException: null at org.apache.sling.engine.impl.SlingHttpServletResponseImpl$1.checkClosed(SlingHttpServletResponseImpl.java:191) [org.apache.sling.engine:2.9.0] at org.apache.sling.engine.impl.SlingHttpServletResponseImpl$1.flush(SlingHttpServletResponseImpl.java:228) [org.apache.sling.engine:2.9.0] at org.apache.sling.rewriter.impl.RewriterResponse.flushBuffer(RewriterResponse.java:126) [org.apache.sling.rewriter:1.3.2] at org.apache.sling.engine.impl.request.SlingRequestDispatcher.forward(SlingRequestDispatcher.java:151) [org.apache.sling.engine:2.9.0] at com.day.cq.wcm.core.impl.WCMComponentFilter$ForwardRequestDispatcher.forward(WCMComponentFilter.java:503) [com.day.cq.wcm.cq-wcm-core:5.14.46] at com.adobe.aem.graphql.sites.adapters.sling.SlingGraphQLForwardingServlet.forwardRequest(SlingGraphQLForwardingServlet.java:80) [com.adobe.aem.graphql.sling-adapter:0.1.42] at com.adobe.aem.graphql.sites.adapters.sling.SlingGraphQLForwardingServlet.doPost(SlingGraphQLForwardingServlet.java:67) [com.adobe.aem.graphql.sling-adapter:0.1.42] It does not affect the output but it is pretty noisy. > Regress - "Writer has already been closed" exception in GraphQLServlet > -- > > Key: SLING-11458 > URL: https://issues.apache.org/jira/browse/SLING-11458 > Project: Sling > Issue Type: Bug > Components: GraphQL >Affects Versions: GraphQL Core 0.0.4 >Reporter: Evgeny Tugarev >Assignee: Andreas Schaefer >Priority: Major > Fix For: GraphQL Core 0.0.6 > > > The GraphQLServlet shouldn't call {{response.getWriter().flush()}} as the > {{JsonWriter}} used by the {{JsonSerializer}} implements {{Closeable}} and as > such [closes the > Writer|https://github.com/jdereg/json-io/blob/cf849f15460decf10a8a320390de11965bb5996b/src/main/java/com/cedarsoftware/util/io/JsonWriter.java#L2413]. > This causes a "Writer has already been closed" Exception when {{flush()}} is > called. > This was fixed in commit d27f4bb7 but then this commit: 11c7e389 did undo the > fix as now the JsonWriter is closed when existing the try-catch block. > I will undo it and prevent the premature closure as this is causing issues > like when the call to this servlet is made through a dispatcher. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[GitHub] [sling-org-apache-sling-graphql-core] schaefa opened a new pull request, #29: SLING-11458 - fixed a regresssion for the original Ticket SLING-9626
schaefa opened a new pull request, #29: URL: https://github.com/apache/sling-org-apache-sling-graphql-core/pull/29 The Json Writer that wraps the response writer must not be flushed or closed as this can lead to issues down the chain -- 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-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Updated] (SLING-11458) Regress - "Writer has already been closed" exception in GraphQLServlet
[ https://issues.apache.org/jira/browse/SLING-11458?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andreas Schaefer updated SLING-11458: - Description: The GraphQLServlet shouldn't call {{response.getWriter().flush()}} as the {{JsonWriter}} used by the {{JsonSerializer}} implements {{Closeable}} and as such [closes the Writer|https://github.com/jdereg/json-io/blob/cf849f15460decf10a8a320390de11965bb5996b/src/main/java/com/cedarsoftware/util/io/JsonWriter.java#L2413]. This causes a "Writer has already been closed" Exception when {{flush()}} is called. This was fixed in commit d27f4bb7 but then this commit: 11c7e389 did undo the fix as now the JsonWriter is closed when existing the try-catch block. I will undo it and prevent the premature closure as this is causing issues like when the call to this servlet is made through a dispatcher. was: The GraphQLServlet shouldn't call {{response.getWriter().flush()}} as the {{JsonWriter}} used by the {{JsonSerializer}} implements {{Closeable}} and as such [closes the Writer|https://github.com/jdereg/json-io/blob/cf849f15460decf10a8a320390de11965bb5996b/src/main/java/com/cedarsoftware/util/io/JsonWriter.java#L2413]. This causes a "Writer has already been closed" Exception when {{flush()}} is called. > Regress - "Writer has already been closed" exception in GraphQLServlet > -- > > Key: SLING-11458 > URL: https://issues.apache.org/jira/browse/SLING-11458 > Project: Sling > Issue Type: Bug > Components: GraphQL >Affects Versions: GraphQL Core 0.0.4 >Reporter: Evgeny Tugarev >Assignee: Andreas Schaefer >Priority: Major > Fix For: GraphQL Core 0.0.6 > > > The GraphQLServlet shouldn't call {{response.getWriter().flush()}} as the > {{JsonWriter}} used by the {{JsonSerializer}} implements {{Closeable}} and as > such [closes the > Writer|https://github.com/jdereg/json-io/blob/cf849f15460decf10a8a320390de11965bb5996b/src/main/java/com/cedarsoftware/util/io/JsonWriter.java#L2413]. > This causes a "Writer has already been closed" Exception when {{flush()}} is > called. > This was fixed in commit d27f4bb7 but then this commit: 11c7e389 did undo the > fix as now the JsonWriter is closed when existing the try-catch block. > I will undo it and prevent the premature closure as this is causing issues > like when the call to this servlet is made through a dispatcher. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Assigned] (SLING-11458) Regress - "Writer has already been closed" exception in GraphQLServlet
[ https://issues.apache.org/jira/browse/SLING-11458?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andreas Schaefer reassigned SLING-11458: Assignee: Andreas Schaefer (was: Bertrand Delacretaz) > Regress - "Writer has already been closed" exception in GraphQLServlet > -- > > Key: SLING-11458 > URL: https://issues.apache.org/jira/browse/SLING-11458 > Project: Sling > Issue Type: Bug > Components: GraphQL >Affects Versions: GraphQL Core 0.0.4 >Reporter: Evgeny Tugarev >Assignee: Andreas Schaefer >Priority: Major > Fix For: GraphQL Core 0.0.6 > > > The GraphQLServlet shouldn't call {{response.getWriter().flush()}} as the > {{JsonWriter}} used by the {{JsonSerializer}} implements {{Closeable}} and as > such [closes the > Writer|https://github.com/jdereg/json-io/blob/cf849f15460decf10a8a320390de11965bb5996b/src/main/java/com/cedarsoftware/util/io/JsonWriter.java#L2413]. > This causes a "Writer has already been closed" Exception when {{flush()}} is > called. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Created] (SLING-11458) Regress - "Writer has already been closed" exception in GraphQLServlet
Andreas Schaefer created SLING-11458: Summary: Regress - "Writer has already been closed" exception in GraphQLServlet Key: SLING-11458 URL: https://issues.apache.org/jira/browse/SLING-11458 Project: Sling Issue Type: Bug Components: GraphQL Affects Versions: GraphQL Core 0.0.4 Reporter: Evgeny Tugarev Assignee: Bertrand Delacretaz Fix For: GraphQL Core 0.0.6 The GraphQLServlet shouldn't call {{response.getWriter().flush()}} as the {{JsonWriter}} used by the {{JsonSerializer}} implements {{Closeable}} and as such [closes the Writer|https://github.com/jdereg/json-io/blob/cf849f15460decf10a8a320390de11965bb5996b/src/main/java/com/cedarsoftware/util/io/JsonWriter.java#L2413]. This causes a "Writer has already been closed" Exception when {{flush()}} is called. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[GitHub] [sling-org-apache-sling-testing-resourceresolver-mock] sonarcloud[bot] commented on pull request #8: SLING-11455 ResourceProvider implementation
sonarcloud[bot] commented on PR #8: URL: https://github.com/apache/sling-org-apache-sling-testing-resourceresolver-mock/pull/8#issuecomment-1185742079 Kudos, SonarCloud Quality Gate passed! [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](https://sonarcloud.io/dashboard?id=apache_sling-org-apache-sling-testing-resourceresolver-mock=8) [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-resourceresolver-mock=8=false=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-resourceresolver-mock=8=false=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-resourceresolver-mock=8=false=BUG) [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-resourceresolver-mock=8=false=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-resourceresolver-mock=8=false=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-resourceresolver-mock=8=false=VULNERABILITY) [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-resourceresolver-mock=8=false=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-resourceresolver-mock=8=false=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-resourceresolver-mock=8=false=SECURITY_HOTSPOT) [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-resourceresolver-mock=8=false=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-resourceresolver-mock=8=false=CODE_SMELL) [2 Code Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-resourceresolver-mock=8=false=CODE_SMELL) [![83.5%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60-16px.png '83.5%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-resourceresolver-mock=8=new_coverage=list) [83.5% Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-resourceresolver-mock=8=new_coverage=list) [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-resourceresolver-mock=8=new_duplicated_lines_density=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-resourceresolver-mock=8=new_duplicated_lines_density=list) -- 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-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [sling-org-apache-sling-testing-resourceresolver-mock] stefanseifert commented on pull request #8: SLING-11455 ResourceProvider implementation
stefanseifert commented on PR #8: URL: https://github.com/apache/sling-org-apache-sling-testing-resourceresolver-mock/pull/8#issuecomment-1185716241 i've to pause the further work on this PR a bit. it basically looks quite good and seems to work as expected. what's left to do: * we need a new solution for providing mocked query results when using as ResourceProvider. this is related to [SLING-11252](https://issues.apache.org/jira/browse/SLING-11252) * add unit tests for more complex scenarios with multiple resource providers * the wrapping of MockResourceResolver inside MockResouceProvider required some tweaks and hacks. it would make sense to split the actual mocked resource persistence from MockResouceResolver into a separate class (e.g. MockResourcePersistence), and use that from MockResourceResolver and MockResouceProvider instead of the wrapping. but this can also be done later separately. -- 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-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Resolved] (SLING-11457) ResourceResolver Mock: Use compile scope for OSGi dependencies
[ https://issues.apache.org/jira/browse/SLING-11457?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Stefan Seifert resolved SLING-11457. Resolution: Fixed https://github.com/apache/sling-org-apache-sling-testing-resourceresolver-mock/commit/a34e78876de54d9a3420958fbe3060ce9ebbc552 > ResourceResolver Mock: Use compile scope for OSGi dependencies > -- > > Key: SLING-11457 > URL: https://issues.apache.org/jira/browse/SLING-11457 > Project: Sling > Issue Type: Improvement > Components: Testing >Reporter: Stefan Seifert >Assignee: Stefan Seifert >Priority: Minor > Fix For: Testing ResourceResolver Mock 1.4.0 > > > similar to the other sling-mock and related modules the dependencies to the > individual OSGi artifacts should be defined with "compile" scope - to ensure > that projects that are importing this in test scope for testing do not have > to declare them additionally. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Created] (SLING-11457) ResourceResolver Mock: Use compile scope for OSGi dependencies
Stefan Seifert created SLING-11457: -- Summary: ResourceResolver Mock: Use compile scope for OSGi dependencies Key: SLING-11457 URL: https://issues.apache.org/jira/browse/SLING-11457 Project: Sling Issue Type: Improvement Components: Testing Reporter: Stefan Seifert Assignee: Stefan Seifert Fix For: Testing ResourceResolver Mock 1.4.0 similar to the other sling-mock and related modules the dependencies to the individual OSGi artifacts should be defined with "compile" scope - to ensure that projects that are importing this in test scope for testing do not have to declare them additionally. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[GitHub] [sling-org-apache-sling-testing-resourceresolver-mock] sonarcloud[bot] commented on pull request #8: SLING-11455 ResourceProvider implementation
sonarcloud[bot] commented on PR #8: URL: https://github.com/apache/sling-org-apache-sling-testing-resourceresolver-mock/pull/8#issuecomment-1185706562 Kudos, SonarCloud Quality Gate passed! [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](https://sonarcloud.io/dashboard?id=apache_sling-org-apache-sling-testing-resourceresolver-mock=8) [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-resourceresolver-mock=8=false=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-resourceresolver-mock=8=false=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-resourceresolver-mock=8=false=BUG) [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-resourceresolver-mock=8=false=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-resourceresolver-mock=8=false=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-resourceresolver-mock=8=false=VULNERABILITY) [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-resourceresolver-mock=8=false=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-resourceresolver-mock=8=false=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-resourceresolver-mock=8=false=SECURITY_HOTSPOT) [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-resourceresolver-mock=8=false=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-resourceresolver-mock=8=false=CODE_SMELL) [2 Code Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-resourceresolver-mock=8=false=CODE_SMELL) [![83.5%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60-16px.png '83.5%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-resourceresolver-mock=8=new_coverage=list) [83.5% Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-resourceresolver-mock=8=new_coverage=list) [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-resourceresolver-mock=8=new_duplicated_lines_density=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-resourceresolver-mock=8=new_duplicated_lines_density=list) -- 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-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [sling-org-apache-sling-discovery-oak] mreutegg commented on pull request #7: SLING-11450 : avoid suppressing instances that were seen previously
mreutegg commented on PR #7: URL: https://github.com/apache/sling-org-apache-sling-discovery-oak/pull/7#issuecomment-1185597688 I can reproduce those test failures reported by Jenkins and did some debugging to find out why they fail. I may not have an in-depth understanding of the implementation, but one area that looks weird to me is how IdMapService reads the idMap. E.g. when I debug PartialStartupTest.testNoLocalSyncTokenYet(), then I can see that at some point IdMapService.readIdMap() reads 4 id to slingId mappings from /var/discovery/oak/idMap. However, the returned Map only contains 3 entries, because on the node in the repository there are two slingId properties that point to the same id. - 289b8024-1437-4f5a-984c-97d01f5a5456 -> 2 - 0384e415-bd6f-477b-b32d-4387b06330ee -> 1 - 3fce3eb8-3a7e-423a-b662-f1880cb75e49 -> 3 - 226d18c3-d979-42c6-ab1a-f1c641dd8c31 -> 3 Doesn't this cause problems later? It appears this can randomly hide some mapping. -- 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-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [sling-org-apache-sling-commons-metrics] sonarcloud[bot] commented on pull request #4: SLING-11456 export mbeans as metrics
sonarcloud[bot] commented on PR #4: URL: https://github.com/apache/sling-org-apache-sling-commons-metrics/pull/4#issuecomment-1185556229 Kudos, SonarCloud Quality Gate passed! [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](https://sonarcloud.io/dashboard?id=apache_sling-org-apache-sling-commons-metrics=4) [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-commons-metrics=4=false=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-commons-metrics=4=false=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-commons-metrics=4=false=BUG) [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-commons-metrics=4=false=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-commons-metrics=4=false=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-commons-metrics=4=false=VULNERABILITY) [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-commons-metrics=4=false=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-commons-metrics=4=false=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-commons-metrics=4=false=SECURITY_HOTSPOT) [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-commons-metrics=4=false=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-commons-metrics=4=false=CODE_SMELL) [7 Code Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-commons-metrics=4=false=CODE_SMELL) [![84.4%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60-16px.png '84.4%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-commons-metrics=4=new_coverage=list) [84.4% Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-commons-metrics=4=new_coverage=list) [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-commons-metrics=4=new_duplicated_lines_density=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-commons-metrics=4=new_duplicated_lines_density=list) -- 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-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Commented] (SLING-11456) Add ability to export MBean values as metrics
[ https://issues.apache.org/jira/browse/SLING-11456?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17567249#comment-17567249 ] Joerg Hoh commented on SLING-11456: --- https://github.com/apache/sling-org-apache-sling-commons-metrics/pull/4 > Add ability to export MBean values as metrics > - > > Key: SLING-11456 > URL: https://issues.apache.org/jira/browse/SLING-11456 > Project: Sling > Issue Type: Improvement > Components: Commons >Affects Versions: Commons Metrics 1.2.10 >Reporter: Joerg Hoh >Assignee: Joerg Hoh >Priority: Major > > Existing libraries often export mbeans, but not (Sling) Metrics. We should be > able to export these mbeans as metrics as well. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Created] (SLING-11456) Add ability to export MBean values as metrics
Joerg Hoh created SLING-11456: - Summary: Add ability to export MBean values as metrics Key: SLING-11456 URL: https://issues.apache.org/jira/browse/SLING-11456 Project: Sling Issue Type: Improvement Components: Commons Affects Versions: Commons Metrics 1.2.10 Reporter: Joerg Hoh Assignee: Joerg Hoh Existing libraries often export mbeans, but not (Sling) Metrics. We should be able to export these mbeans as metrics as well. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (SLING-11031) Registration of DisposalCallback is prone to lock contention
[ https://issues.apache.org/jira/browse/SLING-11031?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17567182#comment-17567182 ] Joerg Hoh commented on SLING-11031: --- (Also observed for Sling Models 1.5.2) > Registration of DisposalCallback is prone to lock contention > > > Key: SLING-11031 > URL: https://issues.apache.org/jira/browse/SLING-11031 > Project: Sling > Issue Type: Improvement > Components: Sling Models >Affects Versions: Models Implementation 1.5.0 >Reporter: Joerg Hoh >Priority: Major > > Under load the registration of the DisposalCallback for a Sling Model can > block: > {noformat} > "80.187.114.130 [1639483979813] GET /content/foobar.html HTTP/1.1" #304 > prio=5 os_prio=0 cpu=6511.55ms elapsed=150.62s tid=0x5617e1dc0800 > nid=0x1d75 waiting for monitor entry [0x7ff060073000] >java.lang.Thread.State: BLOCKED (on object monitor) > at > org.apache.sling.models.impl.ModelAdapterFactory$RequestDisposalCallbacks.put(ModelAdapterFactory.java:180) > - waiting to lock <0x000669b01360> (a > java.util.concurrent.ConcurrentHashMap) > at > org.apache.sling.models.impl.ModelAdapterFactory.registerRequestCallbackRegistry(ModelAdapterFactory.java:679) > at > org.apache.sling.models.impl.ModelAdapterFactory.createObject(ModelAdapterFactory.java:747) > at > org.apache.sling.models.impl.ModelAdapterFactory.internalCreateModel(ModelAdapterFactory.java:428) > at > org.apache.sling.models.impl.ModelAdapterFactory.getAdapter(ModelAdapterFactory.java:270) > at > org.apache.sling.adapter.internal.AdapterManagerImpl.getAdapter(AdapterManagerImpl.java:143) > at > org.apache.sling.engine.impl.SlingMainServlet.adaptTo(SlingMainServlet.java:625) > {noformat} > We should check if it's possible to make the synchronized block smaller -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (SLING-11252) RRMockResourceResolverWrapper supports no way of mocking searches
[ https://issues.apache.org/jira/browse/SLING-11252?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17567170#comment-17567170 ] Stefan Seifert commented on SLING-11252: we also need a better solution in context of SLING-11455 - as soon as we switch to MockResourceProvider in sling-mock, even the workaround shown in the description will no longer work. > RRMockResourceResolverWrapper supports no way of mocking searches > - > > Key: SLING-11252 > URL: https://issues.apache.org/jira/browse/SLING-11252 > Project: Sling > Issue Type: Bug > Components: Testing >Affects Versions: Testing Sling Mock 3.2.2 >Reporter: Henry Kuijpers >Assignee: Stefan Seifert >Priority: Major > Time Spent: 10m > Remaining Estimate: 0h > > Previously, it was possible to call > ((MockResourceResolver)context.resourceResolver()).addFindResourceHandler(...) > Currently, we have to add a "find resource handler" this way: > {code:java} > final Field wrappedField = > ResourceResolverWrapper.class.getDeclaredField("wrapped"); > wrappedField.setAccessible(true); > ((MockResourceResolver) > wrappedField.get(context.resourceResolver())).addFindResourceHandler((s, s1) > -> { > assertEquals("my-language", s); > assertEquals("search term", s1); > return contentResource.listChildren(); > }); > {code} > This wrapping seems to have been added in: > https://github.com/apache/sling-org-apache-sling-testing-sling-mock/commit/a6d01ff058d422ff544c2a137b42291bd550f603 > We could add logic that consults the ResourceProviders to see if they can > execute the custom search that we'd like to do, or, we could add the methods > also on RRMockResourceResolverWrapper. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[GitHub] [sling-org-apache-sling-testing-resourceresolver-mock] sonarcloud[bot] commented on pull request #8: SLING-11455 ResourceProvider implementation
sonarcloud[bot] commented on PR #8: URL: https://github.com/apache/sling-org-apache-sling-testing-resourceresolver-mock/pull/8#issuecomment-1185363307 SonarCloud Quality Gate failed. [![Quality Gate failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonarcloud.io/dashboard?id=apache_sling-org-apache-sling-testing-resourceresolver-mock=8) [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-resourceresolver-mock=8=false=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-resourceresolver-mock=8=false=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-resourceresolver-mock=8=false=BUG) [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-resourceresolver-mock=8=false=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-resourceresolver-mock=8=false=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-resourceresolver-mock=8=false=VULNERABILITY) [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-resourceresolver-mock=8=false=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-resourceresolver-mock=8=false=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-resourceresolver-mock=8=false=SECURITY_HOTSPOT) [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-resourceresolver-mock=8=false=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-resourceresolver-mock=8=false=CODE_SMELL) [1 Code Smell](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-resourceresolver-mock=8=false=CODE_SMELL) [![74.2%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60-16px.png '74.2%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-resourceresolver-mock=8=new_coverage=list) [74.2% Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-resourceresolver-mock=8=new_coverage=list) [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-resourceresolver-mock=8=new_duplicated_lines_density=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-resourceresolver-mock=8=new_duplicated_lines_density=list) -- 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-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [sling-org-apache-sling-testing-resourceresolver-mock] stefanseifert opened a new pull request, #8: SLING-11455 ResourceProvider implementation
stefanseifert opened a new pull request, #8: URL: https://github.com/apache/sling-org-apache-sling-testing-resourceresolver-mock/pull/8 https://issues.apache.org/jira/browse/SLING-11455 -- 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-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Created] (SLING-11455) ResourceResolver Mock: ResourceProvider implementation
Stefan Seifert created SLING-11455: -- Summary: ResourceResolver Mock: ResourceProvider implementation Key: SLING-11455 URL: https://issues.apache.org/jira/browse/SLING-11455 Project: Sling Issue Type: New Feature Components: Testing Reporter: Stefan Seifert Assignee: Stefan Seifert Fix For: Testing ResourceResolver Mock 1.4.0 ResourceResolver Mock currently supports only directly creating a mocked ResourceResolver instances, which is fine for most testing use cases. however, since introduction of SLING-5922 we allow mounting of additional test resources into the resource tree via FSResourceProvider, and are currently using a rough hand-build intergration of MockResourceResolver and this resource provider. this has some flaws and unwanted side-effects, SLING-10937 is one of it. we need a ResourceProvider implementation as alternative, backed by all the existing functionality. -- This message was sent by Atlassian Jira (v8.20.10#820010)