Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ static AttributedConfigurationNode root(final String tagName, final Configuratio
* @since 4.0.0
*/
static <E extends Exception> AttributedConfigurationNode root(final String tagName, final ConfigurationOptions options,
CheckedConsumer<? super AttributedConfigurationNode, E> action) throws E {
final CheckedConsumer<? super AttributedConfigurationNode, E> action) throws E {
return root(tagName, options).act(action);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ default <V> Collector<Map.Entry<?, V>, N, N> toMapCollector(final TypeToken<V> v
return Collector.of(this::createNode, (node, entry) -> {
try {
node.node(entry.getKey()).set(valueType, entry.getValue());
} catch (SerializationException e) {
throw new IllegalArgumentException(e);
} catch (final SerializationException ex) {
throw new IllegalArgumentException(ex);
}
}, (a, b) -> {
a.mergeFrom(b);
Expand All @@ -142,8 +142,8 @@ default <V> Collector<Map.Entry<?, V>, N, N> toMapCollector(final Class<V> value
return Collector.of(this::createNode, (node, entry) -> {
try {
node.node(entry.getKey()).set(valueType, entry.getValue());
} catch (SerializationException e) {
throw new IllegalArgumentException(e);
} catch (final SerializationException ex) {
throw new IllegalArgumentException(ex);
}
}, (a, b) -> {
a.mergeFrom(b);
Expand All @@ -166,8 +166,8 @@ default <V> Collector<V, N, N> toListCollector(final TypeToken<V> valueType) {
return Collector.of(this::createNode, (node, value) -> {
try {
node.appendListNode().set(valueType, value);
} catch (SerializationException e) {
throw new IllegalArgumentException(e);
} catch (final SerializationException ex) {
throw new IllegalArgumentException(ex);
}
}, (a, b) -> {
a.mergeFrom(b);
Expand All @@ -190,8 +190,8 @@ default <V> Collector<V, N, N> toListCollector(final Class<V> valueType) {
return Collector.of(this::createNode, (node, value) -> {
try {
node.appendListNode().set(valueType, value);
} catch (SerializationException e) {
throw new IllegalArgumentException(e);
} catch (final SerializationException ex) {
throw new IllegalArgumentException(ex);
}
}, (a, b) -> {
a.mergeFrom(b);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ default Void newState() {
}

@Override
default void beginVisit(ConfigurationNode node, Void state) throws E {
default void beginVisit(final ConfigurationNode node, final Void state) throws E {
beginVisit(node);
}

Expand All @@ -185,10 +185,10 @@ default void beginVisit(ConfigurationNode node, Void state) throws E {
* @throws E as required by implementation
* @since 4.0.0
*/
default void beginVisit(ConfigurationNode node) throws E {}
default void beginVisit(final ConfigurationNode node) throws E {}

@Override
default void enterNode(ConfigurationNode node, Void state) throws E {
default void enterNode(final ConfigurationNode node, final Void state) throws E {
enterNode(node);
}

Expand All @@ -202,7 +202,7 @@ default void enterNode(ConfigurationNode node, Void state) throws E {
void enterNode(ConfigurationNode node) throws E;

@Override
default void enterMappingNode(ConfigurationNode node, Void state) throws E {
default void enterMappingNode(final ConfigurationNode node, final Void state) throws E {
enterMappingNode(node);
}

Expand All @@ -214,10 +214,10 @@ default void enterMappingNode(ConfigurationNode node, Void state) throws E {
* @throws E when thrown by implementation
* @since 4.0.0
*/
default void enterMappingNode(ConfigurationNode node) throws E {}
default void enterMappingNode(final ConfigurationNode node) throws E {}

@Override
default void enterListNode(ConfigurationNode node, Void state) throws E {
default void enterListNode(final ConfigurationNode node, final Void state) throws E {
enterListNode(node);
}

Expand All @@ -229,11 +229,11 @@ default void enterListNode(ConfigurationNode node, Void state) throws E {
* @throws E when thrown by implementation
* @since 4.0.0
*/
default void enterListNode(ConfigurationNode node) throws E {
default void enterListNode(final ConfigurationNode node) throws E {
}

@Override
default void enterScalarNode(ConfigurationNode node, Void state) throws E {
default void enterScalarNode(final ConfigurationNode node, final Void state) throws E {
enterScalarNode(node);
}

Expand All @@ -245,11 +245,11 @@ default void enterScalarNode(ConfigurationNode node, Void state) throws E {
* @throws E when thrown by implementation
* @since 4.0.0
*/
default void enterScalarNode(ConfigurationNode node) throws E {
default void enterScalarNode(final ConfigurationNode node) throws E {
}

@Override
default void exitMappingNode(ConfigurationNode node, Void state) throws E {
default void exitMappingNode(final ConfigurationNode node, final Void state) throws E {
exitMappingNode(node);
}

Expand All @@ -261,10 +261,10 @@ default void exitMappingNode(ConfigurationNode node, Void state) throws E {
* @throws E when thrown by implementation
* @since 4.0.0
*/
default void exitMappingNode(ConfigurationNode node) throws E {}
default void exitMappingNode(final ConfigurationNode node) throws E {}

@Override
default void exitListNode(ConfigurationNode node, Void state) throws E {
default void exitListNode(final ConfigurationNode node, final Void state) throws E {
exitListNode(node);
}

Expand All @@ -276,10 +276,10 @@ default void exitListNode(ConfigurationNode node, Void state) throws E {
* @throws E when thrown by implementation
* @since 4.0.0
*/
default void exitListNode(ConfigurationNode node) throws E {}
default void exitListNode(final ConfigurationNode node) throws E {}

@Override
default Void endVisit(Void state) throws E {
default Void endVisit(final Void state) throws E {
endVisit();
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public interface NodePath extends Iterable<Object> {
* @return the path instance
* @since 4.0.0
*/
static NodePath of(Object[] path) {
static NodePath of(final Object[] path) {
if (path.length == 0) {
return NodePathImpl.EMPTY;
} else {
Expand All @@ -48,7 +48,7 @@ static NodePath of(Object[] path) {
* @return the path instance
* @since 4.0.0
*/
static NodePath of(Collection<?> path) {
static NodePath of(final Collection<?> path) {
if (path.isEmpty()) {
return NodePathImpl.EMPTY;
} else {
Expand All @@ -66,7 +66,7 @@ static NodePath of(Collection<?> path) {
* @return the path instance
* @since 4.0.0
*/
static NodePath path(Object... elements) {
static NodePath path(final Object... elements) {
return of(elements);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ static Set<ConfigurationFormat> supportedFormats() {
* @return a newly configured loader
* @since 4.2.0
*/
default ConfigurationLoader<? extends @NonNull Object> create(Path file) {
default ConfigurationLoader<? extends @NonNull Object> create(final Path file) {
return create(file, BasicConfigurationNode.factory().createNode());
}

Expand All @@ -117,7 +117,7 @@ static Set<ConfigurationFormat> supportedFormats() {
* @return a newly configured loader
* @since 4.2.0
*/
default ConfigurationLoader<? extends @NonNull Object> create(URL url) {
default ConfigurationLoader<? extends @NonNull Object> create(final URL url) {
return create(url, BasicConfigurationNode.factory().createNode());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ static <V> Processor.Iso<V> create() {
* @return a new processor instance
* @since 4.0.0
*/
static <V> Processor.Iso<V> create(Executor executor) {
static <V> Processor.Iso<V> create(final Executor executor) {
return new ProcessorImpl<>(executor);
}

Expand Down Expand Up @@ -94,7 +94,7 @@ static <V> Processor.TransactionalIso<V> createTransactional(final Executor exec
* {@inheritDoc}
*/
@Override
default <R> Processor<O, R> map(CheckedFunction<? super O, ? extends R, TransactionFailedException> mapper) {
default <R> Processor<O, R> map(final CheckedFunction<? super O, ? extends R, TransactionFailedException> mapper) {
return new MappedProcessor<>(mapper, this);
}

Expand Down Expand Up @@ -138,7 +138,7 @@ default <R> Processor<O, R> map(CheckedFunction<? super O, ? extends R, Transact
*/
interface Iso<V> extends Processor<V, V> {
@Override
default void inject(V element) {
default void inject(final V element) {
submit(element);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public interface Publisher<V> {
* @return a publisher
* @since 4.0.0
*/
static <V, E extends Exception> Publisher<V> execute(CheckedSupplier<V, E> action) {
static <V, E extends Exception> Publisher<V> execute(final CheckedSupplier<V, E> action) {
return execute(action, ForkJoinPool.commonPool());
}

Expand All @@ -67,7 +67,7 @@ static <V, E extends Exception> Publisher<V> execute(CheckedSupplier<V, E> actio
* @return a publisher
* @since 4.0.0
*/
static <V, E extends Exception> Publisher<V> execute(CheckedSupplier<V, E> action, Executor executor) {
static <V, E extends Exception> Publisher<V> execute(final CheckedSupplier<V, E> action, final Executor executor) {
return new ExecutePublisher<>(requireNonNull(action, "action"), requireNonNull(executor, "executor"));
}

Expand Down Expand Up @@ -101,7 +101,7 @@ static <V, E extends Exception> Publisher<V> execute(CheckedSupplier<V, E> actio
* @return a new publisher
* @since 4.0.0
*/
default <R> Publisher<R> map(CheckedFunction<? super V, ? extends R, TransactionFailedException> mapper) {
default <R> Publisher<R> map(final CheckedFunction<? super V, ? extends R, TransactionFailedException> mapper) {
return new MappedProcessor<>(mapper, this);
}

Expand All @@ -123,7 +123,7 @@ default Cached<V> cache() {
* @return publisher that will cache future responses
* @since 4.0.0
*/
default Cached<V> cache(@Nullable V initialValue) {
default Cached<V> cache(final @Nullable V initialValue) {
return new CachedPublisher<>(this, initialValue);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public interface Subscriber<V> {
* @param thrown the exception thrown
* @since 4.0.0
*/
default void onError(Throwable thrown) {
default void onError(final Throwable thrown) {
final Thread t = Thread.currentThread();
t.getUncaughtExceptionHandler().uncaughtException(t, thrown);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@
public interface TransactionalSubscriber<V> extends Subscriber<V> {

@Override
default void submit(V item) {
default void submit(final V item) {
try {
beginTransaction(item);
commit();
} catch (TransactionFailedException ex) {
} catch (final TransactionFailedException ex) {
rollback();
} catch (Exception ex) {
} catch (final Exception ex) {
rollback();
throw ex;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ static TransformAction remove() {
* @return new action
* @since 4.0.0
*/
static TransformAction rename(Object newKey) {
static TransformAction rename(final Object newKey) {
return (path, value) -> {
final Object[] arr = path.array();
if (arr.length == 0) {
Expand All @@ -76,7 +76,7 @@ static TransformAction rename(Object newKey) {
* @return new transformation action
* @since 4.0.0
*/
static <V> TransformAction set(TypeToken<V> type, @Nullable V value) {
static <V> TransformAction set(final TypeToken<V> type, final @Nullable V value) {
return (path, node) -> {
node.set(type, value);
return null;
Expand All @@ -93,7 +93,7 @@ static <V> TransformAction set(TypeToken<V> type, @Nullable V value) {
* @return new transformation action
* @since 4.0.0
*/
static <V> TransformAction set(TypeToken<V> type, Supplier<@Nullable V> valueSupplier) {
static <V> TransformAction set(final TypeToken<V> type, final Supplier<@Nullable V> valueSupplier) {
return (path, value) -> {
value.set(type, valueSupplier.get());
return null;
Expand All @@ -110,7 +110,7 @@ static <V> TransformAction set(TypeToken<V> type, Supplier<@Nullable V> valueSup
* @return new transformation action
* @since 4.0.0
*/
static <V> TransformAction set(Class<V> type, Supplier<V> valueSupplier) {
static <V> TransformAction set(final Class<V> type, final Supplier<V> valueSupplier) {
return (path, value) -> {
value.set(type, valueSupplier.get());
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public interface CheckedConsumer<V, E extends Throwable> {
* @return a function that executes the provided consumer
* @since 4.0.0
*/
static <V> CheckedConsumer<V, RuntimeException> from(Consumer<V> consumer) {
static <V> CheckedConsumer<V, RuntimeException> from(final Consumer<V> consumer) {
return consumer::accept;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public interface CheckedFunction<I, O, E extends Exception> {
* @return the function as a checked function
* @since 4.0.0
*/
static <I, O> CheckedFunction<I, O, RuntimeException> from(Function<I, @NonNull O> func) {
static <I, O> CheckedFunction<I, O, RuntimeException> from(final Function<I, @NonNull O> func) {
return requireNonNull(func, "func")::apply;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public interface CheckedSupplier<V, E extends Throwable> {
* @return a function that executes the provided consumer
* @since 4.0.0
*/
static <V> CheckedSupplier<V, RuntimeException> from(Supplier<V> consumer) {
static <V> CheckedSupplier<V, RuntimeException> from(final Supplier<V> consumer) {
return consumer::get;
}

Expand Down
8 changes: 4 additions & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[versions]
assertj="3.27.3"
autoValue="1.11.0"
checkerQual="3.49.0"
checkstyle="10.21.3"
checkerQual="3.49.1"
checkstyle="10.21.4"
geantyref = "1.3.16"
errorprone="2.36.0"
indra = "3.1.3"
Expand Down Expand Up @@ -48,15 +48,15 @@ guice-runtime = "com.google.inject:guice:5.0.1"

# Formats
gson = "com.google.code.gson:gson:2.8.0" # Fixed version, to avoid using API not present in older MC
jackson = "com.fasterxml.jackson.core:jackson-core:2.18.2"
jackson = "com.fasterxml.jackson.core:jackson-core:2.18.3"

# Tool
clikt = "com.github.ajalt:clikt:2.8.0"
jansi = "org.fusesource.jansi:jansi:2.4.1"

# Build
build-codenarc = { module = "org.codenarc:CodeNarc", version = "3.6.0-groovy-4.0" }
build-codenarcGroovy = { module = "org.apache.groovy:groovy-all", version = "4.0.25" }
build-codenarcGroovy = { module = "org.apache.groovy:groovy-all", version = "4.0.26" }
build-errorprone = "net.ltgt.gradle:gradle-errorprone-plugin:4.1.0"
build-forbiddenApis = "de.thetaphi:forbiddenapis:3.8"
build-goomph = "com.diffplug.gradle:goomph:4.2.0"
Expand Down