Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WW-5533 Add compilation support for Jakarta EE 11 #1233

Merged
merged 1 commit into from
Feb 25, 2025
Merged
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
17 changes: 12 additions & 5 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,25 @@ env:

jobs:
build:
name: Build and Test
name: Build and Test (JDK ${{ matrix.java }})${{ matrix.profile == '-Pjakartaee11' && ' with Jakarta EE 11' || matrix.profile }}
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '17', '21' ]
include:
- java: '17'
profile: ''
- java: '21'
profile: ''
- java: '21'
profile: '-Pjakartaee11'
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: actions/setup-java@v4
- name: Setup Java ${{ matrix.java }}
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ matrix.java }}
cache: 'maven'
- name: Build with Maven on Java ${{ matrix.java }}
run: mvn -B -V -DskipAssembly verify --no-transfer-progress
- name: Maven Verify on Java ${{ matrix.java }}${{ matrix.profile == '-Pjakartaee11' && ' (Jakarta EE 11)' || matrix.profile }}
run: mvn -B -V -DskipAssembly verify ${{ matrix.profile }} --no-transfer-progress
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,6 @@ public void mismatchCharset() throws IOException {
assertThat(JakartaServletDiskFileUpload.isMultipartContent(mockRequest)).isTrue();

// when
mockRequest.setCharacterEncoding(null);
Copy link
Member Author

Choose a reason for hiding this comment

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

This is already null so can just delete it without affecting the test

multiPart.setDefaultEncoding(StandardCharsets.ISO_8859_1.name());
multiPart.parse(mockRequest, tempDir);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public Class<?> getCommonPropertyType(ELContext context, Object base) {
/**
* {@inheritDoc}
*/
@Override
// @Override // To allow compilation with Maven profile jakartaee11 where this interface method does not exist
public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) {
if (base != null) {
return Collections.emptyIterator();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public Class<?> getCommonPropertyType(ELContext context, Object base) {
}

/** {@inheritDoc} */
@Override
// @Override // To allow compilation with Maven profile jakartaee11 where this interface method does not exist
public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) {
List<FeatureDescriptor> list = new ArrayList<>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public Class<?> getCommonPropertyType(ELContext context, Object base) {
/**
* {@inheritDoc}
*/
@Override
// @Override // To allow compilation with Maven profile jakartaee11 where this interface method does not exist
public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context,
Object base) {
// only resolve at the root of the context
Expand Down
7 changes: 7 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,13 @@
<module>assembly</module>
</modules>
</profile>
<profile>
<id>jakartaee11</id>
<properties>
<jakarta-ee.version>11.0.0-M5</jakarta-ee.version>
<spring.version>7.0.0-M2</spring.version>
</properties>
</profile>
<profile>
<id>dependency-check</id>
<build>
Expand Down