Skip to content

Bump io.spring.javaformat:spring-javaformat-gradle-plugin from 0.0.15 to 0.0.43 #906

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

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
2 changes: 1 addition & 1 deletion buildSrc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ dependencies {
implementation 'com.apollographql.apollo:apollo-runtime:2.4.6'
implementation 'com.github.ben-manes:gradle-versions-plugin:0.38.0'
implementation 'com.github.spullara.mustache.java:compiler:0.9.14'
implementation 'io.spring.javaformat:spring-javaformat-gradle-plugin:0.0.15'
implementation 'io.spring.javaformat:spring-javaformat-gradle-plugin:0.0.43'
implementation 'io.spring.gradle:spring-security-release-plugin:1.0.3'
implementation 'io.spring.nohttp:nohttp-gradle:0.0.11'
implementation 'net.sourceforge.htmlunit:htmlunit:2.37.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,38 +38,50 @@ class LdapCoreRuntimeHints implements RuntimeHintsRegistrar {

@Override
public void registerHints(RuntimeHints hints, ClassLoader classLoader) {
hints.reflection().registerType(TypeReference.of("com.sun.jndi.ldap.LdapCtxFactory"),
(builder) -> builder.withMembers(MemberCategory.INVOKE_PUBLIC_CONSTRUCTORS));
hints.reflection().registerType(AbstractContextSource.class, (builder) -> builder
hints.reflection()
.registerType(TypeReference.of("com.sun.jndi.ldap.LdapCtxFactory"),
(builder) -> builder.withMembers(MemberCategory.INVOKE_PUBLIC_CONSTRUCTORS));
hints.reflection()
.registerType(AbstractContextSource.class, (builder) -> builder
.withMembers(MemberCategory.INTROSPECT_DECLARED_METHODS, MemberCategory.DECLARED_FIELDS));
hints.reflection().registerType(DefaultDirObjectFactory.class,
(builder) -> builder.withMembers(MemberCategory.INVOKE_PUBLIC_CONSTRUCTORS));
hints.reflection().registerTypeIfPresent(classLoader, "javax.naming.ldap.PagedResultsControl",
(builder) -> builder.onReachableType(PagedResultsDirContextProcessor.class)
hints.reflection()
.registerType(DefaultDirObjectFactory.class,
(builder) -> builder.withMembers(MemberCategory.INVOKE_PUBLIC_CONSTRUCTORS));
hints.reflection()
.registerTypeIfPresent(classLoader, "javax.naming.ldap.PagedResultsControl",
(builder) -> builder.onReachableType(PagedResultsDirContextProcessor.class)
.withMembers(MemberCategory.INVOKE_PUBLIC_METHODS, MemberCategory.INVOKE_PUBLIC_CONSTRUCTORS));
hints.reflection().registerTypeIfPresent(classLoader, "com.sun.jndi.ldap.ctl.PagedResultsControl",
(builder) -> builder.onReachableType(PagedResultsDirContextProcessor.class)
hints.reflection()
.registerTypeIfPresent(classLoader, "com.sun.jndi.ldap.ctl.PagedResultsControl",
(builder) -> builder.onReachableType(PagedResultsDirContextProcessor.class)
.withMembers(MemberCategory.INVOKE_PUBLIC_METHODS, MemberCategory.INVOKE_PUBLIC_CONSTRUCTORS));
hints.reflection().registerTypeIfPresent(classLoader, "javax.naming.ldap.PagedResultsResponseControl",
(builder) -> builder.onReachableType(PagedResultsDirContextProcessor.class)
hints.reflection()
.registerTypeIfPresent(classLoader, "javax.naming.ldap.PagedResultsResponseControl",
(builder) -> builder.onReachableType(PagedResultsDirContextProcessor.class)
.withMembers(MemberCategory.INVOKE_PUBLIC_METHODS, MemberCategory.INVOKE_PUBLIC_CONSTRUCTORS));
hints.reflection().registerTypeIfPresent(classLoader, "com.sun.jndi.ldap.ctl.PagedResultsResponseControl",
(builder) -> builder.onReachableType(PagedResultsDirContextProcessor.class)
hints.reflection()
.registerTypeIfPresent(classLoader, "com.sun.jndi.ldap.ctl.PagedResultsResponseControl",
(builder) -> builder.onReachableType(PagedResultsDirContextProcessor.class)
.withMembers(MemberCategory.INVOKE_PUBLIC_METHODS, MemberCategory.INVOKE_PUBLIC_CONSTRUCTORS));
hints.reflection().registerTypeIfPresent(classLoader, "javax.naming.ldap.SortControl",
(builder) -> builder.onReachableType(SortControlDirContextProcessor.class)
hints.reflection()
.registerTypeIfPresent(classLoader, "javax.naming.ldap.SortControl",
(builder) -> builder.onReachableType(SortControlDirContextProcessor.class)
.withMembers(MemberCategory.INVOKE_PUBLIC_METHODS, MemberCategory.INVOKE_PUBLIC_CONSTRUCTORS));
hints.reflection().registerTypeIfPresent(classLoader, "com.sun.jndi.ldap.ctl.SortControl",
(builder) -> builder.onReachableType(SortControlDirContextProcessor.class)
hints.reflection()
.registerTypeIfPresent(classLoader, "com.sun.jndi.ldap.ctl.SortControl",
(builder) -> builder.onReachableType(SortControlDirContextProcessor.class)
.withMembers(MemberCategory.INVOKE_PUBLIC_METHODS, MemberCategory.INVOKE_PUBLIC_CONSTRUCTORS));
hints.reflection().registerTypeIfPresent(classLoader, "javax.naming.ldap.SortResponseControl",
(builder) -> builder.onReachableType(SortControlDirContextProcessor.class)
hints.reflection()
.registerTypeIfPresent(classLoader, "javax.naming.ldap.SortResponseControl",
(builder) -> builder.onReachableType(SortControlDirContextProcessor.class)
.withMembers(MemberCategory.INVOKE_PUBLIC_METHODS, MemberCategory.INVOKE_PUBLIC_CONSTRUCTORS));
hints.reflection().registerTypeIfPresent(classLoader, "com.sun.jndi.ldap.ctl.SortResponseControl",
(builder) -> builder.onReachableType(SortControlDirContextProcessor.class)
hints.reflection()
.registerTypeIfPresent(classLoader, "com.sun.jndi.ldap.ctl.SortResponseControl",
(builder) -> builder.onReachableType(SortControlDirContextProcessor.class)
.withMembers(MemberCategory.INVOKE_PUBLIC_METHODS, MemberCategory.INVOKE_PUBLIC_CONSTRUCTORS));
hints.reflection().registerType(TypeReference.of("javax.net.ssl.SSLSocketFactory"),
(builder) -> builder.withMethod("getDefault", Collections.emptyList(), ExecutableMode.INVOKE)
hints.reflection()
.registerType(TypeReference.of("javax.net.ssl.SSLSocketFactory"),
(builder) -> builder.withMethod("getDefault", Collections.emptyList(), ExecutableMode.INVOKE)
.onReachableType(TypeReference.of("com.sun.jndi.ldap.Connection")));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@ public BeanDefinition parse(Element element, ParserContext parserContext) {
builder.addPropertyValue("password", password);

BeanDefinitionBuilder urlsBuilder = BeanDefinitionBuilder.rootBeanDefinition(UrlsFactory.class)
.setFactoryMethod("urls").addConstructorArgValue(url);
.setFactoryMethod("urls")
.addConstructorArgValue(url);

builder.addPropertyValue("urls", urlsBuilder.getBeanDefinition());
builder.addPropertyValue("base", ParserUtils.getString(element, ATT_BASE, ""));
Expand Down Expand Up @@ -215,7 +216,7 @@ public BeanDefinition parse(Element element, ParserContext parserContext) {
BeanDefinition actualContextSourceDefinition = targetContextSourceDefinition;
if (!anonymousReadOnly) {
BeanDefinitionBuilder proxyBuilder = BeanDefinitionBuilder
.rootBeanDefinition(TransactionAwareContextSourceProxy.class);
.rootBeanDefinition(TransactionAwareContextSourceProxy.class);
proxyBuilder.addConstructorArgValue(targetContextSourceDefinition);
actualContextSourceDefinition = proxyBuilder.getBeanDefinition();
}
Expand Down Expand Up @@ -306,7 +307,7 @@ private void populatePoolValidationProperties(BeanDefinitionBuilder builder, Ele
builder.addPropertyValue("testWhileIdle", testWhileIdle);

BeanDefinitionBuilder validatorBuilder = BeanDefinitionBuilder
.rootBeanDefinition(DefaultDirContextValidator.class);
.rootBeanDefinition(DefaultDirContextValidator.class);
validatorBuilder.addPropertyValue("base", ParserUtils.getString(element, ATT_VALIDATION_QUERY_BASE, ""));
validatorBuilder.addPropertyValue("filter",
ParserUtils.getString(element, ATT_VALIDATION_QUERY_FILTER, DefaultDirContextValidator.DEFAULT_FILTER));
Expand Down Expand Up @@ -342,7 +343,7 @@ private void populatePoolValidationProperties(BeanDefinitionBuilder builder, Ele
private void populatePoolValidationProperties(BeanDefinitionBuilder builder, Element element) {

BeanDefinitionBuilder validatorBuilder = BeanDefinitionBuilder
.rootBeanDefinition(org.springframework.ldap.pool2.validation.DefaultDirContextValidator.class);
.rootBeanDefinition(org.springframework.ldap.pool2.validation.DefaultDirContextValidator.class);
validatorBuilder.addPropertyValue("base", ParserUtils.getString(element, ATT_VALIDATION_QUERY_BASE, ""));
validatorBuilder.addPropertyValue("filter", ParserUtils.getString(element, ATT_VALIDATION_QUERY_FILTER,
org.springframework.ldap.pool2.validation.DefaultDirContextValidator.DEFAULT_FILTER));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,15 @@ public class DefaultRenamingStrategyParser implements BeanDefinitionParser {
@Override
public BeanDefinition parse(Element element, ParserContext parserContext) {
BeanDefinitionBuilder builder = BeanDefinitionBuilder
.rootBeanDefinition(DefaultTempEntryRenamingStrategy.class);
.rootBeanDefinition(DefaultTempEntryRenamingStrategy.class);

builder.addPropertyValue("tempSuffix",
ParserUtils.getString(element, ATT_TEMP_SUFFIX, DefaultTempEntryRenamingStrategy.DEFAULT_TEMP_SUFFIX));

AbstractBeanDefinition beanDefinition = builder.getBeanDefinition();
parserContext.getContainingBeanDefinition().getPropertyValues().addPropertyValue("renamingStrategy",
beanDefinition);
parserContext.getContainingBeanDefinition()
.getPropertyValues()
.addPropertyValue("renamingStrategy", beanDefinition);

return beanDefinition;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ else if (StringUtils.hasText(sessionFactoryRef)) {

private BeanDefinition parseDifferentSubtreeRenamingStrategy(Element element) {
BeanDefinitionBuilder builder = BeanDefinitionBuilder
.rootBeanDefinition(DifferentSubtreeTempEntryRenamingStrategy.class);
.rootBeanDefinition(DifferentSubtreeTempEntryRenamingStrategy.class);

String subtreeNode = element.getAttribute(ATT_SUBTREE_NODE);
Assert.hasText(subtreeNode, ATT_SUBTREE_NODE + " must be specified");
Expand All @@ -113,7 +113,7 @@ private BeanDefinition parseDifferentSubtreeRenamingStrategy(Element element) {

public BeanDefinition parseDefaultRenamingStrategy(Element element) {
BeanDefinitionBuilder builder = BeanDefinitionBuilder
.rootBeanDefinition(DefaultTempEntryRenamingStrategy.class);
.rootBeanDefinition(DefaultTempEntryRenamingStrategy.class);

builder.addPropertyValue("tempSuffix",
ParserUtils.getString(element, ATT_TEMP_SUFFIX, DefaultTempEntryRenamingStrategy.DEFAULT_TEMP_SUFFIX));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,10 @@ private <S extends NameClassPair, T> Stream<T> toStream(NamingEnumeration<S> res
Enumeration<S> enumeration = enumeration(results);
Function<? super S, T> function = mapper.wrap(this.namingExceptionHandler);
return StreamSupport
.stream(Spliterators.spliteratorUnknownSize(enumeration.asIterator(), Spliterator.ORDERED), false)
.map(function::apply).filter(Objects::nonNull).onClose(() -> closeNamingEnumeration(results));
.stream(Spliterators.spliteratorUnknownSize(enumeration.asIterator(), Spliterator.ORDERED), false)
.map(function::apply)
.filter(Objects::nonNull)
.onClose(() -> closeNamingEnumeration(results));
}

private void closeContext(DirContext ctx) {
Expand Down Expand Up @@ -467,7 +469,7 @@ else if (identification.size() != 1) {
try {
String password = (this.password != null) ? new String(this.password) : null;
ctx = DefaultLdapClient.this.contextSource
.getContext(identification.get(0).getAbsoluteName().toString(), password);
.getContext(identification.get(0).getAbsoluteName().toString(), password);
return mapper.mapWithContext(ctx, identification.get(0));
}
finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ public LdapRdn immutableLdapRdn() {
mapWithImmutableRdns.put(rdnComponent.getKey(), rdnComponent.immutableLdapRdnComponent());
}
Map<String, LdapRdnComponent> unmodifiableMapOfImmutableRdns = Collections
.unmodifiableMap(mapWithImmutableRdns);
.unmodifiableMap(mapWithImmutableRdns);
LdapRdn immutableRdn = new LdapRdn();
immutableRdn.components = unmodifiableMapOfImmutableRdns;
return immutableRdn;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1334,7 +1334,7 @@ public boolean authenticate(Name base, String filter, String password,

return authenticate(base, filter, password,
getDefaultSearchControls(this.defaultSearchScope, RETURN_OBJ_FLAG, null), callback, errorCallback)
.isSuccess();
.isSuccess();
}

private AuthenticationStatus authenticate(Name base, String filter, String password, SearchControls searchControls,
Expand Down Expand Up @@ -1572,10 +1572,11 @@ <T> Stream<T> searchForStream(LdapQuery query, Function<SearchResult, T> mapper)
return Stream.empty();
}
return StreamSupport
.stream(Spliterators.spliteratorUnknownSize(CollectionUtils.toIterator(results), Spliterator.ORDERED),
false)
.map((nameClassPair) -> unchecked(() -> mapper.apply(nameClassPair))).filter(Objects::nonNull)
.onClose(() -> closeContextAndNamingEnumeration(ctx, results));
.stream(Spliterators.spliteratorUnknownSize(CollectionUtils.toIterator(results), Spliterator.ORDERED),
false)
.map((nameClassPair) -> unchecked(() -> mapper.apply(nameClassPair)))
.filter(Objects::nonNull)
.onClose(() -> closeContextAndNamingEnumeration(ctx, results));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ BaseLdapPathSource getBaseLdapPathSourceFromApplicationContext() {
}

Collection<BaseLdapPathSource> beans = this.applicationContext.getBeansOfType(BaseLdapPathSource.class)
.values();
.values();
if (beans.isEmpty()) {
throw new NoSuchBeanDefinitionException("No BaseLdapPathSource implementation definition found");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ public static List<Object> lookupAttributeValues(LdapOperations ldapOperations,
*/
public static List<Object> lookupAttributeValues(LdapOperations ldapOperations, Name dn, String attribute) {
List<Object> values = loopForAllAttributeValues(ldapOperations, dn, new String[] { attribute })
.getValues(attribute);
.getValues(attribute);
if (values == null) {
values = Collections.emptyList();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
* {@link org.springframework.ldap.odm.annotations.Entry#base()} value will be used to
* figure out the distinguished name of entries to create and update.
* </p>
*
* @author Mattias Hellborg Arthursson
* @since 2.0
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
* annotated {@link Attribute}.
*
* @author Paul Harvey &lt;paul.at.pauls-place.me.uk&gt;
*
* @see Attribute
* @see javax.naming.Name
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
* <em>not</em> be persisted to LDAP.
*
* @author Paul Harvey &lt;[email protected]&gt;
*
* @see Entry
*/
@Target(ElementType.FIELD)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ public void mapToLdapDataEntry(Object entry, LdapDataEntry context) {
// but only if this is a new entry.
int numOcs = metaData.getObjectClasses().size();
CaseIgnoreString[] metaDataObjectClasses = metaData.getObjectClasses()
.toArray(new CaseIgnoreString[numOcs]);
.toArray(new CaseIgnoreString[numOcs]);

String[] stringOcs = new String[numOcs];
for (int ocIndex = 0; ocIndex < numOcs; ocIndex++) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ AttributeMetaData getAttribute(Field field) {
if (currentAttributeMetaData.isId()) {
if (this.idAttribute != null) {
// There can be only one id field
throw new MetaDataException(String.format(
"You man have only one field with the %1$s annotation in class %2$s", Id.class, clazz));
throw new MetaDataException(String
.format("You man have only one field with the %1$s annotation in class %2$s", Id.class, clazz));
}
this.idAttribute = currentAttributeMetaData;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public Object makeObject(Object key) throws Exception {

if (this.logger.isDebugEnabled()) {
this.logger
.debug("Created new " + DirContextType.READ_WRITE + " DirContext='" + readWriteContext + "'");
.debug("Created new " + DirContextType.READ_WRITE + " DirContext='" + readWriteContext + "'");
}

return makeFailureAwareProxy(readWriteContext);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ public Object create(Object key) throws Exception {

if (this.logger.isDebugEnabled()) {
this.logger
.debug("Created new " + DirContextType.READ_WRITE + " DirContext='" + readWriteContext + "'");
.debug("Created new " + DirContextType.READ_WRITE + " DirContext='" + readWriteContext + "'");
}

return makeFailureAwareProxy(readWriteContext);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,9 @@ public ConditionCriteria or(String attribute) {
@Override
public ContainerCriteria and(ContainerCriteria nested) {
if (this.type == CriteriaContainerType.OR) {
return new DefaultContainerCriteria(this.topQuery).withType(CriteriaContainerType.AND).append(this.filter())
.append(nested.filter());
return new DefaultContainerCriteria(this.topQuery).withType(CriteriaContainerType.AND)
.append(this.filter())
.append(nested.filter());
}
else {
this.type = CriteriaContainerType.AND;
Expand All @@ -82,8 +83,9 @@ public ContainerCriteria and(ContainerCriteria nested) {
@Override
public ContainerCriteria or(ContainerCriteria nested) {
if (this.type == CriteriaContainerType.AND) {
return new DefaultContainerCriteria(this.topQuery).withType(CriteriaContainerType.OR).append(this.filter())
.append(nested.filter());
return new DefaultContainerCriteria(this.topQuery).withType(CriteriaContainerType.OR)
.append(this.filter())
.append(nested.filter());
}
else {
this.type = CriteriaContainerType.OR;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ protected void doCleanupAfterCompletion(Object transaction) {
protected void doCommit(DefaultTransactionStatus status) {

ContextSourceAndDataSourceTransactionObject actualTransactionObject = (ContextSourceAndDataSourceTransactionObject) status
.getTransaction();
.getTransaction();

try {
super.doCommit(new DefaultTransactionStatus(actualTransactionObject.getDataSourceTransactionObject(),
Expand Down Expand Up @@ -147,7 +147,7 @@ protected void doCommit(DefaultTransactionStatus status) {
@Override
protected void doRollback(DefaultTransactionStatus status) {
ContextSourceAndDataSourceTransactionObject actualTransactionObject = (ContextSourceAndDataSourceTransactionObject) status
.getTransaction();
.getTransaction();

super.doRollback(new DefaultTransactionStatus(actualTransactionObject.getDataSourceTransactionObject(),
status.isNewTransaction(), status.isNewSynchronization(), status.isReadOnly(), status.isDebug(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ protected void doCleanupAfterCompletion(Object transaction) {
protected void doCommit(DefaultTransactionStatus status) {

ContextSourceAndHibernateTransactionObject actualTransactionObject = (ContextSourceAndHibernateTransactionObject) status
.getTransaction();
.getTransaction();

try {
super.doCommit(new DefaultTransactionStatus(actualTransactionObject.getHibernateTransactionObject(),
Expand Down Expand Up @@ -147,7 +147,7 @@ protected void doCommit(DefaultTransactionStatus status) {
@Override
protected void doRollback(DefaultTransactionStatus status) {
ContextSourceAndHibernateTransactionObject actualTransactionObject = (ContextSourceAndHibernateTransactionObject) status
.getTransaction();
.getTransaction();

super.doRollback(new DefaultTransactionStatus(actualTransactionObject.getHibernateTransactionObject(),
status.isNewTransaction(), status.isNewSynchronization(), status.isReadOnly(), status.isDebug(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ else if (LdapTransactionUtils.isSupportedWriteTransactionOperation(methodName))
*/
void doCloseConnection(DirContext context, ContextSource contextSource) throws javax.naming.NamingException {
DirContextHolder transactionContextHolder = (DirContextHolder) TransactionSynchronizationManager
.getResource(contextSource);
.getResource(contextSource);
if (transactionContextHolder == null || transactionContextHolder.getCtx() != context) {
log.debug("Closing context");
// This is not the transactional context or the transaction is
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public abstract class AbstractCompensatingTransactionManagerDelegate {
*/
public Object doGetTransaction() throws TransactionException {
CompensatingTransactionHolderSupport holder = (CompensatingTransactionHolderSupport) TransactionSynchronizationManager
.getResource(getTransactionSynchronizationKey());
.getResource(getTransactionSynchronizationKey());
return new CompensatingTransactionObject(holder);
}

Expand Down
Loading