Skip to content

Commit 49e0e9a

Browse files
Fix compile on Java 23
1 parent 8c362e0 commit 49e0e9a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.github/workflows/maven.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
strategy:
1818
fail-fast: false
1919
matrix:
20-
jdk: ['8', '11', '17', '21']
20+
jdk: ['8', '11', '17', '21', '23']
2121
os: [ubuntu-latest, windows-latest]
2222

2323
steps:

fop-core/src/main/java/org/apache/fop/layoutmgr/KnuthSequence.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,20 +134,20 @@ public void wrapPositions(LayoutManager lm) {
134134
/**
135135
* @return the last element of this sequence.
136136
*/
137-
public ListElement getLast() {
137+
public T getLast() {
138138
return (isEmpty()
139139
? null
140-
: (ListElement) ListUtil.getLast(this));
140+
: ListUtil.getLast(this));
141141
}
142142

143143
/**
144144
* Remove the last element of this sequence.
145145
* @return the removed element.
146146
*/
147-
public ListElement removeLast() {
147+
public T removeLast() {
148148
return (isEmpty()
149149
? null
150-
: (ListElement) ListUtil.removeLast(this));
150+
: ListUtil.removeLast(this));
151151
}
152152

153153
/**

0 commit comments

Comments
 (0)