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
4b1478d830f3cdbc4eb0d50d84f152d7900f30c3.json
Replace relevant code with lambda See gh-1454
spring-aop/src/main/java/org/springframework/aop/interceptor/AsyncExecutionAspectSupport.java
@@ -264,15 +264,12 @@ protected Executor getDefaultExecutor(@Nullable BeanFactory beanFactory) { @Nullable protected Object doSubmit(Callable<Object> task, AsyncTaskExecutor executor, Class<?> returnType) { if (CompletableFuture.class.isAssignableFrom(returnType)) { - return CompletableFuture.supplyAsync(new S...
true
Other
spring-projects
spring-framework
4b1478d830f3cdbc4eb0d50d84f152d7900f30c3.json
Replace relevant code with lambda See gh-1454
spring-aop/src/main/java/org/springframework/aop/interceptor/AsyncExecutionInterceptor.java
@@ -109,23 +109,20 @@ public Object invoke(final MethodInvocation invocation) throws Throwable { "No executor specified and no default executor set on AsyncExecutionInterceptor either"); } - Callable<Object> task = new Callable<Object>() { - @Override - public Object call() throws Exception { - try {...
true
Other
spring-projects
spring-framework
4b1478d830f3cdbc4eb0d50d84f152d7900f30c3.json
Replace relevant code with lambda See gh-1454
spring-beans/src/main/java/org/springframework/beans/ExtendedBeanInfo.java
@@ -139,12 +139,7 @@ private List<Method> findCandidateWriteMethods(MethodDescriptor[] methodDescript // Sort non-void returning write methods to guard against the ill effects of // non-deterministic sorting of methods returned from Class#getDeclaredMethods // under JDK 7. See http://bugs.sun.com/view_bug.do?b...
true
Other
spring-projects
spring-framework
4b1478d830f3cdbc4eb0d50d84f152d7900f30c3.json
Replace relevant code with lambda See gh-1454
spring-beans/src/main/java/org/springframework/beans/PropertyMatches.java
@@ -245,13 +245,10 @@ public FieldPropertyMatches(String propertyName, Class<?> beanClass, int maxDist private static String[] calculateMatches(final String propertyName, Class<?> beanClass, final int maxDistance) { final List<String> candidates = new ArrayList<>(); - ReflectionUtils.doWithFields(beanClass, ...
true
Other
spring-projects
spring-framework
4b1478d830f3cdbc4eb0d50d84f152d7900f30c3.json
Replace relevant code with lambda See gh-1454
spring-beans/src/main/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.java
@@ -239,20 +239,17 @@ public Constructor<?>[] determineCandidateConstructors(Class<?> beanClass, final // Let's check for lookup methods here.. if (!this.lookupMethodsChecked.contains(beanName)) { try { - ReflectionUtils.doWithMethods(beanClass, new ReflectionUtils.MethodCallback() { - @Override - ...
true
Other
spring-projects
spring-framework
4b1478d830f3cdbc4eb0d50d84f152d7900f30c3.json
Replace relevant code with lambda See gh-1454
spring-beans/src/main/java/org/springframework/beans/factory/annotation/InitDestroyAnnotationBeanPostProcessor.java
@@ -201,24 +201,21 @@ private LifecycleMetadata buildLifecycleMetadata(final Class<?> clazz) { final LinkedList<LifecycleElement> currInitMethods = new LinkedList<>(); final LinkedList<LifecycleElement> currDestroyMethods = new LinkedList<>(); - ReflectionUtils.doWithLocalMethods(targetClass, new Reflection...
true
Other
spring-projects
spring-framework
4b1478d830f3cdbc4eb0d50d84f152d7900f30c3.json
Replace relevant code with lambda See gh-1454
spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractAutowireCapableBeanFactory.java
@@ -877,20 +877,15 @@ class Holder { Class<?> value = null; } // Find the given factory method, taking into account that in the case of // @Bean methods, there may be parameters present. - ReflectionUtils.doWithMethods(fbClass, - new ReflectionUtils.MethodCallback() { - @Override - public void doWit...
true
Other
spring-projects
spring-framework
4b1478d830f3cdbc4eb0d50d84f152d7900f30c3.json
Replace relevant code with lambda See gh-1454
spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/JCacheInterceptor.java
@@ -45,15 +45,12 @@ public class JCacheInterceptor extends JCacheAspectSupport implements MethodInte public Object invoke(final MethodInvocation invocation) throws Throwable { Method method = invocation.getMethod(); - CacheOperationInvoker aopAllianceInvoker = new CacheOperationInvoker() { - @Override - pub...
true
Other
spring-projects
spring-framework
4b1478d830f3cdbc4eb0d50d84f152d7900f30c3.json
Replace relevant code with lambda See gh-1454
spring-context/src/main/java/org/springframework/cache/annotation/AnnotationCacheOperationSource.java
@@ -107,23 +107,12 @@ public AnnotationCacheOperationSource(Set<CacheAnnotationParser> annotationParse @Override protected Collection<CacheOperation> findCacheOperations(final Class<?> clazz) { - return determineCacheOperations(new CacheOperationProvider() { - @Override - public Collection<CacheOperation> ge...
true
Other
spring-projects
spring-framework
4b1478d830f3cdbc4eb0d50d84f152d7900f30c3.json
Replace relevant code with lambda See gh-1454
spring-context/src/main/java/org/springframework/cache/interceptor/CacheInterceptor.java
@@ -45,15 +45,12 @@ public class CacheInterceptor extends CacheAspectSupport implements MethodInterc public Object invoke(final MethodInvocation invocation) throws Throwable { Method method = invocation.getMethod(); - CacheOperationInvoker aopAllianceInvoker = new CacheOperationInvoker() { - @Override - pub...
true
Other
spring-projects
spring-framework
4b1478d830f3cdbc4eb0d50d84f152d7900f30c3.json
Replace relevant code with lambda See gh-1454
spring-context/src/main/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessor.java
@@ -351,72 +351,66 @@ private InjectionMetadata buildResourceMetadata(final Class<?> clazz) { final LinkedList<InjectionMetadata.InjectedElement> currElements = new LinkedList<>(); - ReflectionUtils.doWithLocalFields(targetClass, new ReflectionUtils.FieldCallback() { - @Override - public void doWith...
true
Other
spring-projects
spring-framework
4b1478d830f3cdbc4eb0d50d84f152d7900f30c3.json
Replace relevant code with lambda See gh-1454
spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassPostProcessor.java
@@ -280,13 +280,10 @@ else if (ConfigurationClassUtils.checkConfigurationClassCandidate(beanDef, this. } // Sort by previously determined @Order value, if applicable - Collections.sort(configCandidates, new Comparator<BeanDefinitionHolder>() { - @Override - public int compare(BeanDefinitionHolder bd1, Bean...
true
Other
spring-projects
spring-framework
4b1478d830f3cdbc4eb0d50d84f152d7900f30c3.json
Replace relevant code with lambda See gh-1454
spring-context/src/main/java/org/springframework/context/support/DefaultLifecycleProcessor.java
@@ -226,14 +226,11 @@ private void doStop(Map<String, ? extends Lifecycle> lifecycleBeans, final Strin logger.debug("Asking bean '" + beanName + "' of type [" + bean.getClass() + "] to stop"); } countDownBeanNames.add(beanName); - ((SmartLifecycle) bean).stop(new Runnable() { - @Overrid...
true
Other
spring-projects
spring-framework
4b1478d830f3cdbc4eb0d50d84f152d7900f30c3.json
Replace relevant code with lambda See gh-1454
spring-context/src/main/java/org/springframework/jmx/export/MBeanExporter.java
@@ -872,25 +872,15 @@ private ModelMBeanInfo getMBeanInfo(Object managedBean, String beanKey) throws J * certain internal classes from being registered automatically. */ private void autodetectBeans(final AutodetectCapableMBeanInfoAssembler assembler) { - autodetect(new AutodetectCallback() { - @Override - ...
true
Other
spring-projects
spring-framework
4b1478d830f3cdbc4eb0d50d84f152d7900f30c3.json
Replace relevant code with lambda See gh-1454
spring-core/src/main/java/org/springframework/core/convert/converter/ConvertingComparator.java
@@ -87,12 +87,7 @@ public int compare(S o1, S o2) { * @return a new {@link ConvertingComparator} instance */ public static <K, V> ConvertingComparator<Map.Entry<K, V>, K> mapEntryKeys(Comparator<K> comparator) { - return new ConvertingComparator<>(comparator, new Converter<Map.Entry<K, V>, K>() { - @Override...
true
Other
spring-projects
spring-framework
4b1478d830f3cdbc4eb0d50d84f152d7900f30c3.json
Replace relevant code with lambda See gh-1454
spring-core/src/main/java/org/springframework/core/env/AbstractPropertyResolver.java
@@ -226,12 +226,7 @@ private PropertyPlaceholderHelper createPlaceholderHelper(boolean ignoreUnresolv } private String doResolvePlaceholders(String text, PropertyPlaceholderHelper helper) { - return helper.replacePlaceholders(text, new PropertyPlaceholderHelper.PlaceholderResolver() { - @Override - public St...
true
Other
spring-projects
spring-framework
4b1478d830f3cdbc4eb0d50d84f152d7900f30c3.json
Replace relevant code with lambda See gh-1454
spring-core/src/main/java/org/springframework/util/PropertyPlaceholderHelper.java
@@ -108,12 +108,7 @@ public PropertyPlaceholderHelper(String placeholderPrefix, String placeholderSuf */ public String replacePlaceholders(String value, final Properties properties) { Assert.notNull(properties, "'properties' must not be null"); - return replacePlaceholders(value, new PlaceholderResolver() { - ...
true
Other
spring-projects
spring-framework
4b1478d830f3cdbc4eb0d50d84f152d7900f30c3.json
Replace relevant code with lambda See gh-1454
spring-core/src/main/java/org/springframework/util/ReflectionUtils.java
@@ -47,6 +47,12 @@ */ public abstract class ReflectionUtils { + /** + * Pre-built FieldFilter that matches all non-static, non-final fields. + */ + public static final FieldFilter COPYABLE_FIELDS = + field -> !(Modifier.isStatic(field.getModifiers()) || Modifier.isFinal(field.getModifiers())); + /** * Nam...
true
Other
spring-projects
spring-framework
4b1478d830f3cdbc4eb0d50d84f152d7900f30c3.json
Replace relevant code with lambda See gh-1454
spring-core/src/main/java/org/springframework/util/concurrent/CompletableToListenableFutureAdapter.java
@@ -53,18 +53,14 @@ public CompletableToListenableFutureAdapter(CompletionStage<T> completionStage) */ public CompletableToListenableFutureAdapter(CompletableFuture<T> completableFuture) { this.completableFuture = completableFuture; - this.completableFuture.handle(new BiFunction<T, Throwable, Object>() { - @...
true
Other
spring-projects
spring-framework
4b1478d830f3cdbc4eb0d50d84f152d7900f30c3.json
Replace relevant code with lambda See gh-1454
spring-core/src/main/java/org/springframework/util/concurrent/SettableListenableFuture.java
@@ -37,11 +37,8 @@ */ public class SettableListenableFuture<T> implements ListenableFuture<T> { - private static final Callable<Object> DUMMY_CALLABLE = new Callable<Object>() { - @Override - public Object call() throws Exception { - throw new IllegalStateException("Should never be called"); - } + private sta...
true
Other
spring-projects
spring-framework
4b1478d830f3cdbc4eb0d50d84f152d7900f30c3.json
Replace relevant code with lambda See gh-1454
spring-expression/src/main/java/org/springframework/expression/spel/ast/InlineList.java
@@ -137,17 +137,10 @@ public void generateCode(MethodVisitor mv, CodeFlow codeflow) { final String constantFieldName = "inlineList$" + codeflow.nextFieldId(); final String className = codeflow.getClassName(); - codeflow.registerNewField(new CodeFlow.FieldAdder() { - public void generateField(ClassWriter cw, ...
true
Other
spring-projects
spring-framework
4b1478d830f3cdbc4eb0d50d84f152d7900f30c3.json
Replace relevant code with lambda See gh-1454
spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectiveMethodResolver.java
@@ -121,25 +121,22 @@ public MethodExecutor resolve(EvaluationContext context, Object targetObject, St // Sort methods into a sensible order if (methods.size() > 1) { - Collections.sort(methods, new Comparator<Method>() { - @Override - public int compare(Method m1, Method m2) { - int m1pl = m1...
true
Other
spring-projects
spring-framework
4b1478d830f3cdbc4eb0d50d84f152d7900f30c3.json
Replace relevant code with lambda See gh-1454
spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectivePropertyAccessor.java
@@ -391,12 +391,7 @@ private Method findMethodForProperty(String[] methodSuffixes, String prefix, Cla */ private Method[] getSortedClassMethods(Class<?> clazz) { Method[] methods = clazz.getMethods(); - Arrays.sort(methods, new Comparator<Method>() { - @Override - public int compare(Method o1, Method o2) {...
true
Other
spring-projects
spring-framework
4b1478d830f3cdbc4eb0d50d84f152d7900f30c3.json
Replace relevant code with lambda See gh-1454
spring-jdbc/src/main/java/org/springframework/jdbc/config/SortedResourcesFactoryBean.java
@@ -77,15 +77,12 @@ protected Resource[] createInstance() throws Exception { for (String location : this.locations) { List<Resource> resources = new ArrayList<>( Arrays.asList(this.resourcePatternResolver.getResources(location))); - Collections.sort(resources, new Comparator<Resource>() { - @Override ...
true
Other
spring-projects
spring-framework
4b1478d830f3cdbc4eb0d50d84f152d7900f30c3.json
Replace relevant code with lambda See gh-1454
spring-jdbc/src/main/java/org/springframework/jdbc/core/support/JdbcBeanDefinitionReader.java
@@ -105,15 +105,12 @@ public void setJdbcTemplate(JdbcTemplate jdbcTemplate) { public void loadBeanDefinitions(String sql) { Assert.notNull(this.jdbcTemplate, "Not fully configured - specify DataSource or JdbcTemplate"); final Properties props = new Properties(); - this.jdbcTemplate.query(sql, new RowCallbackH...
true
Other
spring-projects
spring-framework
4b1478d830f3cdbc4eb0d50d84f152d7900f30c3.json
Replace relevant code with lambda See gh-1454
spring-messaging/src/main/java/org/springframework/messaging/simp/annotation/support/SimpAnnotationMethodMessageHandler.java
@@ -462,12 +462,7 @@ protected SimpMessageMappingInfo getMatchingMapping(SimpMessageMappingInfo mappi @Override protected Comparator<SimpMessageMappingInfo> getMappingComparator(final Message<?> message) { - return new Comparator<SimpMessageMappingInfo>() { - @Override - public int compare(SimpMessageMapping...
true
Other
spring-projects
spring-framework
4b1478d830f3cdbc4eb0d50d84f152d7900f30c3.json
Replace relevant code with lambda See gh-1454
spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/DefaultStompSession.java
@@ -535,12 +535,7 @@ private void initReceiptHandling() { Assert.notNull(getTaskScheduler(), "To track receipts, a TaskScheduler must be configured"); DefaultStompSession.this.receiptHandlers.put(this.receiptId, this); Date startTime = new Date(System.currentTimeMillis() + getReceiptTimeLimit()); - this.f...
true
Other
spring-projects
spring-framework
4b1478d830f3cdbc4eb0d50d84f152d7900f30c3.json
Replace relevant code with lambda See gh-1454
spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompBrokerRelayMessageHandler.java
@@ -585,13 +585,10 @@ public void afterConnected(TcpConnection<byte[]> connection) { logger.debug("TCP connection opened in session=" + getSessionId()); } this.tcpConnection = connection; - this.tcpConnection.onReadInactivity(new Runnable() { - @Override - public void run() { - if (tcpConnectio...
true
Other
spring-projects
spring-framework
4b1478d830f3cdbc4eb0d50d84f152d7900f30c3.json
Replace relevant code with lambda See gh-1454
spring-orm/src/main/java/org/springframework/orm/hibernate5/LocalSessionFactoryBuilder.java
@@ -384,12 +384,8 @@ private class BootstrapSessionFactoryInvocationHandler implements InvocationHand private final Future<SessionFactory> sessionFactoryFuture; public BootstrapSessionFactoryInvocationHandler(AsyncTaskExecutor bootstrapExecutor) { - this.sessionFactoryFuture = bootstrapExecutor.submit(new Cal...
true
Other
spring-projects
spring-framework
4b1478d830f3cdbc4eb0d50d84f152d7900f30c3.json
Replace relevant code with lambda See gh-1454
spring-orm/src/main/java/org/springframework/orm/jpa/AbstractEntityManagerFactoryBean.java
@@ -350,12 +350,7 @@ public final void afterPropertiesSet() throws PersistenceException { } if (this.bootstrapExecutor != null) { - this.nativeEntityManagerFactoryFuture = this.bootstrapExecutor.submit(new Callable<EntityManagerFactory>() { - @Override - public EntityManagerFactory call() { - return...
true
Other
spring-projects
spring-framework
4b1478d830f3cdbc4eb0d50d84f152d7900f30c3.json
Replace relevant code with lambda See gh-1454
spring-orm/src/main/java/org/springframework/orm/jpa/support/PersistenceAnnotationBeanPostProcessor.java
@@ -404,38 +404,32 @@ private InjectionMetadata buildPersistenceMetadata(final Class<?> clazz) { final LinkedList<InjectionMetadata.InjectedElement> currElements = new LinkedList<>(); - ReflectionUtils.doWithLocalFields(targetClass, new ReflectionUtils.FieldCallback() { - @Override - public void doW...
true
Other
spring-projects
spring-framework
4b1478d830f3cdbc4eb0d50d84f152d7900f30c3.json
Replace relevant code with lambda See gh-1454
spring-test/src/main/java/org/springframework/test/web/client/match/ContentRequestMatchers.java
@@ -70,13 +70,10 @@ public RequestMatcher contentType(String expectedContentType) { * Assert the request content type as a {@link MediaType}. */ public RequestMatcher contentType(final MediaType expectedContentType) { - return new RequestMatcher() { - @Override - public void match(ClientHttpRequest request...
true
Other
spring-projects
spring-framework
4b1478d830f3cdbc4eb0d50d84f152d7900f30c3.json
Replace relevant code with lambda See gh-1454
spring-test/src/main/java/org/springframework/test/web/client/match/MockRestRequestMatchers.java
@@ -16,7 +16,6 @@ package org.springframework.test.web.client.match; -import java.io.IOException; import java.net.URI; import java.util.List; import java.util.Map; @@ -55,11 +54,7 @@ public abstract class MockRestRequestMatchers { * Match to any request. */ public static RequestMatcher anything() { - r...
true
Other
spring-projects
spring-framework
4b1478d830f3cdbc4eb0d50d84f152d7900f30c3.json
Replace relevant code with lambda See gh-1454
spring-tx/src/main/java/org/springframework/jca/cci/core/CciTemplate.java
@@ -222,17 +222,13 @@ public <T> T execute(ConnectionCallback<T> action) throws DataAccessException { @Override public <T> T execute(final InteractionCallback<T> action) throws DataAccessException { Assert.notNull(action, "Callback object must not be null"); - return execute(new ConnectionCallback<T>() { - @O...
true
Other
spring-projects
spring-framework
4b1478d830f3cdbc4eb0d50d84f152d7900f30c3.json
Replace relevant code with lambda See gh-1454
spring-tx/src/main/java/org/springframework/jca/context/ResourceAdapterApplicationContext.java
@@ -59,12 +59,7 @@ protected void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactor beanFactory.registerResolvableDependency(BootstrapContext.class, this.bootstrapContext); // JCA WorkManager resolved lazily - may not be available. - beanFactory.registerResolvableDependency(WorkManager.class, n...
true
Other
spring-projects
spring-framework
4b1478d830f3cdbc4eb0d50d84f152d7900f30c3.json
Replace relevant code with lambda See gh-1454
spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAspectSupport.java
@@ -303,34 +303,26 @@ protected Object invokeWithinTransaction(Method method, @Nullable Class<?> targe else { // It's a CallbackPreferringPlatformTransactionManager: pass a TransactionCallback in. try { - Object result = ((CallbackPreferringPlatformTransactionManager) tm).execute(txAttr, - new Transa...
true
Other
spring-projects
spring-framework
4b1478d830f3cdbc4eb0d50d84f152d7900f30c3.json
Replace relevant code with lambda See gh-1454
spring-web/src/main/java/org/springframework/http/MediaType.java
@@ -290,6 +290,43 @@ public class MediaType extends MimeType implements Serializable { */ public final static String APPLICATION_PROBLEM_XML_VALUE = "application/problem+xml"; + /** + * Comparator used by {@link #sortByQualityValue(List)}. + */ + public static final Comparator<MediaType> QUALITY_VALUE_COMPARAT...
true
Other
spring-projects
spring-framework
4b1478d830f3cdbc4eb0d50d84f152d7900f30c3.json
Replace relevant code with lambda See gh-1454
spring-web/src/main/java/org/springframework/web/context/request/async/WebAsyncManager.java
@@ -107,12 +107,8 @@ public final class WebAsyncManager { public void setAsyncWebRequest(final AsyncWebRequest asyncWebRequest) { Assert.notNull(asyncWebRequest, "AsyncWebRequest must not be null"); this.asyncWebRequest = asyncWebRequest; - this.asyncWebRequest.addCompletionHandler(new Runnable() { - @Overri...
true
Other
spring-projects
spring-framework
4b1478d830f3cdbc4eb0d50d84f152d7900f30c3.json
Replace relevant code with lambda See gh-1454
spring-web/src/main/java/org/springframework/web/method/annotation/ExceptionHandlerMethodResolver.java
@@ -47,12 +47,8 @@ public class ExceptionHandlerMethodResolver { /** * A filter for selecting {@code @ExceptionHandler} methods. */ - public static final MethodFilter EXCEPTION_HANDLER_METHODS = new MethodFilter() { - @Override - public boolean matches(Method method) { - return (AnnotationUtils.findAnnotati...
true
Other
spring-projects
spring-framework
4b1478d830f3cdbc4eb0d50d84f152d7900f30c3.json
Replace relevant code with lambda See gh-1454
spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/MvcUriComponentsBuilder.java
@@ -470,13 +470,10 @@ private static String getMethodRequestMapping(Method method) { } private static Method getMethod(Class<?> controllerType, final String methodName, final Object... args) { - MethodFilter selector = new MethodFilter() { - @Override - public boolean matches(Method method) { - String nam...
true
Other
spring-projects
spring-framework
4b1478d830f3cdbc4eb0d50d84f152d7900f30c3.json
Replace relevant code with lambda See gh-1454
spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerAdapter.java
@@ -117,6 +117,19 @@ public class RequestMappingHandlerAdapter extends AbstractHandlerMethodAdapter implements BeanFactoryAware, InitializingBean { + /** + * MethodFilter that matches {@link InitBinder @InitBinder} methods. + */ + public static final MethodFilter INIT_BINDER_METHODS = + method -> AnnotationUt...
true
Other
spring-projects
spring-framework
4b1478d830f3cdbc4eb0d50d84f152d7900f30c3.json
Replace relevant code with lambda See gh-1454
spring-websocket/src/main/java/org/springframework/web/socket/client/jetty/JettyWebSocketClient.java
@@ -170,13 +170,10 @@ public ListenableFuture<WebSocketSession> doHandshakeInternal(WebSocketHandler w final JettyWebSocketSession wsSession = new JettyWebSocketSession(attributes, user); final JettyWebSocketHandlerAdapter listener = new JettyWebSocketHandlerAdapter(wsHandler, wsSession); - Callable<WebSocketS...
true
Other
spring-projects
spring-framework
4b1478d830f3cdbc4eb0d50d84f152d7900f30c3.json
Replace relevant code with lambda See gh-1454
spring-websocket/src/main/java/org/springframework/web/socket/client/standard/AnnotatedEndpointConnectionManager.java
@@ -99,20 +99,17 @@ public TaskExecutor getTaskExecutor() { @Override protected void openConnection() { - this.taskExecutor.execute(new Runnable() { - @Override - public void run() { - try { - if (logger.isInfoEnabled()) { - logger.info("Connecting to WebSocket at " + getUri()); - } - Obj...
true
Other
spring-projects
spring-framework
4b1478d830f3cdbc4eb0d50d84f152d7900f30c3.json
Replace relevant code with lambda See gh-1454
spring-websocket/src/main/java/org/springframework/web/socket/client/standard/EndpointConnectionManager.java
@@ -130,21 +130,18 @@ public TaskExecutor getTaskExecutor() { @Override protected void openConnection() { - this.taskExecutor.execute(new Runnable() { - @Override - public void run() { - try { - if (logger.isInfoEnabled()) { - logger.info("Connecting to WebSocket at " + getUri()); - } - E...
true
Other
spring-projects
spring-framework
4b1478d830f3cdbc4eb0d50d84f152d7900f30c3.json
Replace relevant code with lambda See gh-1454
spring-websocket/src/main/java/org/springframework/web/socket/client/standard/StandardWebSocketClient.java
@@ -144,12 +144,9 @@ protected ListenableFuture<WebSocketSession> doHandshakeInternal(WebSocketHandle final Endpoint endpoint = new StandardWebSocketHandlerAdapter(webSocketHandler, session); - Callable<WebSocketSession> connectTask = new Callable<WebSocketSession>() { - @Override - public WebSocketSession ...
true
Other
spring-projects
spring-framework
4b1478d830f3cdbc4eb0d50d84f152d7900f30c3.json
Replace relevant code with lambda See gh-1454
spring-websocket/src/main/java/org/springframework/web/socket/config/WebSocketMessageBrokerStats.java
@@ -110,12 +110,9 @@ public void setSockJsTaskScheduler(ThreadPoolTaskScheduler sockJsTaskScheduler) @Nullable private ScheduledFuture<?> initLoggingTask(long initialDelay) { if (logger.isInfoEnabled() && this.loggingPeriod > 0) { - return this.sockJsTaskScheduler.scheduleAtFixedRate(new Runnable() { - @Ove...
true
Other
spring-projects
spring-framework
4b1478d830f3cdbc4eb0d50d84f152d7900f30c3.json
Replace relevant code with lambda See gh-1454
spring-websocket/src/main/java/org/springframework/web/socket/messaging/WebSocketStompClient.java
@@ -401,21 +401,18 @@ private void updateLastWriteTime() { public void onReadInactivity(final Runnable runnable, final long duration) { Assert.state(getTaskScheduler() != null, "No TaskScheduler configured"); this.lastReadTime = System.currentTimeMillis(); - this.inactivityTasks.add(getTaskScheduler().sche...
true
Other
spring-projects
spring-framework
4b1478d830f3cdbc4eb0d50d84f152d7900f30c3.json
Replace relevant code with lambda See gh-1454
spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/AbstractClientSockJsSession.java
@@ -116,12 +116,7 @@ public WebSocketHandler getWebSocketHandler() { * request. */ Runnable getTimeoutTask() { - return new Runnable() { - @Override - public void run() { - closeInternal(new CloseStatus(2007, "Transport timed out")); - } - }; + return () -> closeInternal(new CloseStatus(2007, "Trans...
true
Other
spring-projects
spring-framework
4b1478d830f3cdbc4eb0d50d84f152d7900f30c3.json
Replace relevant code with lambda See gh-1454
spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/RestTemplateXhrTransport.java
@@ -99,35 +99,32 @@ protected void connectInternal(final TransportRequest transportRequest, final We final URI receiveUrl, final HttpHeaders handshakeHeaders, final XhrClientSockJsSession session, final SettableListenableFuture<WebSocketSession> connectFuture) { - getTaskExecutor().execute(new Runnable() { -...
true
Other
spring-projects
spring-framework
4b1478d830f3cdbc4eb0d50d84f152d7900f30c3.json
Replace relevant code with lambda See gh-1454
spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/TransportHandlingSockJsService.java
@@ -368,27 +368,24 @@ private void scheduleSessionTask() { if (this.sessionCleanupTask != null) { return; } - this.sessionCleanupTask = getTaskScheduler().scheduleAtFixedRate(new Runnable() { - @Override - public void run() { - List<String> removedIds = new ArrayList<>(); - for (SockJsSessi...
true
Other
spring-projects
spring-framework
1f0d107d37d6418f66a8c9fbab5bd2932a252e47.json
Enable trailing slash matching by default This commit enables trailing slash matching in `PathPatternParser` by default - this mirrors the default configuration in `PathMatcher` implementations in MVC.
spring-web/src/main/java/org/springframework/web/util/pattern/PathPatternParser.java
@@ -33,7 +33,7 @@ public class PathPatternParser { // Whether the PathPatterns produced by the parser will allow patterns that don't // have a trailing slash to match paths that may or may not have a trailing slash. - private boolean matchOptionalTrailingSlash = false; + private boolean matchOptionalTrailingSlas...
false
Other
spring-projects
spring-framework
2efa06237a2b22d7f54e48a6b407cdc75fac7acf.json
Use Map#forEach instead of Map#entrySet#forEach See gh-1449
spring-beans/src/main/java/org/springframework/beans/factory/BeanFactoryUtils.java
@@ -265,10 +265,10 @@ public static <T> Map<String, T> beansOfTypeIncludingAncestors(ListableBeanFacto if (hbf.getParentBeanFactory() instanceof ListableBeanFactory) { Map<String, T> parentResult = beansOfTypeIncludingAncestors( (ListableBeanFactory) hbf.getParentBeanFactory(), type); - parentResult....
true
Other
spring-projects
spring-framework
2efa06237a2b22d7f54e48a6b407cdc75fac7acf.json
Use Map#forEach instead of Map#entrySet#forEach See gh-1449
spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanFactory.java
@@ -1187,12 +1187,11 @@ protected void registerCustomEditors(PropertyEditorRegistry registry) { } } if (!this.customEditors.isEmpty()) { - this.customEditors.entrySet().forEach(entry -> { - Class<?> requiredType = entry.getKey(); - Class<? extends PropertyEditor> editorClass = entry.getValue(); - r...
true
Other
spring-projects
spring-framework
2efa06237a2b22d7f54e48a6b407cdc75fac7acf.json
Use Map#forEach instead of Map#entrySet#forEach See gh-1449
spring-context/src/main/java/org/springframework/validation/support/BindingAwareConcurrentModel.java
@@ -48,7 +48,7 @@ public Object put(String key, Object value) { @Override public void putAll(Map<? extends String, ?> map) { - map.entrySet().forEach(e -> removeBindingResultIfNecessary(e.getKey(), e.getValue())); + map.forEach(this::removeBindingResultIfNecessary); super.putAll(map); }
true
Other
spring-projects
spring-framework
2efa06237a2b22d7f54e48a6b407cdc75fac7acf.json
Use Map#forEach instead of Map#entrySet#forEach See gh-1449
spring-core/src/main/java/org/springframework/util/LinkedMultiValueMap.java
@@ -195,8 +195,7 @@ public Set<Entry<K, List<V>>> entrySet() { */ public LinkedMultiValueMap<K, V> deepCopy() { LinkedMultiValueMap<K, V> copy = new LinkedMultiValueMap<>(this.targetMap.size()); - this.targetMap.entrySet().forEach(entry -> - copy.put(entry.getKey(), new LinkedList<>(entry.getValue()))); + ...
true
Other
spring-projects
spring-framework
2efa06237a2b22d7f54e48a6b407cdc75fac7acf.json
Use Map#forEach instead of Map#entrySet#forEach See gh-1449
spring-web/src/main/java/org/springframework/web/util/UriUtils.java
@@ -194,9 +194,9 @@ public static String encode(String source, Charset charset) { */ public static Map<String, String> encodeUriVariables(Map<String, ?> uriVariables) { Map<String, String> result = new LinkedHashMap<>(uriVariables.size()); - uriVariables.entrySet().stream().forEach(entry -> { - String string...
true
Other
spring-projects
spring-framework
2efa06237a2b22d7f54e48a6b407cdc75fac7acf.json
Use Map#forEach instead of Map#entrySet#forEach See gh-1449
spring-webflux/src/main/java/org/springframework/web/reactive/function/client/DefaultClientRequestBuilder.java
@@ -175,10 +175,11 @@ public Mono<Void> writeTo(ClientHttpRequest request, ExchangeStrategies strategi MultiValueMap<String, HttpCookie> requestCookies = request.getCookies(); if (!this.cookies.isEmpty()) { - this.cookies.forEach((name, values) -> values.forEach(value -> { - HttpCookie cookie = new Htt...
true
Other
spring-projects
spring-framework
2efa06237a2b22d7f54e48a6b407cdc75fac7acf.json
Use Map#forEach instead of Map#entrySet#forEach See gh-1449
spring-webflux/src/main/java/org/springframework/web/reactive/result/method/annotation/ControllerMethodResolver.java
@@ -224,10 +224,10 @@ public List<SyncInvocableHandlerMethod> getInitBinderMethods(HandlerMethod handl Class<?> handlerType = handlerMethod.getBeanType(); // Global methods first - this.initBinderAdviceCache.entrySet().forEach(entry -> { - if (entry.getKey().isApplicableToBeanType(handlerType)) { - Object...
true
Other
spring-projects
spring-framework
2efa06237a2b22d7f54e48a6b407cdc75fac7acf.json
Use Map#forEach instead of Map#entrySet#forEach See gh-1449
spring-webflux/src/main/java/org/springframework/web/reactive/socket/client/ReactorNettyWebSocketClient.java
@@ -93,7 +93,7 @@ public Mono<Void> execute(URI url, HttpHeaders headers, WebSocketHandler handler } private void setNettyHeaders(HttpHeaders headers, io.netty.handler.codec.http.HttpHeaders nettyHeaders) { - headers.keySet().stream().forEach(key -> nettyHeaders.set(key, headers.get(key))); + headers.forEach(ne...
true
Other
spring-projects
spring-framework
2efa06237a2b22d7f54e48a6b407cdc75fac7acf.json
Use Map#forEach instead of Map#entrySet#forEach See gh-1449
spring-webmvc/src/test/java/org/springframework/web/servlet/view/BaseViewTests.java
@@ -281,8 +281,8 @@ public void attributeCSVParsingIgoresTrailingComma() { */ @SuppressWarnings({ "rawtypes", "unchecked" }) private void checkContainsAll(Map expected, Map<String, Object> actual) { - expected.keySet().stream().forEach( - key -> assertEquals("Values for model key '" + key + "' must match", ex...
true
Other
spring-projects
spring-framework
2efa06237a2b22d7f54e48a6b407cdc75fac7acf.json
Use Map#forEach instead of Map#entrySet#forEach See gh-1449
spring-webmvc/src/test/java/org/springframework/web/servlet/view/InternalResourceViewTests.java
@@ -84,8 +84,9 @@ public int getMinorVersion() { view.render(model, request, response); assertEquals(url, response.getForwardedUrl()); - model.keySet().stream().forEach( - key -> assertEquals("Values for model key '" + key + "' must match", model.get(key), request.getAttribute(key)) + + model.forEach( + (...
true
Other
spring-projects
spring-framework
d5da823482134cc447a7023ad223a661cc50e348.json
Fix race condition for AsynchronousFileChannel This commit fixes an issue in the DataBufferUtils.write variant that takes a AsynchronousFileChannel. Issue: SPR-15798
spring-core/src/main/java/org/springframework/core/io/buffer/DataBufferUtils.java
@@ -517,7 +517,7 @@ public void failed(Throwable exc, AsynchronousFileChannel channel) { private final AtomicBoolean completed = new AtomicBoolean(); - private long position; + private final AtomicLong position; @Nullable private DataBuffer dataBuffer; @@ -526,7 +526,7 @@ public AsynchronousFileChannel...
true
Other
spring-projects
spring-framework
d5da823482134cc447a7023ad223a661cc50e348.json
Fix race condition for AsynchronousFileChannel This commit fixes an issue in the DataBufferUtils.write variant that takes a AsynchronousFileChannel. Issue: SPR-15798
spring-core/src/test/java/org/springframework/core/io/buffer/DataBufferUtilsTests.java
@@ -207,7 +207,6 @@ public void writeWritableByteChannel() throws Exception { } @Test - @Ignore // SPR-15798 public void writeAsynchronousFileChannel() throws Exception { DataBuffer foo = stringBuffer("foo"); DataBuffer bar = stringBuffer("bar");
true
Other
spring-projects
spring-framework
45e714ec1316633f336ca591d475b5a7d987358e.json
Add test case for SPR-15719
spring-test/src/test/java/org/springframework/test/web/client/SimpleRequestExpectationManagerTests.java
@@ -173,6 +173,17 @@ public void sequentialRequestsWithDifferentCount() throws Exception { this.manager.validateRequest(createRequest(GET, "/bar")); } + @Test // SPR-15719 + public void repeatedRequestsInSequentialOrder() throws Exception { + this.manager.expectRequest(times(2), requestTo("/foo")).andExpect(me...
false
Other
spring-projects
spring-framework
7e232f989ba5d947dc286104b44d0e9ce580a2af.json
Improve check for "Broken pipe" error message Issue: SPR-15802
spring-web/src/main/java/org/springframework/web/server/adapter/HttpWebHandlerAdapter.java
@@ -184,8 +184,10 @@ else if (disconnectedClientLogger.isDebugEnabled()) { } private boolean indicatesDisconnectedClient(Throwable ex) { - return ("Broken pipe".equalsIgnoreCase(NestedExceptionUtils.getMostSpecificCause(ex).getMessage()) || - DISCONNECTED_CLIENT_EXCEPTIONS.contains(ex.getClass().getSimpleNam...
true
Other
spring-projects
spring-framework
7e232f989ba5d947dc286104b44d0e9ce580a2af.json
Improve check for "Broken pipe" error message Issue: SPR-15802
spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/session/AbstractSockJsSession.java
@@ -361,8 +361,10 @@ else if (disconnectedClientLogger.isDebugEnabled()) { } private boolean indicatesDisconnectedClient(Throwable ex) { - return ("Broken pipe".equalsIgnoreCase(NestedExceptionUtils.getMostSpecificCause(ex).getMessage()) || - DISCONNECTED_CLIENT_EXCEPTIONS.contains(ex.getClass().getSimpleNam...
true
Other
spring-projects
spring-framework
bb684ce60b82bb2d3a81828a6780800c51bb4e33.json
Improve decoding support for multipart filename StandardMultipartHttpServletRequest now properly decodes RFC-5987 encoded filenames (i.e. filename*) by delegating to ContentDisposition and also support RFC-2047 syntax through javax.mail MimeUtility. Issue: SPR-15205
spring-web/src/main/java/org/springframework/web/multipart/support/StandardMultipartHttpServletRequest.java
@@ -20,8 +20,7 @@ import java.io.IOException; import java.io.InputStream; import java.io.Serializable; -import java.nio.charset.Charset; -import java.nio.charset.StandardCharsets; +import java.io.UnsupportedEncodingException; import java.nio.file.Files; import java.util.ArrayList; import java.util.Collection; @@ ...
true
Other
spring-projects
spring-framework
bb684ce60b82bb2d3a81828a6780800c51bb4e33.json
Improve decoding support for multipart filename StandardMultipartHttpServletRequest now properly decodes RFC-5987 encoded filenames (i.e. filename*) by delegating to ContentDisposition and also support RFC-2047 syntax through javax.mail MimeUtility. Issue: SPR-15205
spring-web/src/test/java/org/springframework/web/multipart/support/StandardMultipartHttpServletRequestTests.java
@@ -0,0 +1,76 @@ +/* + * Copyright 2002-2017 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + ...
true
Other
spring-projects
spring-framework
bb684ce60b82bb2d3a81828a6780800c51bb4e33.json
Improve decoding support for multipart filename StandardMultipartHttpServletRequest now properly decodes RFC-5987 encoded filenames (i.e. filename*) by delegating to ContentDisposition and also support RFC-2047 syntax through javax.mail MimeUtility. Issue: SPR-15205
spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestPartIntegrationTests.java
@@ -249,7 +249,7 @@ public ResponseEntity<Object> create(@RequestPart(name = "json-data") TestData t @RequestMapping(value = "/spr13319", method = POST, consumes = "multipart/form-data") public ResponseEntity<Void> create(@RequestPart("file") MultipartFile multipartFile) { - assertEquals("%C3%A9l%C3%A8ve.txt"...
true
Other
spring-projects
spring-framework
5f868b493a7ba63c2dc2622475ecc29f34e4346b.json
Add ForwardedHeaderFilter requestOnly Add an option for ForwardedHeaderFilter to only process the HttpServletRequest. This means that HttpServletResponse.sendRedirect will only work when the application is conifgured to use relative redirects using Servlet Container specific setup. Issue: SPR-15717
spring-web/src/main/java/org/springframework/web/filter/ForwardedHeaderFilter.java
@@ -79,6 +79,8 @@ public class ForwardedHeaderFilter extends OncePerRequestFilter { private boolean removeOnly; + private boolean requestOnly; + public ForwardedHeaderFilter() { this.pathHelper = new UrlPathHelper(); @@ -97,6 +99,20 @@ public void setRemoveOnly(boolean removeOnly) { this.removeOnly = re...
true
Other
spring-projects
spring-framework
5f868b493a7ba63c2dc2622475ecc29f34e4346b.json
Add ForwardedHeaderFilter requestOnly Add an option for ForwardedHeaderFilter to only process the HttpServletRequest. This means that HttpServletResponse.sendRedirect will only work when the application is conifgured to use relative redirects using Servlet Container specific setup. Issue: SPR-15717
spring-web/src/test/java/org/springframework/web/filter/ForwardedHeaderFilterTests.java
@@ -403,6 +403,26 @@ public void sendRedirectWithNoXForwardedAndDotDotPath() throws Exception { assertEquals("../foo/bar", redirectedUrl); } + @Test + public void sendRedirectWhenRequestOnlyAndXForwardedThenUsesRelativeRedirects() throws Exception { + this.request.addHeader(X_FORWARDED_PROTO, "https"); + this....
true
Other
spring-projects
spring-framework
fb4ddb0746a3f194091043de328875596736427a.json
Make getters and setters null-safety consistent This commit ensure that null-safety is consistent between getters and setters in order to be able to provide beans with properties with a common type when type safety is taken in account like with Kotlin. It also add a few missing property level @Nullable annotations. ...
spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJExpressionPointcutAdvisor.java
@@ -34,7 +34,7 @@ public class AspectJExpressionPointcutAdvisor extends AbstractGenericPointcutAdv private final AspectJExpressionPointcut pointcut = new AspectJExpressionPointcut(); - public void setExpression(String expression) { + public void setExpression(@Nullable String expression) { this.pointcut.setExp...
true
Other
spring-projects
spring-framework
fb4ddb0746a3f194091043de328875596736427a.json
Make getters and setters null-safety consistent This commit ensure that null-safety is consistent between getters and setters in order to be able to provide beans with properties with a common type when type safety is taken in account like with Kotlin. It also add a few missing property level @Nullable annotations. ...
spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/AbstractAutoProxyCreator.java
@@ -203,7 +203,7 @@ public void setApplyCommonInterceptorsFirst(boolean applyCommonInterceptorsFirst } @Override - public void setBeanFactory(BeanFactory beanFactory) { + public void setBeanFactory(@Nullable BeanFactory beanFactory) { this.beanFactory = beanFactory; }
true
Other
spring-projects
spring-framework
fb4ddb0746a3f194091043de328875596736427a.json
Make getters and setters null-safety consistent This commit ensure that null-safety is consistent between getters and setters in order to be able to provide beans with properties with a common type when type safety is taken in account like with Kotlin. It also add a few missing property level @Nullable annotations. ...
spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/DefaultAdvisorAutoProxyCreator.java
@@ -70,7 +70,7 @@ public boolean isUsePrefix() { * references. Default value is the bean name of this object + a dot. * @param advisorBeanNamePrefix the exclusion prefix */ - public void setAdvisorBeanNamePrefix(String advisorBeanNamePrefix) { + public void setAdvisorBeanNamePrefix(@Nullable String advisorBean...
true
Other
spring-projects
spring-framework
fb4ddb0746a3f194091043de328875596736427a.json
Make getters and setters null-safety consistent This commit ensure that null-safety is consistent between getters and setters in order to be able to provide beans with properties with a common type when type safety is taken in account like with Kotlin. It also add a few missing property level @Nullable annotations. ...
spring-aop/src/main/java/org/springframework/aop/support/AbstractBeanFactoryPointcutAdvisor.java
@@ -63,7 +63,7 @@ public abstract class AbstractBeanFactoryPointcutAdvisor extends AbstractPointcu * of the advisor. * @see #getAdvice() */ - public void setAdviceBeanName(String adviceBeanName) { + public void setAdviceBeanName(@Nullable String adviceBeanName) { this.adviceBeanName = adviceBeanName; }
true
Other
spring-projects
spring-framework
fb4ddb0746a3f194091043de328875596736427a.json
Make getters and setters null-safety consistent This commit ensure that null-safety is consistent between getters and setters in order to be able to provide beans with properties with a common type when type safety is taken in account like with Kotlin. It also add a few missing property level @Nullable annotations. ...
spring-aop/src/main/java/org/springframework/aop/support/AbstractExpressionPointcut.java
@@ -43,7 +43,7 @@ public abstract class AbstractExpressionPointcut implements ExpressionPointcut, /** * Set the location for debugging. */ - public void setLocation(String location) { + public void setLocation(@Nullable String location) { this.location = location; } @@ -58,7 +58,7 @@ public String getLoc...
true
Other
spring-projects
spring-framework
fb4ddb0746a3f194091043de328875596736427a.json
Make getters and setters null-safety consistent This commit ensure that null-safety is consistent between getters and setters in order to be able to provide beans with properties with a common type when type safety is taken in account like with Kotlin. It also add a few missing property level @Nullable annotations. ...
spring-beans/src/main/java/org/springframework/beans/ExtendedBeanInfo.java
@@ -292,7 +292,7 @@ public Method getReadMethod() { } @Override - public void setReadMethod(Method readMethod) { + public void setReadMethod(@Nullable Method readMethod) { this.readMethod = readMethod; } @@ -303,7 +303,7 @@ public Method getWriteMethod() { } @Override - public void setWriteM...
true
Other
spring-projects
spring-framework
fb4ddb0746a3f194091043de328875596736427a.json
Make getters and setters null-safety consistent This commit ensure that null-safety is consistent between getters and setters in order to be able to provide beans with properties with a common type when type safety is taken in account like with Kotlin. It also add a few missing property level @Nullable annotations. ...
spring-beans/src/main/java/org/springframework/beans/factory/config/AbstractFactoryBean.java
@@ -101,7 +101,7 @@ public void setBeanClassLoader(ClassLoader classLoader) { } @Override - public void setBeanFactory(BeanFactory beanFactory) { + public void setBeanFactory(@Nullable BeanFactory beanFactory) { this.beanFactory = beanFactory; }
true
Other
spring-projects
spring-framework
fb4ddb0746a3f194091043de328875596736427a.json
Make getters and setters null-safety consistent This commit ensure that null-safety is consistent between getters and setters in order to be able to provide beans with properties with a common type when type safety is taken in account like with Kotlin. It also add a few missing property level @Nullable annotations. ...
spring-beans/src/main/java/org/springframework/beans/factory/config/BeanDefinition.java
@@ -148,7 +148,7 @@ public interface BeanDefinition extends AttributeAccessor, BeanMetadataElement { * Set the names of the beans that this bean depends on being initialized. * The bean factory will guarantee that these beans get initialized first. */ - void setDependsOn(String... dependsOn); + void setDepends...
true
Other
spring-projects
spring-framework
fb4ddb0746a3f194091043de328875596736427a.json
Make getters and setters null-safety consistent This commit ensure that null-safety is consistent between getters and setters in order to be able to provide beans with properties with a common type when type safety is taken in account like with Kotlin. It also add a few missing property level @Nullable annotations. ...
spring-beans/src/main/java/org/springframework/beans/factory/config/ConstructorArgumentValues.java
@@ -554,8 +554,8 @@ public synchronized boolean isConverted() { * Set the converted value of the constructor argument, * after processed type conversion. */ - public synchronized void setConvertedValue(Object value) { - this.converted = true; + public synchronized void setConvertedValue(@Nullable Object...
true
Other
spring-projects
spring-framework
fb4ddb0746a3f194091043de328875596736427a.json
Make getters and setters null-safety consistent This commit ensure that null-safety is consistent between getters and setters in order to be able to provide beans with properties with a common type when type safety is taken in account like with Kotlin. It also add a few missing property level @Nullable annotations. ...
spring-beans/src/main/java/org/springframework/beans/factory/config/FieldRetrievingFactoryBean.java
@@ -87,7 +87,7 @@ * @see #setTargetObject * @see #setTargetField */ - public void setTargetClass(Class<?> targetClass) { + public void setTargetClass(@Nullable Class<?> targetClass) { this.targetClass = targetClass; } @@ -106,7 +106,7 @@ public Class<?> getTargetClass() { * @see #setTargetClass * ...
true
Other
spring-projects
spring-framework
fb4ddb0746a3f194091043de328875596736427a.json
Make getters and setters null-safety consistent This commit ensure that null-safety is consistent between getters and setters in order to be able to provide beans with properties with a common type when type safety is taken in account like with Kotlin. It also add a few missing property level @Nullable annotations. ...
spring-beans/src/main/java/org/springframework/beans/factory/config/TypedStringValue.java
@@ -126,8 +126,7 @@ public Class<?> getTargetType() { /** * Specify the type to convert to. */ - public void setTargetTypeName(String targetTypeName) { - Assert.notNull(targetTypeName, "'targetTypeName' must not be null"); + public void setTargetTypeName(@Nullable String targetTypeName) { this.targetType = ...
true
Other
spring-projects
spring-framework
fb4ddb0746a3f194091043de328875596736427a.json
Make getters and setters null-safety consistent This commit ensure that null-safety is consistent between getters and setters in order to be able to provide beans with properties with a common type when type safety is taken in account like with Kotlin. It also add a few missing property level @Nullable annotations. ...
spring-beans/src/main/java/org/springframework/beans/factory/serviceloader/AbstractServiceLoaderBasedFactoryBean.java
@@ -45,7 +45,7 @@ public abstract class AbstractServiceLoaderBasedFactoryBean extends AbstractFact /** * Specify the desired service type (typically the service's public API). */ - public void setServiceType(Class<?> serviceType) { + public void setServiceType(@Nullable Class<?> serviceType) { this.serviceTy...
true
Other
spring-projects
spring-framework
fb4ddb0746a3f194091043de328875596736427a.json
Make getters and setters null-safety consistent This commit ensure that null-safety is consistent between getters and setters in order to be able to provide beans with properties with a common type when type safety is taken in account like with Kotlin. It also add a few missing property level @Nullable annotations. ...
spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanDefinitionReader.java
@@ -122,7 +122,7 @@ public final BeanDefinitionRegistry getRegistry() { * @see org.springframework.core.io.support.ResourcePatternResolver * @see org.springframework.core.io.support.PathMatchingResourcePatternResolver */ - public void setResourceLoader(ResourceLoader resourceLoader) { + public void setResource...
true
Other
spring-projects
spring-framework
fb4ddb0746a3f194091043de328875596736427a.json
Make getters and setters null-safety consistent This commit ensure that null-safety is consistent between getters and setters in order to be able to provide beans with properties with a common type when type safety is taken in account like with Kotlin. It also add a few missing property level @Nullable annotations. ...
spring-beans/src/main/java/org/springframework/beans/factory/support/DefaultListableBeanFactory.java
@@ -268,7 +268,7 @@ public boolean isAllowEagerClassLoading() { * @see org.springframework.core.OrderComparator * @see org.springframework.core.annotation.AnnotationAwareOrderComparator */ - public void setDependencyComparator(Comparator<Object> dependencyComparator) { + public void setDependencyComparator(@Nu...
true
Other
spring-projects
spring-framework
fb4ddb0746a3f194091043de328875596736427a.json
Make getters and setters null-safety consistent This commit ensure that null-safety is consistent between getters and setters in order to be able to provide beans with properties with a common type when type safety is taken in account like with Kotlin. It also add a few missing property level @Nullable annotations. ...
spring-beans/src/main/java/org/springframework/beans/factory/support/ManagedMap.java
@@ -71,7 +71,7 @@ public Object getSource() { /** * Set the default key type name (class name) to be used for this map. */ - public void setKeyTypeName(String keyTypeName) { + public void setKeyTypeName(@Nullable String keyTypeName) { this.keyTypeName = keyTypeName; } @@ -86,7 +86,7 @@ public String getK...
true
Other
spring-projects
spring-framework
fb4ddb0746a3f194091043de328875596736427a.json
Make getters and setters null-safety consistent This commit ensure that null-safety is consistent between getters and setters in order to be able to provide beans with properties with a common type when type safety is taken in account like with Kotlin. It also add a few missing property level @Nullable annotations. ...
spring-beans/src/main/java/org/springframework/beans/factory/support/ManagedSet.java
@@ -68,7 +68,7 @@ public Object getSource() { /** * Set the default element type name (class name) to be used for this set. */ - public void setElementTypeName(String elementTypeName) { + public void setElementTypeName(@Nullable String elementTypeName) { this.elementTypeName = elementTypeName; }
true
Other
spring-projects
spring-framework
fb4ddb0746a3f194091043de328875596736427a.json
Make getters and setters null-safety consistent This commit ensure that null-safety is consistent between getters and setters in order to be able to provide beans with properties with a common type when type safety is taken in account like with Kotlin. It also add a few missing property level @Nullable annotations. ...
spring-beans/src/main/java/org/springframework/beans/factory/support/RootBeanDefinition.java
@@ -257,7 +257,7 @@ public void setParentName(@Nullable String parentName) { /** * Register a target definition that is being decorated by this bean definition. */ - public void setDecoratedDefinition(BeanDefinitionHolder decoratedDefinition) { + public void setDecoratedDefinition(@Nullable BeanDefinitionHolder...
true
Other
spring-projects
spring-framework
fb4ddb0746a3f194091043de328875596736427a.json
Make getters and setters null-safety consistent This commit ensure that null-safety is consistent between getters and setters in order to be able to provide beans with properties with a common type when type safety is taken in account like with Kotlin. It also add a few missing property level @Nullable annotations. ...
spring-beans/src/main/java/org/springframework/beans/support/ArgumentConvertingMethodInvoker.java
@@ -55,9 +55,9 @@ public class ArgumentConvertingMethodInvoker extends MethodInvoker { * @see org.springframework.beans.SimpleTypeConverter * @see org.springframework.beans.BeanWrapperImpl */ - public void setTypeConverter(TypeConverter typeConverter) { + public void setTypeConverter(@Nullable TypeConverter ty...
true
Other
spring-projects
spring-framework
fb4ddb0746a3f194091043de328875596736427a.json
Make getters and setters null-safety consistent This commit ensure that null-safety is consistent between getters and setters in order to be able to provide beans with properties with a common type when type safety is taken in account like with Kotlin. It also add a few missing property level @Nullable annotations. ...
spring-context-support/src/main/java/org/springframework/cache/ehcache/EhCacheCacheManager.java
@@ -37,6 +37,7 @@ */ public class EhCacheCacheManager extends AbstractTransactionSupportingCacheManager { + @Nullable private net.sf.ehcache.CacheManager cacheManager; @@ -59,7 +60,7 @@ public EhCacheCacheManager(net.sf.ehcache.CacheManager cacheManager) { /** * Set the backing EhCache {@link net.sf.ehc...
true
Other
spring-projects
spring-framework
fb4ddb0746a3f194091043de328875596736427a.json
Make getters and setters null-safety consistent This commit ensure that null-safety is consistent between getters and setters in order to be able to provide beans with properties with a common type when type safety is taken in account like with Kotlin. It also add a few missing property level @Nullable annotations. ...
spring-context-support/src/main/java/org/springframework/cache/jcache/JCacheCacheManager.java
@@ -38,6 +38,7 @@ */ public class JCacheCacheManager extends AbstractTransactionSupportingCacheManager { + @Nullable private javax.cache.CacheManager cacheManager; private boolean allowNullValues = true; @@ -62,7 +63,7 @@ public JCacheCacheManager(CacheManager cacheManager) { /** * Set the backing JCach...
true
Other
spring-projects
spring-framework
fb4ddb0746a3f194091043de328875596736427a.json
Make getters and setters null-safety consistent This commit ensure that null-safety is consistent between getters and setters in order to be able to provide beans with properties with a common type when type safety is taken in account like with Kotlin. It also add a few missing property level @Nullable annotations. ...
spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/DefaultJCacheOperationSource.java
@@ -63,7 +63,7 @@ public class DefaultJCacheOperationSource extends AnnotationJCacheOperationSourc * Set the default {@link CacheManager} to use to lookup cache by name. Only mandatory * if the {@linkplain CacheResolver cache resolvers} have not been set. */ - public void setCacheManager(CacheManager cacheMana...
true
Other
spring-projects
spring-framework
fb4ddb0746a3f194091043de328875596736427a.json
Make getters and setters null-safety consistent This commit ensure that null-safety is consistent between getters and setters in order to be able to provide beans with properties with a common type when type safety is taken in account like with Kotlin. It also add a few missing property level @Nullable annotations. ...
spring-context-support/src/main/java/org/springframework/mail/SimpleMailMessage.java
@@ -98,7 +98,7 @@ public SimpleMailMessage(SimpleMailMessage original) { @Override - public void setFrom(String from) { + public void setFrom(@Nullable String from) { this.from = from; } @@ -108,7 +108,7 @@ public String getFrom() { } @Override - public void setReplyTo(String replyTo) { + public void...
true
Other
spring-projects
spring-framework
fb4ddb0746a3f194091043de328875596736427a.json
Make getters and setters null-safety consistent This commit ensure that null-safety is consistent between getters and setters in order to be able to provide beans with properties with a common type when type safety is taken in account like with Kotlin. It also add a few missing property level @Nullable annotations. ...
spring-context-support/src/main/java/org/springframework/mail/javamail/JavaMailSenderImpl.java
@@ -99,6 +99,7 @@ public class JavaMailSenderImpl implements JavaMailSender { @Nullable private String defaultEncoding; + @Nullable private FileTypeMap defaultFileTypeMap; @@ -165,7 +166,7 @@ public synchronized Session getSession() { /** * Set the mail protocol. Default is "smtp". */ - public void ...
true
Other
spring-projects
spring-framework
fb4ddb0746a3f194091043de328875596736427a.json
Make getters and setters null-safety consistent This commit ensure that null-safety is consistent between getters and setters in order to be able to provide beans with properties with a common type when type safety is taken in account like with Kotlin. It also add a few missing property level @Nullable annotations. ...
spring-context/src/main/java/org/springframework/cache/interceptor/CacheAspectSupport.java
@@ -86,12 +86,15 @@ public abstract class CacheAspectSupport extends AbstractCacheInvoker private final CacheOperationExpressionEvaluator evaluator = new CacheOperationExpressionEvaluator(); + @Nullable private CacheOperationSource cacheOperationSource; private KeyGenerator keyGenerator = new SimpleKeyGener...
true
Other
spring-projects
spring-framework
fb4ddb0746a3f194091043de328875596736427a.json
Make getters and setters null-safety consistent This commit ensure that null-safety is consistent between getters and setters in order to be able to provide beans with properties with a common type when type safety is taken in account like with Kotlin. It also add a few missing property level @Nullable annotations. ...
spring-context/src/main/java/org/springframework/context/support/AbstractMessageSource.java
@@ -90,7 +90,7 @@ public MessageSource getParentMessageSource() { * <p>May also link to an externally defined Properties object, e.g. defined * through a {@link org.springframework.beans.factory.config.PropertiesFactoryBean}. */ - public void setCommonMessages(Properties commonMessages) { + public void setComm...
true
Other
spring-projects
spring-framework
fb4ddb0746a3f194091043de328875596736427a.json
Make getters and setters null-safety consistent This commit ensure that null-safety is consistent between getters and setters in order to be able to provide beans with properties with a common type when type safety is taken in account like with Kotlin. It also add a few missing property level @Nullable annotations. ...
spring-context/src/main/java/org/springframework/context/support/AbstractResourceBasedMessageSource.java
@@ -119,7 +119,7 @@ public Set<String> getBasenameSet() { * <p>Only applies to classic properties files, not to XML files. * @param defaultEncoding the default charset */ - public void setDefaultEncoding(String defaultEncoding) { + public void setDefaultEncoding(@Nullable String defaultEncoding) { this.defa...
true
Other
spring-projects
spring-framework
fb4ddb0746a3f194091043de328875596736427a.json
Make getters and setters null-safety consistent This commit ensure that null-safety is consistent between getters and setters in order to be able to provide beans with properties with a common type when type safety is taken in account like with Kotlin. It also add a few missing property level @Nullable annotations. ...
spring-context/src/main/java/org/springframework/ejb/access/LocalStatelessSessionProxyFactoryBean.java
@@ -70,7 +70,7 @@ public class LocalStatelessSessionProxyFactoryBean extends LocalSlsbInvokerInter * Using a business methods interface is a best practice when implementing EJBs. * @param businessInterface set the business interface of the EJB */ - public void setBusinessInterface(Class<?> businessInterface) {...
true
Other
spring-projects
spring-framework
fb4ddb0746a3f194091043de328875596736427a.json
Make getters and setters null-safety consistent This commit ensure that null-safety is consistent between getters and setters in order to be able to provide beans with properties with a common type when type safety is taken in account like with Kotlin. It also add a few missing property level @Nullable annotations. ...
spring-context/src/main/java/org/springframework/ejb/access/SimpleRemoteStatelessSessionProxyFactoryBean.java
@@ -84,7 +84,7 @@ public class SimpleRemoteStatelessSessionProxyFactoryBean extends SimpleRemoteSl * converted to Spring's generic RemoteAccessException. * @param businessInterface the business interface of the EJB */ - public void setBusinessInterface(Class<?> businessInterface) { + public void setBusinessInt...
true
Other
spring-projects
spring-framework
fb4ddb0746a3f194091043de328875596736427a.json
Make getters and setters null-safety consistent This commit ensure that null-safety is consistent between getters and setters in order to be able to provide beans with properties with a common type when type safety is taken in account like with Kotlin. It also add a few missing property level @Nullable annotations. ...
spring-context/src/main/java/org/springframework/format/datetime/joda/JodaTimeContext.java
@@ -49,7 +49,7 @@ public class JodaTimeContext { /** * Set the user's chronology (calendar system). */ - public void setChronology(Chronology chronology) { + public void setChronology(@Nullable Chronology chronology) { this.chronology = chronology; } @@ -69,7 +69,7 @@ public Chronology getChronology() { ...
true