Skip to content

Commit 05bbfa0

Browse files
Lift minimum JDK version to 21 and remove SecurityManager
* Lift minimum JDK version to 21 * Remove occurrences of SecurityManager, as getSecurityManager returns null since JDK 18 * Enable verbose deprecation warnings * Replace getSubject and doAs calls, getSubject can no longer be activated via JRE command line as SecurityManager has been removed in JDK 25. A replacement is available since Java 21. doAs was deprecated and is replaced by callAll. * Remove SecurityManager form JavaSecurityTest
1 parent 99c81bc commit 05bbfa0

62 files changed

Lines changed: 120 additions & 313 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ jobs:
4242
steps:
4343
- name: Checkout
4444
uses: actions/checkout@v6
45-
- name: Set up JDK 17
45+
- name: Set up JDK 21
4646
uses: actions/setup-java@v5
4747
with:
48-
java-version: '17'
48+
java-version: '21'
4949
distribution: 'temurin'
5050
cache: 'maven'
5151
- name: Build
@@ -74,10 +74,10 @@ jobs:
7474
steps:
7575
- name: Checkout
7676
uses: actions/checkout@v6
77-
- name: Set up JDK 17
77+
- name: Set up JDK 21
7878
uses: actions/setup-java@v5
7979
with:
80-
java-version: '17'
80+
java-version: '21'
8181
distribution: 'temurin'
8282
cache: 'maven'
8383
- name: Restore Maven Local Repository

archetypes/assembly/src/main/resources/archetype-resources/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@
174174
<!-- minimal distribution -->
175175
<!--<feature>minimal</feature>-->
176176
</bootFeatures>
177-
<javase>17</javase>
177+
<javase>21</javase>
178178
</configuration>
179179
</plugin>
180180
</plugins>

archetypes/blueprint/src/main/resources/archetype-resources/pom.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,9 @@
6363
<artifactId>maven-compiler-plugin</artifactId>
6464
<version>3.15.0</version>
6565
<configuration>
66-
<source>1.8</source>
67-
<target>1.8</target>
66+
<release>21</release>
67+
<source>21</source>
68+
<target>21</target>
6869
<maxmem>256M</maxmem>
6970
</configuration>
7071
</plugin>

archetypes/bundle/pom.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,9 @@
5757
<groupId>org.apache.maven.plugins</groupId>
5858
<artifactId>maven-compiler-plugin</artifactId>
5959
<configuration>
60-
<source>1.8</source>
61-
<target>1.8</target>
60+
<release>21</release>
61+
<source>21</source>
62+
<target>21</target>
6263
<maxmem>256M</maxmem>
6364
</configuration>
6465
</plugin>

archetypes/bundle/src/main/resources/archetype-resources/pom.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,9 @@
8282
<artifactId>maven-compiler-plugin</artifactId>
8383
<version>3.15.0</version>
8484
<configuration>
85-
<source>1.8</source>
86-
<target>1.8</target>
85+
<release>21</release>
86+
<source>21</source>
87+
<target>21</target>
8788
<maxmem>256M</maxmem>
8889
</configuration>
8990
</plugin>

archetypes/command/src/main/resources/archetype-resources/pom.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,9 @@
6767
<inherited>true</inherited>
6868
<version>3.15.0</version>
6969
<configuration>
70-
<source>1.8</source>
71-
<target>1.8</target>
70+
<release>21</release>
71+
<source>21</source>
72+
<target>21</target>
7273
</configuration>
7374
</plugin>
7475
<plugin>

assemblies/apache-karaf-integration/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@
187187
</bootFeatures>
188188
<libraries>
189189
</libraries>
190-
<javase>17</javase>
190+
<javase>21</javase>
191191
<generateConsistencyReport>${project.build.directory}</generateConsistencyReport>
192192
<consistencyReportProjectName>Apache Karaf Integration</consistencyReportProjectName>
193193
</configuration>

assemblies/apache-karaf-minimal/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@
145145
!org.apache.karaf.command.acl.*,
146146
*
147147
</pidsToExtract>
148-
<javase>17</javase>
148+
<javase>21</javase>
149149
</configuration>
150150
</plugin>
151151
<plugin>

assemblies/apache-karaf/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@
178178
</bootFeatures>
179179
<libraries>
180180
</libraries>
181-
<javase>17</javase>
181+
<javase>21</javase>
182182
<generateConsistencyReport>${project.build.directory}</generateConsistencyReport>
183183
<consistencyReportProjectName>Apache Karaf (full)</consistencyReportProjectName>
184184
</configuration>

assemblies/features/base/src/main/filtered-resources/resources/bin/inc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -282,12 +282,6 @@ setupVendorSepcifics() {
282282
setupDefaults() {
283283
DEFAULT_JAVA_OPTS="-XX:+UnlockDiagnosticVMOptions "
284284

285-
if [ "${VERSION}" -gt "11" ]; then
286-
# TODO revisit EventAdminImpl to avoid use of Subject.getSubject(AccessController.getContext());
287-
# -Djava.security.manager=allow is a workaround for SecurityController deprecation in JDK23+
288-
DEFAULT_JAVA_OPTS="$DEFAULT_JAVA_OPTS -Djava.security.manager=allow "
289-
fi
290-
291285
setupVendorSepcifics
292286

293287
DEFAULT_JAVA_OPTS="${DEFAULT_JAVA_OPTS} ${JAVA_VENDOR_OPTS}"

0 commit comments

Comments
 (0)