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

lb update to 21 #198

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 17 ]
java: [ 21 ]
experimental: [false]
fail-fast: false
continue-on-error: ${{ matrix.experimental }}
Expand Down
5 changes: 3 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ wrapper {
}

java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}

group = 'org.broadinstitute'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public ArgumentDefinition(final Object containingObject, final Field underlyingF
* Get the underlying {@code Field} for this argument
* @return the {@code Field} for this argument
*/
public Field getUnderlyingField() { return underlyingField; }
public final Field getUnderlyingField() { return underlyingField; }

/**
* Get the parent {@code Object} containing the {@code Field} for this argument.
Expand All @@ -77,7 +77,7 @@ public ArgumentDefinition(final Object containingObject, final Field underlyingF
* Get the {@code Object} representing the current value of the field for this object.
* @return A boxed value even if the underlying field is a primitive. will not be null.
*/
public Object getArgumentValue() {
public final Object getArgumentValue() {
try {
return getUnderlyingField().get(getContainingObject());
} catch (final IllegalAccessException e) {
Expand Down Expand Up @@ -158,7 +158,7 @@ public List<String> getOriginalCommandLineValues() {
* constructors can be found.
* @return {@code Class<?>} for this field
*/
protected Class<?> getClassForUnderlyingField() {
protected final Class<?> getClassForUnderlyingField() {
final Field field = getUnderlyingField();
if (isCollectionField(field)) {
final ParameterizedType clazz = (ParameterizedType) (field.getGenericType());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import java.net.URLClassLoader;
import java.net.URLDecoder;
import java.nio.charset.StandardCharsets;
import java.nio.file.Paths;
import java.util.Enumeration;
import java.util.LinkedHashSet;
import java.util.Set;
Expand Down Expand Up @@ -44,7 +45,7 @@ public ClassFinder(final File jarFile) throws IOException {
// but the jarPath is remembered so that the iteration over the classpath skips anything other than
// the jarPath.
jarPath = jarFile.getCanonicalPath();
final URL[] urls = {new URL("file", "", jarPath)};
final URL[] urls = {Paths.get(jarPath).toUri().toURL()};
loader = new URLClassLoader(urls, Thread.currentThread().getContextClassLoader());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public class NamedArgumentDefinition extends ArgumentDefinition {
* {@code CommandLinePluginDescriptor} itself are not contained in a plugin,
* and will not have a {@code descriptorForControllingPlugin}. can be null.
*/
@SuppressWarnings("this-escape")
public NamedArgumentDefinition(
final Argument argumentAnnotation,
final Object containingObject,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public class PositionalArgumentDefinition extends ArgumentDefinition {
* @param containingObject the parent {@code Object} containing this argument. cannot be null.
* @param argField the {@code Field} for this argument. cannot be null.
*/
@SuppressWarnings("this-escape")
public PositionalArgumentDefinition(
final PositionalArguments positionalArgumentsAnnotation,
final Object containingObject,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public class DocWorkUnit implements Comparable<DocWorkUnit> {
* @param clazz
* @param documentedFeatureAnnotation
*/
@SuppressWarnings("this-escape")
public DocWorkUnit(
final DocWorkUnitHandler workUnitHandler,
final Element docElement,
Expand Down