Merge branch '3.2.x'
Closes gh-41077
This commit is contained in:
@@ -239,8 +239,7 @@ public final class ConfigData {
|
||||
}
|
||||
|
||||
private Options copy(Consumer<EnumSet<Option>> processor) {
|
||||
EnumSet<Option> options = EnumSet.noneOf(Option.class);
|
||||
options.addAll(this.options);
|
||||
EnumSet<Option> options = EnumSet.copyOf(this.options);
|
||||
processor.accept(options);
|
||||
return new Options(options);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2023 the original author or authors.
|
||||
* Copyright 2012-2024 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -195,8 +195,7 @@ final class TldPatterns {
|
||||
static final Set<String> DEFAULT_SCAN;
|
||||
|
||||
static {
|
||||
Set<String> scanPatterns = new LinkedHashSet<>();
|
||||
scanPatterns.addAll(TOMCAT_SCAN);
|
||||
Set<String> scanPatterns = new LinkedHashSet<>(TOMCAT_SCAN);
|
||||
DEFAULT_SCAN = Collections.unmodifiableSet(scanPatterns);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2022 the original author or authors.
|
||||
* Copyright 2012-2024 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -128,8 +128,7 @@ class TomcatEmbeddedContext extends StandardContext {
|
||||
|
||||
@Override
|
||||
public String[] findMimeMappings() {
|
||||
List<String> mappings = new ArrayList<>();
|
||||
mappings.addAll(Arrays.asList(super.findMimeMappings()));
|
||||
List<String> mappings = new ArrayList<>(Arrays.asList(super.findMimeMappings()));
|
||||
if (this.mimeMappings != null) {
|
||||
this.mimeMappings.forEach((mapping) -> mappings.add(mapping.getExtension()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user