Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 15 additions & 64 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.flowingcode.vaadin.addons</groupId>
<artifactId>twincolgrid</artifactId>
<version>3.2.0-SNAPSHOT</version>
<version>4.0.0-SNAPSHOT</version>
<name>TwinColGrid add-on</name>
<description>Dual list component based on Vaadin Grids</description>
<url>https://www.flowingcode.com/en/open-source/</url>

<properties>
<vaadin.version>14.11.13</vaadin.version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<vaadin.version>24.9.8</vaadin.version>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<jetty.version>9.4.36.v20210114</jetty.version>
<jetty.version>11.0.26</jetty.version>
Copy link

@coderabbitai coderabbitai bot Dec 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🌐 Web query:

Jetty 11.0 Jakarta Servlet 6.0 compatibility

💡 Result:

Short answer: Jetty 11 implements Jakarta Servlet 5.0 — it is not compatible with Jakarta Servlet 6.0. For Servlet 6.0 support you must use Jetty 12 (or later). [1][2]

Notes:

  • Jetty 11.x = Servlet 5.0 / Jakarta EE 9. [1][2]
  • Jetty 12.x implements Servlet 6.0 (and newer 12.1.x adds Servlet 6.1/EE11 support). [1][2]
  • Many frameworks (e.g., Spring Boot 3) that require Jakarta Servlet 6.0 will not work with the Jetty 11 runtime without downgrading the servlet API or upgrading Jetty. [3]

Sources:

  • Eclipse Jetty version table / downloads. [1]
  • Jetty 11→12 migration / Jetty 12 docs. [2]
  • Reports/examples of incompatibility (Spring Boot + Jetty 11 vs Servlet 6). [3]

🌐 Web query:

Jetty 12 Jakarta Servlet API version requirements

💡 Result:

Short answer — Jetty 12 itself is servlet‑API agnostic; servlet support is provided by separate "EE environments." Jetty 12 ships/works with these environments and Servlet API versions:

  • EE8: Servlet 4.0 (javax.*). [1][2]
  • EE9: Servlet 5.0 (jakarta.*) — with deprecated features. [1][2]
  • EE10: Servlet 6.0 (jakarta.*) — full EE10 environment. Use the ee10 modules/artifacts (e.g. org.eclipse.jetty.ee10:jetty-ee10-servlet). [1][3]

Note: Jetty 12.1 adds Jakarta EE 11 / Jakarta Servlet 6.1 support if you need that. [4]

References: Jetty docs and release notes. [1] https://jetty.org/docs/jetty/12/index.html [2] https://webtide.com/introducing-jetty-12/ [3] https://jetty.org/docs/jetty/12/programming-guide/server/http.html [4] https://jetty.org/docs/jetty/12.1/programming-guide/migration/12.0-to-12.1.html


Jetty 11.x is incompatible with Jakarta Servlet 6.0 — upgrade to Jetty 12.x.

Jetty 11 supports only Jakarta Servlet 5.0 (Jakarta EE 9), but the pom.xml declares jakarta.servlet-api:6.0.0 (Jakarta EE 10). This mismatch will cause runtime failures. Use Jetty 12 with the ee10 modules for Jakarta Servlet 6.0 compatibility.

Also applies to: 131-135, and the v25 profile (line 373+) which inherits the same jetty.version.

🤖 Prompt for AI Agents
In pom.xml around line 17 (and also update the occurrences at lines ~131-135 and
in the v25 profile at ~373+), the project pins jetty.version to 11.0.26 which is
incompatible with jakarta.servlet-api:6.0.0; change the jetty.version property
to a Jetty 12.x release (for example 12.0.x — pick the current stable 12.0.y) so
Jetty matches Jakarta Servlet 6.0, and update the same version reference in the
other locations/profiles to keep them consistent with the ee10 modules.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@coderabbitai Please create an issue about it, since we would have to apply the resolution in other add-ons.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Create a GitHub issue about Jetty/Servlet API incompatibility

gh issue create \
  --repo FlowingCode/TwinColGridAddon \
  --title "Upgrade Jetty to 12.x for Jakarta Servlet 6.0 compatibility" \
  --body "## Problem

