Skip to content

Polish #41957

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

Closed

Polish #41957

Show file tree
Hide file tree
Changes from 2 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 @@ -55,6 +55,7 @@
import org.gradle.api.attributes.DocsType;
import org.gradle.api.attributes.Usage;
import org.gradle.api.component.AdhocComponentWithVariants;
import org.gradle.api.component.ConfigurationVariantDetails;
import org.gradle.api.component.SoftwareComponent;
import org.gradle.api.file.CopySpec;
import org.gradle.api.file.DirectoryProperty;
Expand Down Expand Up @@ -132,7 +133,7 @@ private void publishOptionalDependenciesInPom(Project project) {
if (component instanceof AdhocComponentWithVariants componentWithVariants) {
componentWithVariants.addVariantsFromConfiguration(
project.getConfigurations().getByName(OptionalDependenciesPlugin.OPTIONAL_CONFIGURATION_NAME),
(variant) -> variant.mapToOptional());
ConfigurationVariantDetails::mapToOptional);
}
});
MavenPublication publication = (MavenPublication) project.getExtensions()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ private void applyConnectionDetails(FlywayConnectionDetails connectionDetails, D
*/
private void configureProperties(FluentConfiguration configuration, FlywayProperties properties) {
// NOTE: Using method references in the mapper methods can break
// back-compatibilty (see gh-38164)
// back-compatibility (see gh-38164)
PropertyMapper map = PropertyMapper.get().alwaysApplyingWhenNonNull();
String[] locations = new LocationResolver(configuration.getDataSource())
.resolveLocations(properties.getLocations())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,11 @@ CopyAction createCopyAction(Jar jar, ResolvedDependencies resolvedDependencies,
}

private Integer getDirMode(CopySpec copySpec) {
return getMode(copySpec, "getDirPermissions", () -> copySpec.getDirMode());
return getMode(copySpec, "getDirPermissions", copySpec::getDirMode);
}

private Integer getFileMode(CopySpec copySpec) {
return getMode(copySpec, "getFilePermissions", () -> copySpec.getFileMode());
return getMode(copySpec, "getFilePermissions", copySpec::getFileMode);
}

@SuppressWarnings("unchecked")
Expand Down