Copilot commented on code in PR #154:
URL: https://github.com/apache/roller/pull/154#discussion_r3772007349
##########
app/pom.xml:
##########
@@ -46,21 +45,20 @@ limitations under the License.
<commons-codec.version>1.18.0</commons-codec.version>
<commons-text.version>1.13.0</commons-text.version>
<commons-lang3.version>3.17.0</commons-lang3.version>
- <eclipse-link.version>4.0.5</eclipse-link.version>
+ <eclipse-link.version>5.0.1</eclipse-link.version>
<guice.version>7.0.0</guice.version>
<log4j2.version>2.24.3</log4j2.version>
<lucene.version>9.12.1</lucene.version> <!-- lucene 10 requires JDK 21
-->
- <oauth-core.version>20100527</oauth-core.version>
- <maven-war.version>3.4.0</maven-war.version>
+<maven-war.version>3.4.0</maven-war.version>
<maven-surefire.version>3.5.2</maven-surefire.version>
<maven-antrun.version>1.0b3</maven-antrun.version>
<rome.version>1.19.0</rome.version> <!-- locked in place since next
version removes popono -->
<slf4j.version>2.0.16</slf4j.version>
- <spring.version>5.3.39</spring.version>
- <spring.security.version>5.8.14</spring.security.version>
- <struts.version>2.5.29</struts.version> <!-- .30+ breaks selenium
tests -->
+ <spring.version>7.0.8</spring.version>
+ <spring.security.version>7.0.6</spring.security.version>
Review Comment:
Spring Framework 7.0.8 is built against Servlet 6.1/JSP 4.0 (its platform
also targets Jetty 12.1 and Tomcat 11), but this PR supplies Servlet 6.0 and
runs on Jetty 12.0/Tomcat 10.1. That is an unsupported EE 10 runtime and can
fail with linkage errors when Spring reaches a 6.1 API. Either keep the EE 10
container target and use the Spring 6.2 line, or move the servlet API,
descriptors, Jetty, and Tomcat to EE 11 together.
##########
docker-compose.yml:
##########
@@ -19,12 +19,10 @@
# Example Docker Compose setup for running Roller and PostgreSQL locally
-version: '3.7'
-
services:
postgresql:
- image: "postgres:10.0"
+ image: "postgres:16"
Review Comment:
Existing users of this compose file have a PostgreSQL 10 data directory
bind-mounted at `./docker/postgresql-data`. PostgreSQL 16 refuses to start on
that on-disk format, so updating the checkout makes the local stack fail until
data is migrated or deleted. Add an explicit pg_dump/restore upgrade path or
use a new data directory with a clear warning about preserving the old data.
##########
app/src/main/java/org/apache/roller/weblogger/webservices/atomprotocol/RollerAtomRequestImpl.java:
##########
@@ -0,0 +1,135 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. The ASF licenses this file to You
+ * under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * Derived from com.rometools.propono.atom.server.AtomRequestImpl.
+ * Forked to use jakarta.servlet instead of javax.servlet.
+ */
+package org.apache.roller.weblogger.webservices.atomprotocol;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.security.Principal;
+import java.util.Enumeration;
+import java.util.Map;
+
+import jakarta.servlet.http.HttpServletRequest;
+
+import com.rometools.propono.atom.server.AtomRequest;
+
+public class RollerAtomRequestImpl implements AtomRequest {
+
+ private final HttpServletRequest wrapped;
+
+ public RollerAtomRequestImpl(HttpServletRequest request) {
+ this.wrapped = request;
+ }
+
+ @Override
+ public String getPathInfo() {
+ return wrapped.getPathInfo();
+ }
Review Comment:
Preserve the original adapter's empty-string normalization. For a request to
the exact `/roller-services/app` mapping, `HttpServletRequest.getPathInfo()` is
null; `RollerAtomHandler.isAtomServiceURI()` immediately calls
`StringUtils.split(...).length`, causing a 500 instead of returning the Atom
service document.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]