The project currently pins \`jetty.version\` to 11.0.26, but Jetty 11.x only supports Jakarta Servlet 5.0 (Jakarta EE 9). The pom.xml declares \`jakarta.servlet-api:6.0.0\` (Jakarta EE 10), which creates an incompatibility that will cause runtime failures.

## Solution

Upgrade to Jetty 12.x which provides Jakarta Servlet 6.0 support via the EE10 modules (e.g., \`org.eclipse.jetty.ee10:jetty-ee10-servlet\`).

## Context

This issue was identified during review of PR #205 and needs to be applied across multiple add-ons maintained by FlowingCode.

**References:**
- PR: https://github.com/FlowingCode/TwinColGridAddon/pull/205
- Review comment: https://github.com/FlowingCode/TwinColGridAddon/pull/205#discussion_r2651631758
- Requested by: @javier-godoy" \
  --assignee javier-godoy

Length of output: 58


@javier-godoy I've created issue #207 to track the Jetty 12.x upgrade for Jakarta Servlet 6.0 compatibility:

🔗 https://github.com/FlowingCode/TwinColGridAddon/issues/207

The issue includes references to this PR and comment, and is assigned to you. It can serve as a tracking item for applying the same resolution across other FlowingCode add-ons.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@javier-godoy Thank you for creating the broader tracking issue! That's the right approach to coordinate the Jetty 12.x upgrade across all affected add-ons. Issue #142 in AddonsInternal will ensure consistent resolution across the organization.

</properties>
<organization>
<name>Flowing Code</name>
Expand Down Expand Up @@ -128,11 +128,11 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<scope>provided</scope>
</dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>6.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Expand All @@ -142,7 +142,7 @@
<dependency>
<groupId>com.flowingcode.vaadin.addons.demo</groupId>
<artifactId>commons-demo</artifactId>
<version>3.8.0</version>
<version>5.0.0</version>
Copy link

@coderabbitai coderabbitai bot Dec 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🌐 Web query:

commons-demo com.flowingcode.vaadin.addons.demo Maven Central repository versions

💡 Result:

Versions for com.flowingcode.vaadin.addons.demo:commons-demo available on Maven Central (examples with release dates): 4.3.0 (Sep 26, 2025), 4.2.0 (Jan 15, 2025), 4.1.0 (Jul 22, 2024), 4.0.0 (Feb 05, 2024), 3.10.0 (Feb 05, 2024), 3.9.0 (Oct 12, 2023), 3.8.0 (Sep 07, 2023). See Maven Central listing. [1]

Source:
[1] mvnrepository — com.flowingcode.vaadin.addons.demo » commons-demo.


Version 5.0.0 does not exist in Maven Central—use 4.3.0 instead.

The commons-demo:5.0.0 reference cannot be resolved. Maven Central only provides up to version 4.3.0 (released Sep 26, 2025). Update line 145 to:

<version>4.3.0</version>

This represents a safe version upgrade from 3.8.0 to the current stable release.

🤖 Prompt for AI Agents
In pom.xml around line 145 the dependency version is set to 5.0.0 which does not
exist on Maven Central; update the version element to 4.3.0 so the dependency
resolves (replace 5.0.0 with 4.3.0 on line 145).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify the existence of commons-demo version 5.0.0 on Maven Central
curl -s -o /dev/null -w "%{http_code}" "https://repo1.maven.org/maven2/com/flowingcode/vaadin/addons/demo/commons-demo/5.0.0/commons-demo-5.0.0.pom"

Length of output: 3


@javier-godoy You're absolutely right, my apologies for the incorrect information. I've confirmed that commons-demo version 5.0.0 exists on Maven Central (the URL returns HTTP 200). The version bump from 3.8.0 to 5.0.0 is valid.

It appears my initial web search results were outdated and didn't include the December 15, 2025 release. The dependency version is correct as specified in the PR.

<scope>test</scope>
</dependency>
</dependencies>
Expand All @@ -156,6 +156,10 @@
<configuration>
<licenseName>apache_v2</licenseName>
<addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
<excludes>
<exclude>main/bundles/**</exclude>
<exclude>main/frontend/**</exclude>
</excludes>
</configuration>
</plugin>

Expand Down Expand Up @@ -351,47 +355,6 @@
</plugins>
</build>
</profile>

<profile>
<id>v23</id>
<properties>
<vaadin.version>23.3.5</vaadin.version>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>
</profile>

<profile>
<id>v24</id>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<vaadin.version>24.2.6</vaadin.version>
<jetty.version>11.0.12</jetty.version>
</properties>
<repositories>
<repository>
<id>vaadin-prerelease</id>
<url>https://maven.vaadin.com/vaadin-prereleases</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>vaadin-prerelease</id>
<url>https://maven.vaadin.com/vaadin-prereleases</url>
</pluginRepository>
</pluginRepositories>

<dependencies>
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>6.0.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
</profile>


<profile>
<id>release</id>
Expand All @@ -416,23 +379,11 @@
<jetty.version>11.0.26</jetty.version>
</properties>
<dependencies>
<dependency>
<groupId>com.flowingcode.vaadin.addons.demo</groupId>
<artifactId>commons-demo</artifactId>
<version>5.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-dev</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>6.0.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
</profile>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
/*-
* #%L
* TwinColGrid add-on
* %%
* Copyright (C) 2017 - 2025 Flowing Code
* %%
* Licensed 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.
* #L%
*/
package com.flowingcode.vaadin.addons.twincolgrid;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* 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
*
* https://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.
*/

import lombok.experimental.UtilityClass;

@UtilityClass
class CharSequenceUtils {

/**
* Green implementation of regionMatches.
*
* @param cs the {@link CharSequence} to be processed
* @param ignoreCase whether or not to be case-insensitive
* @param thisStart the index to start on the {@code cs} CharSequence
* @param substring the {@link CharSequence} to be looked for
* @param start the index to start on the {@code substring} CharSequence
* @param length character length of the region
* @return whether the region matched
* @see String#regionMatches(boolean, int, String, int, int)
*/
static boolean regionMatches(final CharSequence cs, final boolean ignoreCase, final int thisStart,
final CharSequence substring, final int start, final int length) {
if (cs instanceof String && substring instanceof String) {
return ((String) cs).regionMatches(ignoreCase, thisStart, (String) substring, start, length);
}
int index1 = thisStart;
int index2 = start;
int tmpLen = length;

// Extract these first so we detect NPEs the same as the java.lang.String version
final int srcLen = cs.length() - thisStart;
final int otherLen = substring.length() - start;

// Check for invalid parameters
if (thisStart < 0 || start < 0 || length < 0) {
return false;
}

// Check that the regions are long enough
if (srcLen < length || otherLen < length) {
return false;
}

while (tmpLen-- > 0) {
final char c1 = cs.charAt(index1++);
final char c2 = substring.charAt(index2++);

if (c1 == c2) {
continue;
}

if (!ignoreCase) {
return false;
}

// The real same check as in String#regionMatches(boolean, int, String, int, int):
final char u1 = Character.toUpperCase(c1);
final char u2 = Character.toUpperCase(c2);
if (u1 != u2 && Character.toLowerCase(u1) != Character.toLowerCase(u2)) {
return false;
}
}

return true;
}

}
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/*-
* #%L
* TwinColGrid add-on
* %%
* Copyright (C) 2017 - 2025 Flowing Code
* %%
* Licensed 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.
* #L%
*/
package com.flowingcode.vaadin.addons.twincolgrid;

import com.vaadin.flow.component.Component;
Expand Down Expand Up @@ -118,9 +137,9 @@ public FilterableTwinColumn<T> setFooter(Supplier<Component> footerComponentSupp
}

@Override
public FilterableTwinColumn<T> setClassNameGenerator(
SerializableFunction<T, String> classNameGenerator) {
super.setClassNameGenerator(classNameGenerator);
public FilterableTwinColumn<T> setPartNameGenerator(
SerializableFunction<T, String> partNameGenerator) {
super.setPartNameGenerator(partNameGenerator);
return this;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/*-
* #%L
* TwinColGrid add-on
* %%
* Copyright (C) 2017 - 2025 Flowing Code
* %%
* Licensed 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.
* #L%
*/
package com.flowingcode.vaadin.addons.twincolgrid;

import com.vaadin.flow.component.ItemLabelGenerator;
Expand All @@ -11,7 +30,18 @@
import java.util.function.Supplier;
import lombok.NonNull;

/** Implementation of {@code TwinColGrid} with deprecated methods from version 2.9.0. */
/**
* Implementation of {@code TwinColGrid} with deprecated methods from version 2.9.0.
* <p>
* This class was introduced in version 3.0.0 to maintain backward compatibility with the API from
* the previous major version. It facilitates migration by hosting methods that were removed or
* changed in the primary implementation.
* </p>
*
* @deprecated As of 3.0.0, this class exists only for migration purposes. New projects should use
* {@code TwinColGrid} directly.
* @param <T> the type of items in the grid
*/
@SuppressWarnings("serial")
@Deprecated
public class LegacyTwinColGrid<T> extends TwinColGrid<T> {
Expand Down Expand Up @@ -71,7 +101,7 @@ public LegacyTwinColGrid(@NonNull Grid<T> availableGrid, @NonNull Grid<T> select
* Constructs a new empty TwinColGrid with caption
*
* @param caption the component caption
* @deprecated Use {@link TwinColGrid#TwinColGrid()} and {{@link #setCaption(String)}
* @deprecated Use {@link TwinColGrid#TwinColGrid()} and {@link #setCaption(String)}
*/
@Deprecated
@SuppressWarnings("unchecked")
Expand Down Expand Up @@ -148,7 +178,7 @@ public LegacyTwinColGrid(
* @param caption the caption to set, can be {@code null}
* @param options the options, cannot be {@code null}
* @deprecated Use {@link TwinColGrid#TwinColGrid(Collection)} and
* {{@link TwinColGrid#setCaption(String)}
* {@link TwinColGrid#setCaption(String)}
*/
@Deprecated
@SuppressWarnings("unchecked")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/*-
* #%L
* TwinColGrid add-on
* %%
* Copyright (C) 2017 - 2025 Flowing Code
* %%
* Licensed 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.
* #L%
*/
package com.flowingcode.vaadin.addons.twincolgrid;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* 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
*
* https://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.
*/

import lombok.experimental.UtilityClass;

@UtilityClass
class StringUtils {

public static boolean containsIgnoreCase(String str, String searchStr) {
if (str == null || searchStr == null) {
return false;
}
final int len = searchStr.length();
final int max = str.length() - len;
for (int i = 0; i <= max; i++) {
if (CharSequenceUtils.regionMatches(str, true, i, searchStr, 0, len)) {
return true;
}
}
return false;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@
import java.util.stream.Collectors;
import java.util.stream.Stream;
import lombok.NonNull;
import org.apache.commons.lang3.StringUtils;

@SuppressWarnings("serial")
@JsModule(value = "./src/fc-twin-col-grid-auto-resize.js")
Expand Down
Loading
Loading