language stringclasses 1
value | owner stringlengths 2 15 | repo stringlengths 2 21 | sha stringlengths 45 45 | message stringlengths 7 36.3k | path stringlengths 1 199 | patch stringlengths 15 102k | is_multipart bool 2
classes |
|---|---|---|---|---|---|---|---|
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-beans/src/test/java/org/springframework/beans/factory/BeanFactoryUtilsTests.java | @@ -483,6 +483,7 @@ public Class<TestBean> getObjectType() {
return TestBean.class;
}
+ @Override
public TestBean getObject() {
// We don't really care if the actual instance is a singleton or prototype
// for the tests that use this factory. | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-beans/src/test/java/org/springframework/beans/factory/DefaultListableBeanFactoryTests.java | @@ -48,8 +48,6 @@
import org.springframework.beans.BeansException;
import org.springframework.beans.MutablePropertyValues;
import org.springframework.beans.NotWritablePropertyException;
-import org.springframework.beans.PropertyEditorRegistrar;
-import org.springframework.beans.PropertyEditorRegistry;
import org.sp... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-beans/src/test/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessorTests.java | @@ -22,7 +22,6 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import java.util.ArrayList;
import java.util.Arrays;
@@ -3660,11 +3659,8 @@ public static class MocksCont... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-beans/src/test/java/org/springframework/beans/factory/config/CustomEditorConfigurerTests.java | @@ -29,7 +29,6 @@
import org.springframework.beans.MutablePropertyValues;
import org.springframework.beans.PropertyEditorRegistrar;
-import org.springframework.beans.PropertyEditorRegistry;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.suppor... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-beans/src/test/java/org/springframework/beans/factory/config/MethodInvokingFactoryBeanTests.java | @@ -113,7 +113,7 @@ public void testGetObjectType() throws Exception {
mcfb = new MethodInvokingFactoryBean();
mcfb.setTargetClass(TestClass1.class);
mcfb.setTargetMethod("supertypes");
- mcfb.setArguments(new ArrayList<>(), new ArrayList<Object>(), "hello");
+ mcfb.setArguments(new ArrayList<>(), new ArrayL... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-beans/src/test/java/org/springframework/beans/factory/support/BeanFactoryGenericsTests.java | @@ -17,7 +17,6 @@
package org.springframework.beans.factory.support;
import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import java.net.MalformedURLException;
import java.net.URI;
@@ -34,8 +33,6 @@
import org.junit.jupiter.api.Test;
import org.mockito.... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-beans/src/test/java/org/springframework/beans/factory/support/DefaultSingletonBeanRegistryTests.java | @@ -18,8 +18,6 @@
import org.junit.jupiter.api.Test;
-import org.springframework.beans.BeansException;
-import org.springframework.beans.factory.ObjectFactory;
import org.springframework.beans.testfixture.beans.DerivedTestBean;
import org.springframework.beans.testfixture.beans.TestBean;
@@ -40,12 +38,7 @@ pub... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/MustBeInitialized.java | @@ -40,8 +40,9 @@ public void afterPropertiesSet() throws Exception {
* managed the bean's lifecycle correctly
*/
public void businessMethod() {
- if (!this.inited)
+ if (!this.inited) {
throw new RuntimeException("Factory didn't call afterPropertiesSet() on MustBeInitialized object");
+ }
}
} | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/Pet.java | @@ -39,12 +39,18 @@ public String toString() {
@Override
public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
final Pet ... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-context-support/src/test/java/org/springframework/cache/caffeine/CaffeineCacheManagerTests.java | @@ -178,14 +178,11 @@ public void setCacheNameNullRestoreDynamicMode() {
@Test
public void cacheLoaderUseLoadingCache() {
CaffeineCacheManager cm = new CaffeineCacheManager("c1");
- cm.setCacheLoader(new CacheLoader<Object, Object>() {
- @Override
- public Object load(Object key) throws Exception {
- if ... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-context-support/src/test/java/org/springframework/mail/javamail/JavaMailSenderTests.java | @@ -182,12 +182,9 @@ public void javaMailSenderWithMimeMessagePreparator() {
final List<Message> messages = new ArrayList<>();
- MimeMessagePreparator preparator = new MimeMessagePreparator() {
- @Override
- public void prepare(MimeMessage mimeMessage) throws MessagingException {
- mimeMessage.setRecipie... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2021 the original author or authors.
+ * Copyright 2002-2022 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.
@@ -557,12 +557,7 @@ class TestBeanAdvisor exte... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-context/src/test/java/org/springframework/aop/framework/AbstractAopProxyTests.java | @@ -372,17 +372,14 @@ public void testNoContext() throws Throwable {
private void testContext(final boolean context) throws Throwable {
final String s = "foo";
// Test return value
- MethodInterceptor mi = new MethodInterceptor() {
- @Override
- public Object invoke(MethodInvocation invocation) throws Thro... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-context/src/test/java/org/springframework/aop/framework/JdkDynamicProxyTests.java | @@ -198,10 +198,16 @@ public String getName() {
@Override
public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-context/src/test/java/org/springframework/aop/framework/ProxyFactoryBeanTests.java | @@ -304,11 +304,8 @@ public void testCanGetFactoryReferenceAndManipulate() {
final Exception ex = new UnsupportedOperationException("invoke");
// Add evil interceptor to head of list
- config.addAdvice(0, new MethodInterceptor() {
- @Override
- public Object invoke(MethodInvocation invocation) throws Throw... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-context/src/test/java/org/springframework/aop/framework/autoproxy/AutoProxyCreatorTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2021 the original author or authors.
+ * Copyright 2002-2022 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.
@@ -17,8 +17,6 @@
package org.springframework.... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-context/src/test/java/org/springframework/aop/target/CommonsPool2TargetSourceTests.java | @@ -158,8 +158,8 @@ void testHitMaxSize() throws Exception {
pooledInstances[9] = targetSource.getTarget();
// release all objects
- for (int i = 0; i < pooledInstances.length; i++) {
- targetSource.releaseTarget(pooledInstances[i]);
+ for (Object element : pooledInstances) {
+ targetSource.releaseTarget(... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-context/src/test/java/org/springframework/context/LifecycleContextBean.java | @@ -33,21 +33,24 @@ public class LifecycleContextBean extends LifecycleBean implements ApplicationCo
@Override
public void setBeanFactory(BeanFactory beanFactory) {
super.setBeanFactory(beanFactory);
- if (this.owningContext != null)
+ if (this.owningContext != null) {
throw new RuntimeException("Factory c... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-context/src/test/java/org/springframework/context/annotation/AnnotationConfigApplicationContextTests.java | @@ -544,19 +544,24 @@ public int hashCode() {
@Override
public boolean equals(Object obj) {
- if (this == obj)
+ if (this == obj) {
return true;
- if (obj == null)
+ }
+ if (obj == null) {
return false;
- if (getClass() != obj.getClass())
+ }
+ if (getClass() != obj.getClass()) {
return false;... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-context/src/test/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessorTests.java | @@ -215,12 +215,7 @@ public void testResourceInjectionWithResolvableDependencyType() {
bf.registerBeanDefinition("testBean4", tbd);
bf.registerResolvableDependency(BeanFactory.class, bf);
- bf.registerResolvableDependency(INestedTestBean.class, new ObjectFactory<Object>() {
- @Override
- public Object getO... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-context/src/test/java/org/springframework/context/annotation/ConfigurationClassAndBFPPTests.java | @@ -18,10 +18,8 @@
import org.junit.jupiter.api.Test;
-import org.springframework.beans.BeansException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
-import org.springframework.beans.factory.config.ConfigurableListableBea... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-context/src/test/java/org/springframework/context/annotation/ConfigurationClassWithConditionTests.java | @@ -291,22 +291,28 @@ public ExampleBean bean1() {
static class ImportsNotCreated {
static {
- if (true) throw new RuntimeException();
+ if (true) {
+ throw new RuntimeException();
+ }
}
}
@Configuration
static class ConfigurationNotCreated {
static {
- if (true) throw new RuntimeExcep... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-context/src/test/java/org/springframework/context/annotation/configuration/ConfigurationClassAspectIntegrationTests.java | @@ -136,10 +136,7 @@ public static class Application {
@Bean
Runnable fromInnerClass() {
- return new Runnable() {
- @Override
- public void run() {
- }
+ return () -> {
};
}
| true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-context/src/test/java/org/springframework/context/annotation/configuration/ConfigurationClassProcessingTests.java | @@ -39,7 +39,6 @@
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
import org.springframework.beans.factory.config.BeanPostProcessor;
-import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-context/src/test/java/org/springframework/context/event/ApplicationContextEventTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2020 the original author or authors.
+ * Copyright 2002-2022 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.
@@ -20,7 +20,6 @@
import java.util.HashSet;
i... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-context/src/test/java/org/springframework/context/event/PayloadApplicationEventTests.java | @@ -65,7 +65,7 @@ public void testProgrammaticEventListener() {
public void testProgrammaticPayloadListener() {
List<String> events = new ArrayList<>();
ApplicationListener<PayloadApplicationEvent<String>> listener = ApplicationListener.forPayload(events::add);
- ApplicationListener<PayloadApplicationEvent<Int... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-context/src/test/java/org/springframework/context/event/test/AbstractIdentifiable.java | @@ -36,8 +36,12 @@ public String getId() {
@Override
public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
AbstractIdenti... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-context/src/test/java/org/springframework/context/event/test/GenericEventPojo.java | @@ -38,8 +38,12 @@ public ResolvableType getResolvableType() {
@Override
public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-context/src/test/java/org/springframework/context/event/test/IdentifiableApplicationEvent.java | @@ -50,8 +50,12 @@ public String getId() {
@Override
public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
IdentifiableAp... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-context/src/test/java/org/springframework/context/support/ConversionServiceFactoryBeanTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2019 the original author or authors.
+ * Copyright 2002-2022 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.
@@ -99,8 +99,7 @@ public void createDefaultConv... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-context/src/test/java/org/springframework/format/number/NumberFormattingTests.java | @@ -30,7 +30,6 @@
import org.springframework.format.annotation.NumberFormat;
import org.springframework.format.annotation.NumberFormat.Style;
import org.springframework.format.support.FormattingConversionService;
-import org.springframework.util.StringValueResolver;
import org.springframework.validation.DataBinder;... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-context/src/test/java/org/springframework/format/support/FormattingConversionServiceFactoryBeanTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2019 the original author or authors.
+ * Copyright 2002-2022 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.
@@ -189,24 +189,14 @@ public Set<Class<?>> getF... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-context/src/test/java/org/springframework/jmx/export/MBeanExporterOperationsTests.java | @@ -27,7 +27,6 @@
import org.springframework.jmx.AbstractMBeanServerTests;
import org.springframework.jmx.JmxTestBean;
-import org.springframework.jmx.export.naming.ObjectNamingStrategy;
import org.springframework.jmx.support.ObjectNameManager;
import static org.assertj.core.api.Assertions.assertThat;
@@ -74,12... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-context/src/test/java/org/springframework/jmx/export/MBeanExporterTests.java | @@ -90,11 +90,8 @@ void testRegisterNullNotificationListenerType() throws Exception {
@Test
void testRegisterNotificationListenerForNonExistentMBean() throws Exception {
Map<String, NotificationListener> listeners = new HashMap<>();
- NotificationListener dummyListener = new NotificationListener() {
- @Overri... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-context/src/test/java/org/springframework/jmx/export/NotificationListenerTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2020 the original author or authors.
+ * Copyright 2002-2022 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.
@@ -23,7 +23,6 @@
import javax.management.Attr... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-context/src/test/java/org/springframework/jmx/export/assembler/AbstractJmxAssemblerTests.java | @@ -83,9 +83,9 @@ public void testGetMBeanAttributeInfo() throws Exception {
MBeanAttributeInfo[] inf = info.getAttributes();
assertThat(inf).as("Invalid number of Attributes returned").hasSize(getExpectedAttributeCount());
- for (int x = 0; x < inf.length; x++) {
- assertThat(inf[x]).as("MBeanAttributeInfo ... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-context/src/test/java/org/springframework/scheduling/annotation/AsyncExecutionTests.java | @@ -27,7 +27,6 @@
import java.util.concurrent.TimeUnit;
import org.aopalliance.intercept.MethodInterceptor;
-import org.aopalliance.intercept.MethodInvocation;
import org.awaitility.Awaitility;
import org.junit.jupiter.api.Test;
@@ -613,16 +612,13 @@ public static class DynamicAsyncInterfaceBean implements Fact... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-context/src/test/java/org/springframework/scheduling/config/ExecutorBeanDefinitionParserTests.java | @@ -16,7 +16,6 @@
package org.springframework.scheduling.config;
-import java.util.concurrent.Callable;
import java.util.concurrent.Executor;
import java.util.concurrent.FutureTask;
@@ -59,12 +58,7 @@ public void defaultExecutor() throws Exception {
assertThat(getKeepAliveSeconds(executor)).isEqualTo(60);
... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-context/src/test/java/org/springframework/scripting/groovy/MyBytecodeProcessor.java | @@ -26,7 +26,7 @@
*/
public class MyBytecodeProcessor implements BytecodeProcessor {
- public final Set<String> processed = new HashSet<String>();
+ public final Set<String> processed = new HashSet<>();
@Override
public byte[] processBytecode(String name, byte[] original) { | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-context/src/test/java/org/springframework/ui/ModelMapTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2019 the original author or authors.
+ * Copyright 2002-2022 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.
@@ -17,8 +17,6 @@
package org.springframework.... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-context/src/test/java/test/mixin/LockMixin.java | @@ -61,8 +61,9 @@ public boolean locked() {
*/
@Override
public Object invoke(MethodInvocation invocation) throws Throwable {
- if (locked() && invocation.getMethod().getName().indexOf("set") == 0)
+ if (locked() && invocation.getMethod().getName().indexOf("set") == 0) {
throw new LockedException();
+ }
... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-context/src/testFixtures/java/org/springframework/context/testfixture/SimpleMapScope.java | @@ -19,7 +19,6 @@
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
-import java.util.Iterator;
import java.util.List;
import java.util.Map;
@@ -75,8 +74,7 @@ public Object resolveContextualObject(String key) {
}
public void close() {
- for (Iterator<Runnable> it = this.ca... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-core/src/test/java/org/springframework/core/annotation/MergedAnnotationsTests.java | @@ -1700,7 +1700,7 @@ void synthesizeFromMapWithNestedMap() throws Exception {
assertThat(componentScan).isNotNull();
assertThat(componentScan.value().pattern()).isEqualTo("*Foo");
Map<String, Object> map = MergedAnnotation.from(componentScan).asMap(
- annotation -> new LinkedHashMap<String, Object>(),
+ ... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-core/src/test/java/org/springframework/core/convert/converter/ConvertingComparatorTests.java | @@ -140,7 +140,7 @@ public int compare(Integer o1, Integer o2) {
assertThat(o2).isInstanceOf(Integer.class);
this.called = true;
return super.compare(o1, o2);
- };
+ }
public void assertCalled() {
assertThat(this.called).isTrue(); | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-core/src/test/java/org/springframework/util/AutoPopulatingListTests.java | @@ -48,7 +48,7 @@ void withElementFactory() throws Exception {
@Test
void withElementFactoryAndUserSuppliedBackingList() throws Exception {
- doTestWithElementFactory(new AutoPopulatingList<Object>(new ArrayList<>(), new MockElementFactory()));
+ doTestWithElementFactory(new AutoPopulatingList<>(new ArrayList<>... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-core/src/test/java/org/springframework/util/ConcurrentReferenceHashMapTests.java | @@ -51,7 +51,7 @@
*/
class ConcurrentReferenceHashMapTests {
- private static final Comparator<? super String> NULL_SAFE_STRING_SORT = new NullSafeComparator<String>(
+ private static final Comparator<? super String> NULL_SAFE_STRING_SORT = new NullSafeComparator<>(
new ComparableComparator<String>(), true);
... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-core/src/test/java/org/springframework/util/ReflectionUtilsTests.java | @@ -391,8 +391,8 @@ void bar(String s) throws IllegalArgumentException {
int add(int... args) {
int sum = 0;
- for (int i = 0; i < args.length; i++) {
- sum += args[i];
+ for (int arg : args) {
+ sum += arg;
}
return sum;
} | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-core/src/test/java/org/springframework/util/StringUtilsTests.java | @@ -620,14 +620,8 @@ void commaDelimitedListToStringArrayEmptyStrings() {
}
private void doTestCommaDelimitedListToStringArrayLegalMatch(String[] components) {
- StringBuilder sb = new StringBuilder();
- for (int i = 0; i < components.length; i++) {
- if (i != 0) {
- sb.append(',');
- }
- sb.append(com... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-jdbc/src/test/java/org/springframework/jdbc/core/AbstractRowMapperTests.java | @@ -107,7 +107,7 @@ protected void verifyPerson(EmailPerson person) {
}
- protected enum MockType {ONE, TWO, THREE};
+ protected enum MockType {ONE, TWO, THREE}
protected static class Mock { | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-jdbc/src/test/java/org/springframework/jdbc/core/JdbcTemplateQueryTests.java | @@ -22,7 +22,6 @@
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
-import java.sql.SQLException;
import java.sql.Statement;
import java.util.List;
import java.util.Map;
@@ -160,12 +159,7 @@ public void testQueryForObjectWithRowMapper() throws Exception {
String ... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-jdbc/src/test/java/org/springframework/jdbc/core/JdbcTemplateTests.java | @@ -152,12 +152,12 @@ public void testBogusUpdate() throws Exception {
@Test
public void testStringsWithStaticSql() throws Exception {
- doTestStrings(null, null, null, null, (template, sql, rch) -> template.query(sql, rch));
+ doTestStrings(null, null, null, null, JdbcTemplate::query);
}
@Test
public v... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-jdbc/src/test/java/org/springframework/jdbc/core/namedparam/NamedParameterQueryTests.java | @@ -20,7 +20,6 @@
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
-import java.sql.SQLException;
import java.sql.Types;
import java.util.ArrayList;
import java.util.Arrays;
@@ -176,12 +175,7 @@ public void testQueryForObjectWithParamMapAndRowMapper() throws Excepti... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-jdbc/src/test/java/org/springframework/jdbc/object/StoredProcedureTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2019 the original author or authors.
+ * Copyright 2002-2022 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.
@@ -46,9 +46,7 @@
import org.springframework.j... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-jdbc/src/test/java/org/springframework/jdbc/support/SQLErrorCodeSQLExceptionTranslatorTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2020 the original author or authors.
+ * Copyright 2002-2022 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.
@@ -87,7 +87,7 @@ public void errorCodeTranslat... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-jms/src/test/java/org/springframework/jms/core/JmsTemplateTests.java | @@ -200,12 +200,9 @@ void testSessionCallback() throws Exception {
JmsTemplate template = createTemplate();
template.setConnectionFactory(this.connectionFactory);
- template.execute(new SessionCallback<Void>() {
- @Override
- public Void doInJms(Session session) throws JMSException {
- session.getTransa... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-jms/src/test/java/org/springframework/jms/listener/SimpleMessageListenerContainerTests.java | @@ -31,7 +31,6 @@
import org.junit.jupiter.api.Test;
import org.springframework.context.support.GenericApplicationContext;
-import org.springframework.core.task.TaskExecutor;
import org.springframework.jms.StubQueue;
import org.springframework.lang.Nullable;
import org.springframework.util.ErrorHandler;
@@ -183,... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-jms/src/test/java/org/springframework/jms/listener/adapter/MessagingMessageListenerAdapterTests.java | @@ -432,8 +432,8 @@ public void wrongParam(Integer i) {
}
}
- interface Summary {};
- interface Full extends Summary {};
+ interface Summary {}
+ interface Full extends Summary {}
@SuppressWarnings("unused")
private static class SampleResponse { | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-jms/src/test/java/org/springframework/jms/support/SimpleMessageConverterTests.java | @@ -30,8 +30,6 @@
import javax.jms.TextMessage;
import org.junit.jupiter.api.Test;
-import org.mockito.invocation.InvocationOnMock;
-import org.mockito.stubbing.Answer;
import org.springframework.jms.support.converter.MessageConversionException;
import org.springframework.jms.support.converter.SimpleMessageConv... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-jms/src/test/java/org/springframework/jms/support/converter/MappingJackson2MessageConverterTests.java | @@ -300,9 +300,9 @@ public int hashCode() {
}
- private interface Summary {};
+ private interface Summary {}
- private interface Full extends Summary {};
+ private interface Full extends Summary {}
@SuppressWarnings("unused") | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-messaging/src/test/java/org/springframework/messaging/converter/MappingJackson2MessageConverterTests.java | @@ -319,9 +319,9 @@ public void setArray(String[] array) {
}
- public interface MyJacksonView1 {};
+ public interface MyJacksonView1 {}
- public interface MyJacksonView2 {};
+ public interface MyJacksonView2 {}
public static class JacksonViewBean { | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-messaging/src/test/java/org/springframework/messaging/core/GenericMessagingTemplateTests.java | @@ -29,7 +29,6 @@
import org.springframework.messaging.MessageDeliveryException;
import org.springframework.messaging.MessageHandler;
import org.springframework.messaging.MessageHeaders;
-import org.springframework.messaging.MessagingException;
import org.springframework.messaging.StubMessageChannel;
import org.sp... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-messaging/src/test/java/org/springframework/messaging/handler/annotation/reactive/MessageMappingMessageHandlerTests.java | @@ -151,7 +151,7 @@ private MessageMappingMessageHandler initMesssageHandler() {
}
private Message<?> message(String destination, String... content) {
- Flux<DataBuffer> payload = Flux.fromIterable(Arrays.asList(content)).map(parts -> toDataBuffer(parts));
+ Flux<DataBuffer> payload = Flux.fromIterable(Arrays.a... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-messaging/src/test/java/org/springframework/messaging/handler/annotation/support/DefaultMessageHandlerMethodFactoryTests.java | @@ -28,7 +28,6 @@
import org.springframework.beans.factory.support.StaticListableBeanFactory;
import org.springframework.core.MethodParameter;
-import org.springframework.core.convert.converter.Converter;
import org.springframework.core.convert.support.GenericConversionService;
import org.springframework.messagin... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-messaging/src/test/java/org/springframework/messaging/simp/SimpAttributesContextHolderTests.java | @@ -131,8 +131,7 @@ public void currentAttributes() {
@Test
public void currentAttributesNone() {
- assertThatIllegalStateException().isThrownBy(() ->
- SimpAttributesContextHolder.currentAttributes())
+ assertThatIllegalStateException().isThrownBy(SimpAttributesContextHolder::currentAttributes)
.withMes... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-messaging/src/test/java/org/springframework/messaging/simp/annotation/support/SubscriptionMethodReturnValueHandlerTests.java | @@ -224,8 +224,8 @@ public JacksonViewBean getJsonView() {
}
- private interface MyJacksonView1 {};
- private interface MyJacksonView2 {};
+ private interface MyJacksonView1 {}
+ private interface MyJacksonView2 {}
private static class JacksonViewBean {
| true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-messaging/src/test/java/org/springframework/messaging/simp/stomp/StompBrokerRelayMessageHandlerTests.java | @@ -19,7 +19,6 @@
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
-import java.util.concurrent.Callable;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
@@ -286,12 +285,7 @@ private Message<byte[]> message(StompCommand command, String sessionId, String... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-orm/src/test/java/org/springframework/orm/jpa/JpaTransactionManagerTests.java | @@ -32,7 +32,6 @@
import org.springframework.transaction.TransactionDefinition;
import org.springframework.transaction.TransactionStatus;
import org.springframework.transaction.TransactionSystemException;
-import org.springframework.transaction.support.TransactionCallback;
import org.springframework.transaction.sup... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-web/src/test/java/org/springframework/http/client/InterceptingClientHttpRequestFactoryTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2019 the original author or authors.
+ * Copyright 2002-2022 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.
@@ -72,13 +72,7 @@ public void basic() throws E... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-web/src/test/java/org/springframework/http/converter/xml/MappingJackson2XmlHttpMessageConverterTests.java | @@ -279,9 +279,9 @@ public void setArray(String[] array) {
}
- private interface MyJacksonView1 {};
+ private interface MyJacksonView1 {}
- private interface MyJacksonView2 {};
+ private interface MyJacksonView2 {}
@SuppressWarnings("unused") | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-web/src/test/java/org/springframework/web/bind/ServletRequestDataBinderTests.java | @@ -249,13 +249,13 @@ protected void doTestTony(PropertyValues pvs) throws Exception {
m.put("forname", "Tony");
m.put("surname", "Blair");
m.put("age", "50");
- for (int i = 0; i < ps.length; i++) {
- Object val = m.get(ps[i].getName());
+ for (PropertyValue element : ps) {
+ Object val = m.get(element.... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-web/src/test/java/org/springframework/web/context/request/async/DeferredResultTests.java | @@ -16,8 +16,6 @@
package org.springframework.web.context.request.async;
-import java.util.function.Consumer;
-
import org.junit.jupiter.api.Test;
import org.springframework.web.context.request.async.DeferredResult.DeferredResultHandler;
@@ -127,12 +125,7 @@ public void onError() throws Exception {
Deferred... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-web/src/test/java/org/springframework/web/context/request/async/WebAsyncManagerErrorTests.java | @@ -17,7 +17,6 @@
package org.springframework.web.context.request.async;
import java.util.concurrent.Callable;
-import java.util.function.Consumer;
import javax.servlet.AsyncEvent;
@@ -96,12 +95,7 @@ public void startCallableProcessingErrorAndResumeThroughCallback() throws Except
StubCallable callable = n... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-web/src/test/java/org/springframework/web/context/request/async/WebAsyncManagerTimeoutTests.java | @@ -97,12 +97,7 @@ public void startCallableProcessingTimeoutAndResumeThroughCallback() throws Exce
StubCallable callable = new StubCallable();
WebAsyncTask<Object> webAsyncTask = new WebAsyncTask<>(callable);
- webAsyncTask.onTimeout(new Callable<Object>() {
- @Override
- public Object call() throws Excep... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-web/src/test/java/org/springframework/web/filter/HiddenHttpMethodFilterTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2019 the original author or authors.
+ * Copyright 2002-2022 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.
@@ -20,8 +20,6 @@
import javax.servlet.Filte... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-web/src/test/java/org/springframework/web/method/annotation/ModelFactoryOrderingTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2019 the original author or authors.
+ * Copyright 2002-2022 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.
@@ -54,27 +54,24 @@
*
* @author Rossen Stoy... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-webflux/src/test/java/org/springframework/web/reactive/function/BodyExtractorsTests.java | @@ -111,7 +111,7 @@ public Map<String, Object> hints() {
return hints;
}
};
- this.hints = new HashMap<String, Object>();
+ this.hints = new HashMap<>();
}
| true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-webflux/src/test/java/org/springframework/web/reactive/function/server/RouterFunctionsTests.java | @@ -36,7 +36,6 @@
import org.springframework.web.server.ResponseStatusException;
import org.springframework.web.server.ServerWebExchange;
import org.springframework.web.server.WebFilter;
-import org.springframework.web.server.WebFilterChain;
import org.springframework.web.testfixture.http.server.reactive.MockServer... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-webflux/src/test/java/org/springframework/web/reactive/resource/ResourceUrlProviderTests.java | @@ -164,7 +164,7 @@ void initializeOnCurrentContext() {
private Condition<PathPattern> pathPatternStringOf(String expected) {
- return new Condition<PathPattern>(
+ return new Condition<>(
actual -> actual != null && actual.getPatternString().equals(expected),
"Pattern %s", expected);
} | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-webmvc/src/test/java/org/springframework/context/LifecycleContextBean.java | @@ -33,21 +33,24 @@ public class LifecycleContextBean extends LifecycleBean implements ApplicationCo
@Override
public void setBeanFactory(BeanFactory beanFactory) {
super.setBeanFactory(beanFactory);
- if (this.owningContext != null)
+ if (this.owningContext != null) {
throw new RuntimeException("Factory c... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-webmvc/src/test/java/org/springframework/web/context/XmlWebApplicationContextTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2020 the original author or authors.
+ * Copyright 2002-2022 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.
@@ -25,9 +25,7 @@
import org.springframework.b... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-webmvc/src/test/java/org/springframework/web/context/support/HttpRequestHandlerTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2019 the original author or authors.
+ * Copyright 2002-2022 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.
@@ -20,8 +20,6 @@
import javax.servlet.Servl... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurationSupportExtensionTests.java | @@ -29,7 +29,6 @@
import org.springframework.beans.DirectFieldAccessor;
import org.springframework.beans.testfixture.beans.TestBean;
import org.springframework.core.Ordered;
-import org.springframework.core.convert.converter.Converter;
import org.springframework.core.io.FileSystemResourceLoader;
import org.springf... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-webmvc/src/test/java/org/springframework/web/servlet/function/DefaultEntityResponseBuilderTests.java | @@ -36,7 +36,6 @@
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
-import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-webmvc/src/test/java/org/springframework/web/servlet/function/DefaultRenderingResponseTests.java | @@ -20,7 +20,6 @@
import java.time.format.DateTimeFormatter;
import java.time.temporal.ChronoUnit;
import java.util.Collections;
-import java.util.List;
import java.util.Map;
import javax.servlet.http.Cookie;
@@ -29,7 +28,6 @@
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpS... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-webmvc/src/test/java/org/springframework/web/servlet/function/DefaultServerRequestTests.java | @@ -318,12 +318,7 @@ void session() {
@Test
void principal() {
MockHttpServletRequest servletRequest = PathPatternsTestUtils.initRequest("GET", "/", true);
- Principal principal = new Principal() {
- @Override
- public String getName() {
- return "foo";
- }
- };
+ Principal principal = () -> "foo";
... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-webmvc/src/test/java/org/springframework/web/servlet/function/DefaultServerResponseBuilderTests.java | @@ -39,7 +39,6 @@
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
-import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.StringHttpMessageConverter;
import org.springframework.http... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/SelectTagTests.java | @@ -22,7 +22,6 @@
import java.text.ParseException;
import java.util.ArrayList;
import java.util.Collections;
-import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
@@ -949,12 +948,7 @@ private void assertStringArray() throws JspException, DocumentException {
}
... | true |
Other | spring-projects | spring-framework | f8a5a8d7be6040e60c21107c14fc394e67e75e6b.json | Use modern language features in tests | spring-websocket/src/test/java/org/springframework/web/socket/messaging/DefaultSimpUserRegistryTests.java | @@ -28,7 +28,6 @@
import org.springframework.messaging.simp.SimpMessageHeaderAccessor;
import org.springframework.messaging.simp.SimpMessageType;
import org.springframework.messaging.simp.user.SimpSubscription;
-import org.springframework.messaging.simp.user.SimpSubscriptionMatcher;
import org.springframework.messa... | true |
Other | spring-projects | spring-framework | 5ad261228da962d21195e0995c30cc2bcbf302b8.json | Upgrade JDK 17 and JDK 18 versions in CI image | ci/images/get-jdk-url.sh | @@ -3,10 +3,10 @@ set -e
case "$1" in
java17)
- echo "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.1%2B12/OpenJDK17U-jdk_x64_linux_hotspot_17.0.1_12.tar.gz"
+ echo "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.2%2B8/OpenJDK17U-jdk_x64_linux_hotspot_1... | false |
Other | spring-projects | spring-framework | e702c22da45016cdb15cdc4b47fb361c5063c8b0.json | Upgrade Ubuntu version in CI image | ci/images/ci-image/Dockerfile | @@ -1,4 +1,4 @@
-FROM ubuntu:focal-20210827
+FROM ubuntu:focal-20220113
ADD setup.sh /setup.sh
ADD get-jdk-url.sh /get-jdk-url.sh | false |
Other | spring-projects | spring-framework | 4effca35b500fda26f1f7d8322bc622468e5e93a.json | Ignore Content-Type that is invalid (not concrete)
Closes gh-27957 | spring-web/src/main/java/org/springframework/http/server/ServletServerHttpRequest.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2021 the original author or authors.
+ * Copyright 2002-2022 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.
@@ -158,7 +158,9 @@ public HttpHeaders getHeade... | true |
Other | spring-projects | spring-framework | 4effca35b500fda26f1f7d8322bc622468e5e93a.json | Ignore Content-Type that is invalid (not concrete)
Closes gh-27957 | spring-web/src/test/java/org/springframework/http/server/ServletServerHttpRequestTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2021 the original author or authors.
+ * Copyright 2002-2022 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.
@@ -151,6 +151,13 @@ void getHeadersWithEmptyCo... | true |
Other | spring-projects | spring-framework | 8f9a1cdc0c2ab2bee112dddad00a94bb501a3181.json | Consider current date in "1W" cron expressions
Prior to this commit, the QuartzCronField::weekdayNearestTo would elapse
until the next month before checking if the current day matched.
After this commit, the current day is checked before we elapse until
the next month.
Closes gh-27966 | spring-context/src/main/java/org/springframework/scheduling/support/QuartzCronField.java | @@ -251,43 +251,46 @@ private static TemporalAdjuster lastDayWithOffset(int offset) {
private static TemporalAdjuster weekdayNearestTo(int dayOfMonth) {
return temporal -> {
int current = Type.DAY_OF_MONTH.get(temporal);
- int dayOfWeek = temporal.get(ChronoField.DAY_OF_WEEK);
+ DayOfWeek dayOfWeek = DayOf... | true |
Other | spring-projects | spring-framework | 8f9a1cdc0c2ab2bee112dddad00a94bb501a3181.json | Consider current date in "1W" cron expressions
Prior to this commit, the QuartzCronField::weekdayNearestTo would elapse
until the next month before checking if the current day matched.
After this commit, the current day is checked before we elapse until
the next month.
Closes gh-27966 | spring-context/src/test/java/org/springframework/scheduling/support/CronExpressionTests.java | @@ -16,20 +16,21 @@
package org.springframework.scheduling.support;
+import java.time.DayOfWeek;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.Year;
import java.time.ZoneId;
import java.time.ZonedDateTime;
-import java.time.temporal.ChronoField;
imp... | true |
Other | spring-projects | spring-framework | e3529453d1682257162fdfeaa0e3f0c12008a67e.json | Remove dependency management for groovy-test
groovy-test is no longer used in the build.
See gh-27945 | build.gradle | @@ -60,7 +60,6 @@ configure(allprojects) { project ->
entry 'groovy'
entry 'groovy-jsr223'
entry 'groovy-templates' // requires findbugs for warning-free compilation
- entry 'groovy-test'
entry 'groovy-xml'
}
| false |
Other | spring-projects | spring-framework | 62a3e414734b24d1801b34223df5faaae9e32b5f.json | Deprecate mutable methods of MethodParameter
Deprecate all mutation methods in `MethodParameter` in favor of factory
methods that return a new instance. Existing code that previously relied
on mutation has been updated to use the replacement methods.
Closes gh-23385 | spring-core/src/main/java/org/springframework/core/GenericTypeResolver.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2018 the original author or authors.
+ * Copyright 2002-2019 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.
@@ -57,12 +57,13 @@ private GenericTypeResolver... | true |
Other | spring-projects | spring-framework | 62a3e414734b24d1801b34223df5faaae9e32b5f.json | Deprecate mutable methods of MethodParameter
Deprecate all mutation methods in `MethodParameter` in favor of factory
methods that return a new instance. Existing code that previously relied
on mutation has been updated to use the replacement methods.
Closes gh-23385 | spring-core/src/main/java/org/springframework/core/MethodParameter.java | @@ -55,6 +55,7 @@
* @author Andy Clement
* @author Sam Brannen
* @author Sebastien Deleuze
+ * @author Phillip Webb
* @since 2.0
* @see org.springframework.core.annotation.SynthesizingMethodParameter
*/
@@ -76,6 +77,7 @@ public class MethodParameter {
@Nullable
Map<Integer, Integer> typeIndexesPerLevel;... | true |
Other | spring-projects | spring-framework | 62a3e414734b24d1801b34223df5faaae9e32b5f.json | Deprecate mutable methods of MethodParameter
Deprecate all mutation methods in `MethodParameter` in favor of factory
methods that return a new instance. Existing code that previously relied
on mutation has been updated to use the replacement methods.
Closes gh-23385 | spring-core/src/main/java/org/springframework/core/ResolvableType.java | @@ -1200,8 +1200,7 @@ public static ResolvableType forConstructorParameter(Constructor<?> constructor,
Class<?> implementationClass) {
Assert.notNull(constructor, "Constructor must not be null");
- MethodParameter methodParameter = new MethodParameter(constructor, parameterIndex);
- methodParameter.setContai... | true |
Other | spring-projects | spring-framework | 62a3e414734b24d1801b34223df5faaae9e32b5f.json | Deprecate mutable methods of MethodParameter
Deprecate all mutation methods in `MethodParameter` in favor of factory
methods that return a new instance. Existing code that previously relied
on mutation has been updated to use the replacement methods.
Closes gh-23385 | spring-core/src/main/java/org/springframework/core/convert/Property.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2018 the original author or authors.
+ * Copyright 2002-2019 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.
@@ -23,7 +23,6 @@
import java.util.LinkedHashM... | true |
Other | spring-projects | spring-framework | 62a3e414734b24d1801b34223df5faaae9e32b5f.json | Deprecate mutable methods of MethodParameter
Deprecate all mutation methods in `MethodParameter` in favor of factory
methods that return a new instance. Existing code that previously relied
on mutation has been updated to use the replacement methods.
Closes gh-23385 | spring-core/src/test/java/org/springframework/core/MethodParameterTests.java | @@ -32,9 +32,12 @@
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
/**
+ * Tests for {@link MethodParameter}.
+ *
* @author Arjen Poutsma
* @author Juergen Hoeller
* @author Sam Brannen
+ * @author Phillip Webb
*/
public class MethodParameterTests {
@@ -151,6 +154,7 @@ p... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.