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 | 461d99af29e8c358ff80ff9ff58a8ea63fe7b670.json | Fix package cycles in spring-test
Code introduced in conjunction with SPR-5243 introduced package cycles
between the ~.test.context and ~.test.context.web packages. This was
caused by the fact that ContextLoaderUtils worked directly with the
@WebAppConfiguration and WebMergedContextConfiguration types.
To address thi... | spring-test/src/main/java/org/springframework/test/context/web/ServletTestExecutionListener.java | @@ -48,7 +48,7 @@ public class ServletTestExecutionListener implements TestExecutionListener {
* The default implementation is <em>empty</em>. Can be overridden by
* subclasses as necessary.
*
- * @see org.springframework.test.context.TestExecutionListener#beforeTestClass(TestContext)
+ * @see TestExecutionL... | true |
Other | spring-projects | spring-framework | 33d5b011d3e6e85767e910896f5dacf5930eb08a.json | Reduce code duplication in ContextLoaderUtils
Prior to this commit, the following two methods in ContextLoaderUtils
contained almost identical loops for traversing the test class
hierarchy:
- resolveContextLoaderClass(Class<?>, String)
- resolveContextConfigurationAttributes(Class<?>)
With this commit, resolveCont... | spring-test/src/main/java/org/springframework/test/context/ContextLoaderUtils.java | @@ -21,7 +21,6 @@
import java.util.ArrayList;
import java.util.Arrays;
-import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
@@ -64,58 +63,70 @@ private ContextLoaderUtils() {
}
/**
- * Resolve the {@link ContextLoader} {@link Class class} to use for the
- ... | true |
Other | spring-projects | spring-framework | 33d5b011d3e6e85767e910896f5dacf5930eb08a.json | Reduce code duplication in ContextLoaderUtils
Prior to this commit, the following two methods in ContextLoaderUtils
contained almost identical loops for traversing the test class
hierarchy:
- resolveContextLoaderClass(Class<?>, String)
- resolveContextConfigurationAttributes(Class<?>)
With this commit, resolveCont... | spring-test/src/test/java/org/springframework/test/context/ContextLoaderUtilsTests.java | @@ -16,8 +16,8 @@
package org.springframework.test.context;
-import static org.springframework.test.context.ContextLoaderUtils.*;
import static org.junit.Assert.*;
+import static org.springframework.test.context.ContextLoaderUtils.*;
import java.util.Arrays;
import java.util.Collections;
@@ -140,17 +140,17 @@... | true |
Other | spring-projects | spring-framework | 90c5f226b62503b492167bcd87361842f73d18b1.json | Fix package cycles in spring-test
Code introduced in conjunction with SPR-5243 introduced package cycles
between the ~.test.context.web and ~.test.context.support packages. This
was caused by the fact that ServletTestExecutionListener extended
AbstractTestExecutionListener.
To address this, ServletTestExecutionListen... | spring-test/src/main/java/org/springframework/test/context/web/ServletTestExecutionListener.java | @@ -20,14 +20,15 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ConfigurableApplicationContext;
im... | false |
Other | spring-projects | spring-framework | 7d9c823a1550d0fe0050bd4184f3bb47dd4b7c51.json | Delete unused imports | spring-test/src/test/java/org/springframework/test/context/junit4/spr9051/AnnotatedConfigClassesWithoutAtConfigurationTests.java | @@ -16,8 +16,6 @@
package org.springframework.test.context.junit4.spr9051;
-import static org.hamcrest.Matchers.*;
-import static org.hamcrest.Matchers.is;
import static org.junit.Assert.*;
import java.util.Arrays;
@@ -32,7 +30,6 @@
import org.springframework.test.context.ContextConfiguration;
import org.spr... | false |
Other | spring-projects | spring-framework | fe77c3d5fe3b498ecba7f3e1dce31f0aec43d8d6.json | Fix failing test | spring-test-mvc/src/main/java/org/springframework/test/web/servlet/DefaultMvcResult.java | @@ -110,31 +110,33 @@ public void setAsyncResultLatch(CountDownLatch asyncResultLatch) {
}
public Object getAsyncResult() {
- WebAsyncManager asyncManager = WebAsyncUtils.getAsyncManager(this.mockRequest);
- if (asyncManager.isConcurrentHandlingStarted()) {
- if (!awaitAsyncResult()) {
+ HttpServletRequest r... | true |
Other | spring-projects | spring-framework | fe77c3d5fe3b498ecba7f3e1dce31f0aec43d8d6.json | Fix failing test | spring-test-mvc/src/test/java/org/springframework/test/web/servlet/samples/standalone/AsyncTests.java | @@ -72,7 +72,6 @@ public DeferredResult<Person> getDeferredResult() {
public Callable<Person> getCallable() {
return new Callable<Person>() {
public Person call() throws Exception {
- Thread.sleep(100);
return new Person("Joe");
}
}; | true |
Other | spring-projects | spring-framework | e14ba9dec329b0f2f3ea414e8119957abd8a2a4c.json | Add config options for MVC async interceptors
The MVC namespace and the MVC Java config now allow configuring
CallableProcessingInterceptor and DeferredResultProcessingInterceptor
instances.
Issue: SPR-9914 | spring-web/src/main/java/org/springframework/web/context/request/async/WebAsyncManager.java | @@ -175,6 +175,11 @@ public void registerCallableInterceptor(Object key, CallableProcessingIntercepto
this.callableInterceptors.put(key, interceptor);
}
+ public void registerAllCallableInterceptors(Map<Object, CallableProcessingInterceptor> interceptors) {
+ Assert.notNull(interceptors);
+ this.callableInterc... | true |
Other | spring-projects | spring-framework | e14ba9dec329b0f2f3ea414e8119957abd8a2a4c.json | Add config options for MVC async interceptors
The MVC namespace and the MVC Java config now allow configuring
CallableProcessingInterceptor and DeferredResultProcessingInterceptor
instances.
Issue: SPR-9914 | spring-webmvc/src/main/java/org/springframework/web/servlet/config/AnnotationDrivenBeanDefinitionParser.java | @@ -174,6 +174,8 @@ public BeanDefinition parse(Element element, ParserContext parserContext) {
ManagedList<?> returnValueHandlers = getReturnValueHandlers(element, source, parserContext);
String asyncTimeout = getAsyncTimeout(element, source, parserContext);
RuntimeBeanReference asyncExecutor = getAsyncExecut... | true |
Other | spring-projects | spring-framework | e14ba9dec329b0f2f3ea414e8119957abd8a2a4c.json | Add config options for MVC async interceptors
The MVC namespace and the MVC Java config now allow configuring
CallableProcessingInterceptor and DeferredResultProcessingInterceptor
instances.
Issue: SPR-9914 | spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/AsyncSupportConfigurer.java | @@ -15,11 +15,18 @@
*/
package org.springframework.web.servlet.config.annotation;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
import java.util.concurrent.Callable;
import org.springframework.core.task.AsyncTaskExecutor;
import org.springframework.core.task.SimpleAsyncTaskExe... | true |
Other | spring-projects | spring-framework | e14ba9dec329b0f2f3ea414e8119957abd8a2a4c.json | Add config options for MVC async interceptors
The MVC namespace and the MVC Java config now allow configuring
CallableProcessingInterceptor and DeferredResultProcessingInterceptor
instances.
Issue: SPR-9914 | spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurationSupport.java | @@ -378,6 +378,8 @@ public RequestMappingHandlerAdapter requestMappingHandlerAdapter() {
if (configurer.getTimeout() != null) {
adapter.setAsyncRequestTimeout(configurer.getTimeout());
}
+ adapter.setCallableInterceptors(configurer.getCallableInterceptors());
+ adapter.setDeferredResultInterceptors(configur... | true |
Other | spring-projects | spring-framework | e14ba9dec329b0f2f3ea414e8119957abd8a2a4c.json | Add config options for MVC async interceptors
The MVC namespace and the MVC Java config now allow configuring
CallableProcessingInterceptor and DeferredResultProcessingInterceptor
instances.
Issue: SPR-9914 | spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerAdapter.java | @@ -48,6 +48,7 @@
import org.springframework.http.converter.xml.SourceHttpMessageConverter;
import org.springframework.http.converter.xml.XmlAwareFormHttpMessageConverter;
import org.springframework.ui.ModelMap;
+import org.springframework.util.Assert;
import org.springframework.util.CollectionUtils;
import org.sp... | true |
Other | spring-projects | spring-framework | e14ba9dec329b0f2f3ea414e8119957abd8a2a4c.json | Add config options for MVC async interceptors
The MVC namespace and the MVC Java config now allow configuring
CallableProcessingInterceptor and DeferredResultProcessingInterceptor
instances.
Issue: SPR-9914 | spring-webmvc/src/main/resources/org/springframework/web/servlet/config/spring-mvc-3.2.xsd | @@ -97,6 +97,46 @@
]]></xsd:documentation>
</xsd:annotation>
<xsd:complexType>
+ <xsd:all minOccurs="0">
+ <xsd:element name="callable-interceptors" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation><![CDATA[
+ The ordered set of interceptors that intercept the lifecycl... | true |
Other | spring-projects | spring-framework | e14ba9dec329b0f2f3ea414e8119957abd8a2a4c.json | Add config options for MVC async interceptors
The MVC namespace and the MVC Java config now allow configuring
CallableProcessingInterceptor and DeferredResultProcessingInterceptor
instances.
Issue: SPR-9914 | spring-webmvc/src/test/java/org/springframework/web/servlet/config/MvcNamespaceTests.java | @@ -16,19 +16,27 @@
package org.springframework.web.servlet.config;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
+import static org.ju... | true |
Other | spring-projects | spring-framework | e14ba9dec329b0f2f3ea414e8119957abd8a2a4c.json | Add config options for MVC async interceptors
The MVC namespace and the MVC Java config now allow configuring
CallableProcessingInterceptor and DeferredResultProcessingInterceptor
instances.
Issue: SPR-9914 | spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurationSupportExtensionTests.java | @@ -21,6 +21,7 @@
import java.util.Arrays;
import java.util.List;
+import java.util.Map;
import org.junit.Before;
import org.junit.Test;
@@ -46,6 +47,10 @@
import org.springframework.web.bind.support.ConfigurableWebBindingInitializer;
import org.springframework.web.context.request.NativeWebRequest;
import or... | true |
Other | spring-projects | spring-framework | e14ba9dec329b0f2f3ea414e8119957abd8a2a4c.json | Add config options for MVC async interceptors
The MVC namespace and the MVC Java config now allow configuring
CallableProcessingInterceptor and DeferredResultProcessingInterceptor
instances.
Issue: SPR-9914 | spring-webmvc/src/test/resources/org/springframework/web/servlet/config/mvc-config-async-support.xml | @@ -5,7 +5,14 @@
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd">
<mvc:annotation-driven>
- <mvc:async-support default-timeout="2500" task-executor="executor" />
+ <mvc:async-support default-timeout="2500" task-executor="executor">
+ <mvc:callable-inter... | true |
Other | spring-projects | spring-framework | e14ba9dec329b0f2f3ea414e8119957abd8a2a4c.json | Add config options for MVC async interceptors
The MVC namespace and the MVC Java config now allow configuring
CallableProcessingInterceptor and DeferredResultProcessingInterceptor
instances.
Issue: SPR-9914 | src/dist/changelog.txt | @@ -32,6 +32,7 @@ Changes in version 3.2 RC1 (2012-10-29)
* added CallableProcessingInterceptor and DeferredResultProcessingInterceptor
* added support for wildcard media types in AbstractView and ContentNegotiationViewResolver (SPR-9807)
* the jackson message converters now include "application/*+json" in supported... | true |
Other | spring-projects | spring-framework | 5d4d1eaca4fa8af29f07e23b89bee8fd028820bd.json | Fix package cycle in @EnableMBeanExport
Prior to this commit, @EnableMBeanExport was declared in the
jmx.export.annotation package. This makes logical sense, but
nevertheless creates a package cycle, because @EnableMBeanExport depends
on MBeanExportConfiguration which in turn depends on context.annotation
types like @... | spring-context/src/main/java/org/springframework/context/annotation/EnableMBeanExport.java | @@ -14,15 +14,15 @@
* limitations under the License.
*/
-package org.springframework.jmx.export.annotation;
+package org.springframework.context.annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.Ret... | true |
Other | spring-projects | spring-framework | 5d4d1eaca4fa8af29f07e23b89bee8fd028820bd.json | Fix package cycle in @EnableMBeanExport
Prior to this commit, @EnableMBeanExport was declared in the
jmx.export.annotation package. This makes logical sense, but
nevertheless creates a package cycle, because @EnableMBeanExport depends
on MBeanExportConfiguration which in turn depends on context.annotation
types like @... | spring-context/src/main/java/org/springframework/context/annotation/MBeanExportConfiguration.java | @@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.springframework.jmx.export.annotation;
+package org.springframework.context.annotation;
import java.util.Map;
@@ -25,12 +25,9 @@
import org.springframework.beans.factory.BeanFactoryAware;
import org.springframework.beans.factory.FactoryBean... | true |
Other | spring-projects | spring-framework | 5d4d1eaca4fa8af29f07e23b89bee8fd028820bd.json | Fix package cycle in @EnableMBeanExport
Prior to this commit, @EnableMBeanExport was declared in the
jmx.export.annotation package. This makes logical sense, but
nevertheless creates a package cycle, because @EnableMBeanExport depends
on MBeanExportConfiguration which in turn depends on context.annotation
types like @... | spring-context/src/test/java/org/springframework/jmx/export/annotation/EnableMBeanExportConfigurationTests.java | @@ -25,7 +25,9 @@
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.EnableMBeanExport;
import org.springframework.context.annotation.Lazy;
+impor... | true |
Other | spring-projects | spring-framework | cb867121870b064df622274a0afc13d6198ba2c6.json | Provide method to set async TimeoutHandler
Issue: SPR-9914 | spring-web/src/main/java/org/springframework/web/context/request/async/WebAsyncManager.java | @@ -66,6 +66,8 @@ public final class WebAsyncManager {
private AsyncTaskExecutor taskExecutor = new SimpleAsyncTaskExecutor(this.getClass().getSimpleName());
+ private Runnable timeoutHandler;
+
private Object concurrentResult = RESULT_NONE;
private Object[] concurrentResultContext;
@@ -117,6 +119,15 @@ pub... | true |
Other | spring-projects | spring-framework | cb867121870b064df622274a0afc13d6198ba2c6.json | Provide method to set async TimeoutHandler
Issue: SPR-9914 | spring-web/src/test/java/org/springframework/web/context/request/async/WebAsyncManagerTests.java | @@ -91,11 +91,7 @@ public void setAsyncWebRequestAfterAsyncStarted() {
@Test
public void startCallableProcessing() throws Exception {
- Callable<Object> task = new Callable<Object>() {
- public Object call() throws Exception {
- return 1;
- }
- };
+ Callable<Object> task = new StubCallable();
Calla... | true |
Other | spring-projects | spring-framework | 59fb67e38dc8781db52a4ac1bc5e96b77e9ddc58.json | Update SpEL test to reflect native float support
Issue: SPR-9486 | spring-expression/src/test/java/org/springframework/expression/spel/standard/SpelParserTests.java | @@ -382,8 +382,7 @@ public void numerics() {
checkNumberError("3.4L", SpelMessage.REAL_CANNOT_BE_LONG);
- // Number is parsed as a float, but immediately promoted to a double
- checkNumber("3.5f", 3.5d, Double.class);
+ checkNumber("3.5f", 3.5f, Float.class);
checkNumber("1.2e3", 1.2e3d, Double.class);
... | false |
Other | spring-projects | spring-framework | be8f23d75658a8b728912b644c138407d4914f8b.json | Add SpEL support for float literals
This change ensures that SpEL expressions involving floats are
supported natively as opposed to the previous behavior which required
conversion to double, leading to potential downstream conversion
ambiguities.
Issue: SPR-9486 | spring-expression/src/main/java/org/springframework/expression/spel/ast/FloatLiteral.java | @@ -0,0 +1,38 @@
+/*
+ * Copyright 2002-2012 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 | be8f23d75658a8b728912b644c138407d4914f8b.json | Add SpEL support for float literals
This change ensures that SpEL expressions involving floats are
supported natively as opposed to the previous behavior which required
conversion to double, leading to potential downstream conversion
ambiguities.
Issue: SPR-9486 | spring-expression/src/main/java/org/springframework/expression/spel/ast/Literal.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2009 the original author or authors.
+ * Copyright 2002-2012 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,11 +17,7 @@
package org.springframework... | true |
Other | spring-projects | spring-framework | be8f23d75658a8b728912b644c138407d4914f8b.json | Add SpEL support for float literals
This change ensures that SpEL expressions involving floats are
supported natively as opposed to the previous behavior which required
conversion to double, leading to potential downstream conversion
ambiguities.
Issue: SPR-9486 | spring-expression/src/main/java/org/springframework/expression/spel/ast/OpDivide.java | @@ -43,8 +43,9 @@ public TypedValue getValueInternal(ExpressionState state) throws EvaluationExcep
Number op2 = (Number) operandTwo;
if (op1 instanceof Double || op2 instanceof Double) {
return new TypedValue(op1.doubleValue() / op2.doubleValue());
- }
- else if (op1 instanceof Long || op2 instanceof L... | true |
Other | spring-projects | spring-framework | be8f23d75658a8b728912b644c138407d4914f8b.json | Add SpEL support for float literals
This change ensures that SpEL expressions involving floats are
supported natively as opposed to the previous behavior which required
conversion to double, leading to potential downstream conversion
ambiguities.
Issue: SPR-9486 | spring-expression/src/main/java/org/springframework/expression/spel/ast/OpEQ.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2009 the original author or authors.
+ * Copyright 2002-2012 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.
@@ -41,6 +41,8 @@ public BooleanTypedValue getV... | true |
Other | spring-projects | spring-framework | be8f23d75658a8b728912b644c138407d4914f8b.json | Add SpEL support for float literals
This change ensures that SpEL expressions involving floats are
supported natively as opposed to the previous behavior which required
conversion to double, leading to potential downstream conversion
ambiguities.
Issue: SPR-9486 | spring-expression/src/main/java/org/springframework/expression/spel/ast/OpGE.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2009 the original author or authors.
+ * Copyright 2002-2012 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.
@@ -40,6 +40,8 @@ public BooleanTypedValue getV... | true |
Other | spring-projects | spring-framework | be8f23d75658a8b728912b644c138407d4914f8b.json | Add SpEL support for float literals
This change ensures that SpEL expressions involving floats are
supported natively as opposed to the previous behavior which required
conversion to double, leading to potential downstream conversion
ambiguities.
Issue: SPR-9486 | spring-expression/src/main/java/org/springframework/expression/spel/ast/OpLE.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2009 the original author or authors.
+ * Copyright 2002-2012 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.
@@ -41,6 +41,8 @@ public BooleanTypedValue getV... | true |
Other | spring-projects | spring-framework | be8f23d75658a8b728912b644c138407d4914f8b.json | Add SpEL support for float literals
This change ensures that SpEL expressions involving floats are
supported natively as opposed to the previous behavior which required
conversion to double, leading to potential downstream conversion
ambiguities.
Issue: SPR-9486 | spring-expression/src/main/java/org/springframework/expression/spel/ast/OpLT.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2009 the original author or authors.
+ * Copyright 2002-2012 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.
@@ -42,6 +42,8 @@ public BooleanTypedValue getV... | true |
Other | spring-projects | spring-framework | be8f23d75658a8b728912b644c138407d4914f8b.json | Add SpEL support for float literals
This change ensures that SpEL expressions involving floats are
supported natively as opposed to the previous behavior which required
conversion to double, leading to potential downstream conversion
ambiguities.
Issue: SPR-9486 | spring-expression/src/main/java/org/springframework/expression/spel/ast/OpMinus.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2009 the original author or authors.
+ * Copyright 2002-2012 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.
@@ -52,6 +52,8 @@ public TypedValue getValueInt... | true |
Other | spring-projects | spring-framework | be8f23d75658a8b728912b644c138407d4914f8b.json | Add SpEL support for float literals
This change ensures that SpEL expressions involving floats are
supported natively as opposed to the previous behavior which required
conversion to double, leading to potential downstream conversion
ambiguities.
Issue: SPR-9486 | spring-expression/src/main/java/org/springframework/expression/spel/ast/OpModulus.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2009 the original author or authors.
+ * Copyright 2002-2012 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.
@@ -42,6 +42,8 @@ public TypedValue getValueInt... | true |
Other | spring-projects | spring-framework | be8f23d75658a8b728912b644c138407d4914f8b.json | Add SpEL support for float literals
This change ensures that SpEL expressions involving floats are
supported natively as opposed to the previous behavior which required
conversion to double, leading to potential downstream conversion
ambiguities.
Issue: SPR-9486 | spring-expression/src/main/java/org/springframework/expression/spel/ast/OpMultiply.java | @@ -66,6 +66,9 @@ public TypedValue getValueInternal(ExpressionState state) throws EvaluationExcep
if (leftNumber instanceof Double || rightNumber instanceof Double) {
return new TypedValue(leftNumber.doubleValue() * rightNumber.doubleValue());
}
+ else if (leftNumber instanceof Float || rightNumber inst... | true |
Other | spring-projects | spring-framework | be8f23d75658a8b728912b644c138407d4914f8b.json | Add SpEL support for float literals
This change ensures that SpEL expressions involving floats are
supported natively as opposed to the previous behavior which required
conversion to double, leading to potential downstream conversion
ambiguities.
Issue: SPR-9486 | spring-expression/src/main/java/org/springframework/expression/spel/ast/OpNE.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2009 the original author or authors.
+ * Copyright 2002-2012 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.
@@ -41,6 +41,8 @@ public BooleanTypedValue getV... | true |
Other | spring-projects | spring-framework | be8f23d75658a8b728912b644c138407d4914f8b.json | Add SpEL support for float literals
This change ensures that SpEL expressions involving floats are
supported natively as opposed to the previous behavior which required
conversion to double, leading to potential downstream conversion
ambiguities.
Issue: SPR-9486 | spring-expression/src/main/java/org/springframework/expression/spel/ast/OpPlus.java | @@ -55,6 +55,8 @@ public TypedValue getValueInternal(ExpressionState state) throws EvaluationExcep
if (operandOne instanceof Number) {
if (operandOne instanceof Double || operandOne instanceof Long) {
return new TypedValue(operandOne);
+ } else if (operandOne instanceof Float) {
+ return new Typed... | true |
Other | spring-projects | spring-framework | be8f23d75658a8b728912b644c138407d4914f8b.json | Add SpEL support for float literals
This change ensures that SpEL expressions involving floats are
supported natively as opposed to the previous behavior which required
conversion to double, leading to potential downstream conversion
ambiguities.
Issue: SPR-9486 | spring-expression/src/main/java/org/springframework/expression/spel/ast/OperatorPower.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2009 the original author or authors.
+ * Copyright 2002-2012 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.
@@ -45,6 +45,8 @@ public TypedValue getValueInt... | true |
Other | spring-projects | spring-framework | be8f23d75658a8b728912b644c138407d4914f8b.json | Add SpEL support for float literals
This change ensures that SpEL expressions involving floats are
supported natively as opposed to the previous behavior which required
conversion to double, leading to potential downstream conversion
ambiguities.
Issue: SPR-9486 | spring-expression/src/test/java/org/springframework/expression/spel/LiteralTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2009 the original author or authors.
+ * Copyright 2002-2012 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,10 +17,9 @@
package org.springframework... | true |
Other | spring-projects | spring-framework | be8f23d75658a8b728912b644c138407d4914f8b.json | Add SpEL support for float literals
This change ensures that SpEL expressions involving floats are
supported natively as opposed to the previous behavior which required
conversion to double, leading to potential downstream conversion
ambiguities.
Issue: SPR-9486 | spring-expression/src/test/java/org/springframework/expression/spel/OperatorTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2009 the original author or authors.
+ * Copyright 2002-2012 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,7 +17,6 @@
package org.springframework.... | true |
Other | spring-projects | spring-framework | be8f23d75658a8b728912b644c138407d4914f8b.json | Add SpEL support for float literals
This change ensures that SpEL expressions involving floats are
supported natively as opposed to the previous behavior which required
conversion to double, leading to potential downstream conversion
ambiguities.
Issue: SPR-9486 | spring-expression/src/test/java/org/springframework/expression/spel/SpringEL300Tests.java | @@ -16,41 +16,25 @@
package org.springframework.expression.spel;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.LinkedHashMap;
-import ... | true |
Other | spring-projects | spring-framework | f64325882da41bb128dec1b6d687b6eb6525623f.json | Add SpEL support for increment/decrement operators
With this commit the Spring Expression Language now supports
increment (++) and decrement (--) operators. These can be
used as either prefix or postfix operators. For example:
'somearray[index++]' and 'somearray[--index]' are valid.
In order to support this there are... | spring-expression/src/main/java/org/springframework/expression/spel/ExpressionState.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2011 the original author or authors.
+ * Copyright 2002-2012 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.
@@ -28,6 +28,7 @@
import org.springframework.e... | true |
Other | spring-projects | spring-framework | f64325882da41bb128dec1b6d687b6eb6525623f.json | Add SpEL support for increment/decrement operators
With this commit the Spring Expression Language now supports
increment (++) and decrement (--) operators. These can be
used as either prefix or postfix operators. For example:
'somearray[index++]' and 'somearray[--index]' are valid.
In order to support this there are... | spring-expression/src/main/java/org/springframework/expression/spel/SpelMessage.java | @@ -104,7 +104,10 @@ public enum SpelMessage {
MISSING_ARRAY_DIMENSION(Kind.ERROR, 1063, "A required array dimension has not been specified"), //
INITIALIZER_LENGTH_INCORRECT(
Kind.ERROR, 1064, "array initializer size does not match array dimensions"), //
- UNEXPECTED_ESCAPE_CHAR(Kind.ERROR,1065,"unexpected esc... | true |
Other | spring-projects | spring-framework | f64325882da41bb128dec1b6d687b6eb6525623f.json | Add SpEL support for increment/decrement operators
With this commit the Spring Expression Language now supports
increment (++) and decrement (--) operators. These can be
used as either prefix or postfix operators. For example:
'somearray[index++]' and 'somearray[--index]' are valid.
In order to support this there are... | spring-expression/src/main/java/org/springframework/expression/spel/ast/AstUtils.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2010 the original author or authors.
+ * Copyright 2010-2012 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.
@@ -41,10 +41,10 @@ public class AstUtils {
* @pa... | true |
Other | spring-projects | spring-framework | f64325882da41bb128dec1b6d687b6eb6525623f.json | Add SpEL support for increment/decrement operators
With this commit the Spring Expression Language now supports
increment (++) and decrement (--) operators. These can be
used as either prefix or postfix operators. For example:
'somearray[index++]' and 'somearray[--index]' are valid.
In order to support this there are... | spring-expression/src/main/java/org/springframework/expression/spel/ast/CompoundExpression.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2009 the original author or authors.
+ * Copyright 2002-2012 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.
@@ -35,22 +35,19 @@ public CompoundExpression(i... | true |
Other | spring-projects | spring-framework | f64325882da41bb128dec1b6d687b6eb6525623f.json | Add SpEL support for increment/decrement operators
With this commit the Spring Expression Language now supports
increment (++) and decrement (--) operators. These can be
used as either prefix or postfix operators. For example:
'somearray[index++]' and 'somearray[--index]' are valid.
In order to support this there are... | spring-expression/src/main/java/org/springframework/expression/spel/ast/Indexer.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2010 the original author or authors.
+ * Copyright 2002-2012 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,15 +25,17 @@
import org.springframework... | true |
Other | spring-projects | spring-framework | f64325882da41bb128dec1b6d687b6eb6525623f.json | Add SpEL support for increment/decrement operators
With this commit the Spring Expression Language now supports
increment (++) and decrement (--) operators. These can be
used as either prefix or postfix operators. For example:
'somearray[index++]' and 'somearray[--index]' are valid.
In order to support this there are... | spring-expression/src/main/java/org/springframework/expression/spel/ast/MethodReference.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2009 the original author or authors.
+ * Copyright 2002-2012 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.
@@ -52,6 +52,94 @@ public MethodReference(boole... | true |
Other | spring-projects | spring-framework | f64325882da41bb128dec1b6d687b6eb6525623f.json | Add SpEL support for increment/decrement operators
With this commit the Spring Expression Language now supports
increment (++) and decrement (--) operators. These can be
used as either prefix or postfix operators. For example:
'somearray[index++]' and 'somearray[--index]' are valid.
In order to support this there are... | spring-expression/src/main/java/org/springframework/expression/spel/ast/OpDec.java | @@ -0,0 +1,114 @@
+/*
+ * Copyright 2002-2012 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 | f64325882da41bb128dec1b6d687b6eb6525623f.json | Add SpEL support for increment/decrement operators
With this commit the Spring Expression Language now supports
increment (++) and decrement (--) operators. These can be
used as either prefix or postfix operators. For example:
'somearray[index++]' and 'somearray[--index]' are valid.
In order to support this there are... | spring-expression/src/main/java/org/springframework/expression/spel/ast/OpInc.java | @@ -0,0 +1,112 @@
+/*
+ * Copyright 2002-2012 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 | f64325882da41bb128dec1b6d687b6eb6525623f.json | Add SpEL support for increment/decrement operators
With this commit the Spring Expression Language now supports
increment (++) and decrement (--) operators. These can be
used as either prefix or postfix operators. For example:
'somearray[index++]' and 'somearray[--index]' are valid.
In order to support this there are... | spring-expression/src/main/java/org/springframework/expression/spel/ast/Projection.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2010 the original author or authors.
+ * Copyright 2002-2012 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.
@@ -51,6 +51,11 @@ public Projection(boolean nu... | true |
Other | spring-projects | spring-framework | f64325882da41bb128dec1b6d687b6eb6525623f.json | Add SpEL support for increment/decrement operators
With this commit the Spring Expression Language now supports
increment (++) and decrement (--) operators. These can be
used as either prefix or postfix operators. For example:
'somearray[index++]' and 'somearray[--index]' are valid.
In order to support this there are... | spring-expression/src/main/java/org/springframework/expression/spel/ast/PropertyOrFieldReference.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2010 the original author or authors.
+ * Copyright 2002-2012 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.
@@ -49,7 +49,7 @@ public class PropertyOrFieldR... | true |
Other | spring-projects | spring-framework | f64325882da41bb128dec1b6d687b6eb6525623f.json | Add SpEL support for increment/decrement operators
With this commit the Spring Expression Language now supports
increment (++) and decrement (--) operators. These can be
used as either prefix or postfix operators. For example:
'somearray[index++]' and 'somearray[--index]' are valid.
In order to support this there are... | spring-expression/src/main/java/org/springframework/expression/spel/ast/Selection.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2010 the original author or authors.
+ * Copyright 2002-2012 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.
@@ -59,19 +59,23 @@ public Selection(boolean nu... | true |
Other | spring-projects | spring-framework | f64325882da41bb128dec1b6d687b6eb6525623f.json | Add SpEL support for increment/decrement operators
With this commit the Spring Expression Language now supports
increment (++) and decrement (--) operators. These can be
used as either prefix or postfix operators. For example:
'somearray[index++]' and 'somearray[--index]' are valid.
In order to support this there are... | spring-expression/src/main/java/org/springframework/expression/spel/ast/SpelNodeImpl.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2009 the original author or authors.
+ * Copyright 2002-2012 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.
@@ -154,6 +154,10 @@ public int getStartPositio... | true |
Other | spring-projects | spring-framework | f64325882da41bb128dec1b6d687b6eb6525623f.json | Add SpEL support for increment/decrement operators
With this commit the Spring Expression Language now supports
increment (++) and decrement (--) operators. These can be
used as either prefix or postfix operators. For example:
'somearray[index++]' and 'somearray[--index]' are valid.
In order to support this there are... | spring-expression/src/main/java/org/springframework/expression/spel/ast/ValueRef.java | @@ -0,0 +1,107 @@
+/*
+ * Copyright 2002-2012 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 | f64325882da41bb128dec1b6d687b6eb6525623f.json | Add SpEL support for increment/decrement operators
With this commit the Spring Expression Language now supports
increment (++) and decrement (--) operators. These can be
used as either prefix or postfix operators. For example:
'somearray[index++]' and 'somearray[--index]' are valid.
In order to support this there are... | spring-expression/src/main/java/org/springframework/expression/spel/ast/VariableReference.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2009 the original author or authors.
+ * Copyright 2002-2012 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.
@@ -16,6 +16,7 @@
package org.springframewor... | true |
Other | spring-projects | spring-framework | f64325882da41bb128dec1b6d687b6eb6525623f.json | Add SpEL support for increment/decrement operators
With this commit the Spring Expression Language now supports
increment (++) and decrement (--) operators. These can be
used as either prefix or postfix operators. For example:
'somearray[index++]' and 'somearray[--index]' are valid.
In order to support this there are... | spring-expression/src/main/java/org/springframework/expression/spel/standard/InternalSpelExpressionParser.java | @@ -27,45 +27,7 @@
import org.springframework.expression.spel.SpelMessage;
import org.springframework.expression.spel.SpelParseException;
import org.springframework.expression.spel.SpelParserConfiguration;
-import org.springframework.expression.spel.ast.Assign;
-import org.springframework.expression.spel.ast.BeanRef... | true |
Other | spring-projects | spring-framework | f64325882da41bb128dec1b6d687b6eb6525623f.json | Add SpEL support for increment/decrement operators
With this commit the Spring Expression Language now supports
increment (++) and decrement (--) operators. These can be
used as either prefix or postfix operators. For example:
'somearray[index++]' and 'somearray[--index]' are valid.
In order to support this there are... | spring-expression/src/main/java/org/springframework/expression/spel/standard/TokenKind.java | @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
package org.springframework.expression.spel.standard;
/**
@@ -29,12 +30,12 @@ enum TokenKind {
DIV("/"), GE(">="), GT(">"), LE("<="), LT("<"), EQ("=="), NE("!="),
MOD("%"), NOT("!"... | true |
Other | spring-projects | spring-framework | f64325882da41bb128dec1b6d687b6eb6525623f.json | Add SpEL support for increment/decrement operators
With this commit the Spring Expression Language now supports
increment (++) and decrement (--) operators. These can be
used as either prefix or postfix operators. For example:
'somearray[index++]' and 'somearray[--index]' are valid.
In order to support this there are... | spring-expression/src/main/java/org/springframework/expression/spel/standard/Tokenizer.java | @@ -55,13 +55,21 @@ public void process() {
} else {
switch (ch) {
case '+':
- pushCharToken(TokenKind.PLUS);
+ if (isTwoCharToken(TokenKind.INC)) {
+ pushPairToken(TokenKind.INC);
+ } else {
+ pushCharToken(TokenKind.PLUS);
+ }
break;
case '_': // the other way to sta... | true |
Other | spring-projects | spring-framework | f64325882da41bb128dec1b6d687b6eb6525623f.json | Add SpEL support for increment/decrement operators
With this commit the Spring Expression Language now supports
increment (++) and decrement (--) operators. These can be
used as either prefix or postfix operators. For example:
'somearray[index++]' and 'somearray[--index]' are valid.
In order to support this there are... | spring-expression/src/test/java/org/springframework/expression/spel/EvaluationTests.java | @@ -27,6 +27,7 @@
import org.springframework.core.convert.TypeDescriptor;
import org.springframework.expression.AccessException;
+import org.springframework.expression.BeanResolver;
import org.springframework.expression.EvaluationContext;
import org.springframework.expression.EvaluationException;
import org.spri... | true |
Other | spring-projects | spring-framework | f64325882da41bb128dec1b6d687b6eb6525623f.json | Add SpEL support for increment/decrement operators
With this commit the Spring Expression Language now supports
increment (++) and decrement (--) operators. These can be
used as either prefix or postfix operators. For example:
'somearray[index++]' and 'somearray[--index]' are valid.
In order to support this there are... | spring-expression/src/test/java/org/springframework/expression/spel/InProgressTests.java | @@ -1,5 +1,5 @@
/*
- * Copyright 2002-2009 the original author or authors.
+ * Copyright 2002-2012 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.
@@ -13,6 +13,7 @@
* See the License for the s... | true |
Other | spring-projects | spring-framework | 3bb515bec72b1984ae422f7a9da12e412978f61c.json | Improve async support in Spring MVC Test
When obtaining an async result, tests will now await concurrent
processing to complete for the exact amount of time equal to the
actual async timeout value.
Issue: SPR-9875 | spring-test-mvc/src/main/java/org/springframework/test/web/servlet/DefaultMvcResult.java | @@ -15,8 +15,15 @@
*/
package org.springframework.test.web.servlet;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+import javax.servlet.http.HttpServletRequest;
+
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServle... | true |
Other | spring-projects | spring-framework | 3bb515bec72b1984ae422f7a9da12e412978f61c.json | Improve async support in Spring MVC Test
When obtaining an async result, tests will now await concurrent
processing to complete for the exact amount of time equal to the
actual async timeout value.
Issue: SPR-9875 | spring-test-mvc/src/main/java/org/springframework/test/web/servlet/MvcResult.java | @@ -75,4 +75,14 @@ public interface MvcResult {
*/
FlashMap getFlashMap();
+ /**
+ * Get the result of asynchronous execution or {@code null} if concurrent
+ * handling did not start. This method will hold and await the completion
+ * of concurrent handling.
+ *
+ * @throws IllegalStateException if concurre... | true |
Other | spring-projects | spring-framework | 3bb515bec72b1984ae422f7a9da12e412978f61c.json | Improve async support in Spring MVC Test
When obtaining an async result, tests will now await concurrent
processing to complete for the exact amount of time equal to the
actual async timeout value.
Issue: SPR-9875 | spring-test-mvc/src/main/java/org/springframework/test/web/servlet/TestDispatcherServlet.java | @@ -19,7 +19,6 @@
import java.io.IOException;
import java.util.concurrent.Callable;
import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
@@ -56,32 +55,41 @@ public TestDispatcherServlet(WebApplicationContext... | true |
Other | spring-projects | spring-framework | 3bb515bec72b1984ae422f7a9da12e412978f61c.json | Improve async support in Spring MVC Test
When obtaining an async result, tests will now await concurrent
processing to complete for the exact amount of time equal to the
actual async timeout value.
Issue: SPR-9875 | spring-test-mvc/src/main/java/org/springframework/test/web/servlet/request/MockAsyncContext.java | @@ -48,7 +48,7 @@ class MockAsyncContext implements AsyncContext {
private String dispatchedPath;
- private long timeout = 10 * 60 * 1000L; // 10 seconds is Tomcat's default
+ private long timeout = 10 * 1000L; // 10 seconds is Tomcat's default
public MockAsyncContext(ServletRequest request, ServletResponse... | true |
Other | spring-projects | spring-framework | 3bb515bec72b1984ae422f7a9da12e412978f61c.json | Improve async support in Spring MVC Test
When obtaining an async result, tests will now await concurrent
processing to complete for the exact amount of time equal to the
actual async timeout value.
Issue: SPR-9875 | spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/RequestResultMatchers.java | @@ -30,8 +30,6 @@
import org.springframework.test.web.servlet.ResultMatcher;
import org.springframework.web.context.request.async.AsyncTask;
import org.springframework.web.context.request.async.DeferredResult;
-import org.springframework.web.context.request.async.WebAsyncManager;
-import org.springframework.web.cont... | true |
Other | spring-projects | spring-framework | 3bb515bec72b1984ae422f7a9da12e412978f61c.json | Improve async support in Spring MVC Test
When obtaining an async result, tests will now await concurrent
processing to complete for the exact amount of time equal to the
actual async timeout value.
Issue: SPR-9875 | spring-test-mvc/src/test/java/org/springframework/test/web/servlet/StubMvcResult.java | @@ -120,4 +120,8 @@ public void setResponse(MockHttpServletResponse response) {
this.response = response;
}
+ public Object getAsyncResult() {
+ return null;
+ }
+
} | true |
Other | spring-projects | spring-framework | 8270d82bda85f227780f03e6cdcac9ae721118ad.json | Fix failing test
Issue: SPR-7905 | spring-test-mvc/src/main/java/org/springframework/test/web/client/match/ContentRequestMatchers.java | @@ -56,14 +56,14 @@ protected ContentRequestMatchers() {
/**
* Assert the request content type as a String.
*/
- public RequestMatcher mimeType(String expectedContentType) {
- return mimeType(MediaType.parseMediaType(expectedContentType));
+ public RequestMatcher contentType(String expectedContentType) {
+ re... | true |
Other | spring-projects | spring-framework | 8270d82bda85f227780f03e6cdcac9ae721118ad.json | Fix failing test
Issue: SPR-7905 | spring-test-mvc/src/test/java/org/springframework/test/web/client/match/ContentRequestMatchersTests.java | @@ -42,22 +42,22 @@ public void setUp() {
public void testContentType() throws Exception {
this.request.getHeaders().setContentType(MediaType.APPLICATION_JSON);
- MockRestRequestMatchers.content().mimeType("application/json").match(this.request);
- MockRestRequestMatchers.content().mimeType(MediaType.APPLICATI... | true |
Other | spring-projects | spring-framework | 8270d82bda85f227780f03e6cdcac9ae721118ad.json | Fix failing test
Issue: SPR-7905 | spring-test-mvc/src/test/java/org/springframework/test/web/client/samples/matchers/ContentRequestMatcherTests.java | @@ -62,14 +62,14 @@ public void setup() {
@Test
public void contentType() throws Exception {
- this.mockServer.expect(content().mimeType("application/json;charset=UTF-8")).andRespond(withSuccess());
+ this.mockServer.expect(content().contentType("application/json;charset=UTF-8")).andRespond(withSuccess());
t... | true |
Other | spring-projects | spring-framework | 8270d82bda85f227780f03e6cdcac9ae721118ad.json | Fix failing test
Issue: SPR-7905 | spring-test-mvc/src/test/java/org/springframework/test/web/client/samples/matchers/HeaderRequestMatcherTests.java | @@ -63,7 +63,7 @@ public void setup() {
public void testString() throws Exception {
this.mockServer.expect(requestTo("/person/1"))
- .andExpect(header("Accept", "application/json"))
+ .andExpect(header("Accept", "application/json, application/*+json"))
.andRespond(withSuccess(RESPONSE_BODY, MediaType.APP... | true |
Other | spring-projects | spring-framework | 8270d82bda85f227780f03e6cdcac9ae721118ad.json | Fix failing test
Issue: SPR-7905 | spring-test-mvc/src/test/java/org/springframework/test/web/client/samples/matchers/JsonPathRequestMatcherTests.java | @@ -77,7 +77,7 @@ public void setup() {
@Test
public void testExists() throws Exception {
this.mockServer.expect(requestTo("/composers"))
- .andExpect(content().mimeType("application/json;charset=UTF-8"))
+ .andExpect(content().contentType("application/json;charset=UTF-8"))
.andExpect(jsonPath("$.compose... | true |
Other | spring-projects | spring-framework | 8270d82bda85f227780f03e6cdcac9ae721118ad.json | Fix failing test
Issue: SPR-7905 | spring-test-mvc/src/test/java/org/springframework/test/web/client/samples/matchers/XmlContentRequestMatcherTests.java | @@ -89,7 +89,7 @@ public void setup() {
@Test
public void testXmlEqualTo() throws Exception {
this.mockServer.expect(requestTo("/composers"))
- .andExpect(content().mimeType("application/xml"))
+ .andExpect(content().contentType("application/xml"))
.andExpect(content().xml(PEOPLE_XML))
.andRespond(wi... | true |
Other | spring-projects | spring-framework | 8270d82bda85f227780f03e6cdcac9ae721118ad.json | Fix failing test
Issue: SPR-7905 | spring-test-mvc/src/test/java/org/springframework/test/web/client/samples/matchers/XpathRequestMatcherTests.java | @@ -97,7 +97,7 @@ public void testExists() throws Exception {
String performer = "/ns:people/performers/performer[%s]";
this.mockServer.expect(requestTo("/composers"))
- .andExpect(content().mimeType("application/xml"))
+ .andExpect(content().contentType("application/xml"))
.andExpect(xpath(composer, NS... | true |
Other | chartjs | Chart.js | 41f2b5707a225bac47f786dea60b51cc1e4bb1f6.json | Add codeclimate config | .codeclimate.yml | @@ -0,0 +1,4 @@
+## Exclude dist files and samples from codeclimate
+exclude_paths:
+ - dist/**/*
+ - samples/**/*
\ No newline at end of file | false |
Other | chartjs | Chart.js | 58fcb37760ad1d0421f15b1081fd55bdbeccd314.json | fix typo in readme | README.md | @@ -1,6 +1,6 @@
# Chart.js
-[](https://travis-ci.org/nnnick/Chart.js) [](https://codeclimate.com/github/nnnick/Chart.js)[ {
function unittestTask() {
- var files = ['./dist/Chart.bundle.js']
+ var files = ['./src/**/*.js'];
Array.prototype.unshift.apply(files, preTestFiles);
Array.prototype.push.apply(files, testFiles);
@@ -145,7 +145,7 @@ function unittestTask() {
}
function... | true |
Other | chartjs | Chart.js | a84f9d917721f4f06965c88186a37e8200aecce7.json | Update other test tasks to use karma-browserify | karma.conf.ci.js | @@ -7,8 +7,14 @@ module.exports = function(config) {
flags: ['--no-sandbox']
}
},
- frameworks: ['jasmine'],
+ frameworks: ['browserify', 'jasmine'],
reporters: ['progress', 'html'],
+ preprocessors: {
+ 'src/**/*.js': ['browserify']
+ },
+ browserify: {
+ debug: true
+ }
};
if (process.e... | true |
Other | chartjs | Chart.js | a84f9d917721f4f06965c88186a37e8200aecce7.json | Update other test tasks to use karma-browserify | karma.conf.js | @@ -1,7 +1,14 @@
module.exports = function(config) {
config.set({
browsers: ['Chrome', 'Firefox'],
- frameworks: ['jasmine'],
+ frameworks: ['browserify', 'jasmine'],
reporters: ['progress', 'html'],
+
+ preprocessors: {
+ 'src/**/*.js': ['browserify']
+ },
+ browserify: {
+ debug: true
+ }
});
};... | true |
Other | chartjs | Chart.js | 9cf31da4c92fc6200c4983127700f08f29a8c161.json | Add docs for global font options | docs/00-Getting-Started.md | @@ -103,6 +103,10 @@ hover |-|-|-
*hover*.animationDuration | Number | 400 | Duration in milliseconds it takes to animate hover style changes
onClick | Function | null | Called if the event is of type 'mouseup' or 'click'. Called in the context of the chart and passed an array of active elements
defaultColor | Color... | false |
Other | chartjs | Chart.js | 0c534e1eb8140e09f8d55bba7431fd4116dc9dd6.json | Fix layout service | src/core/core.layoutService.js | @@ -179,7 +179,9 @@
bottom: 0,
};
- box.update(box.options.fullWidth ? chartWidth : maxChartAreaWidth, minBoxSize.minSize.height, scaleMargin);
+ // Don't use min size here because of label rotation. When the labels are rotated, their rotation highly depends
+ // on the margin. Sometimes... | false |
Other | chartjs | Chart.js | f2899934db78ad0edcc8d61b8bd9377e078a358c.json | Draw line at edge of scales & update tests | src/core/core.scale.js | @@ -603,7 +603,6 @@
}
}
-
this.ctx.translate(xLabelValue, yLabelValue);
this.ctx.rotate(helpers.toRadians(this.labelRotation) * -1);
this.ctx.font = labelFont;
@@ -630,6 +629,21 @@
this.ctx.restore();
}
}
+
+ // Draw the line at the edge of the axis
+ t... | true |
Other | chartjs | Chart.js | f2899934db78ad0edcc8d61b8bd9377e078a358c.json | Draw line at edge of scales & update tests | test/scale.linear.tests.js | @@ -978,6 +978,21 @@ describe('Linear Scale', function() {
}, {
"name": "restore",
"args": []
+ }, {
+ "name": "setLineWidth",
+ "args": [1]
+ }, {
+ "name": "setStrokeStyle",
+ "args": ["rgba(0, 0, 0, 0.1)"]
+ }, {
+ "name": "moveTo",
+ "args": [0, 100]
+ }, {
+ "name": "lineTo",
+ "args... | true |
Other | chartjs | Chart.js | 77185993df7c7e1171c8b3bac9b551ea616d54a8.json | fix spaces -> tabs | src/Chart.Doughnut.js | @@ -93,8 +93,8 @@
addData : function(segment, atIndex, silent){
var index = atIndex !== undefined ? atIndex : this.segments.length;
if ( typeof(segment.color) === "undefined" ) {
- segment.color = Chart.defaults.global.segmentColorDefault[index];
- segment.highlight = Chart.defa... | false |
Other | chartjs | Chart.js | fd2344dd5f9de7b4aebff48fb21af3670705551f.json | Update the docs to reflect the new feature | docs/05-Pie-Doughnut-Chart.md | @@ -137,6 +137,8 @@ myDoughnutChart.update();
Calling `addData(segmentData, index)` on your Chart instance passing an object in the same format as in the constructor. There is an optional second argument of 'index', this determines at what index the new segment should be inserted into the chart.
+If you don't spec... | false |
Other | chartjs | Chart.js | bbc6f5aa5fdcfd1be9def2787ecddc3003babcba.json | Fix broken test | test/element.rectangle.tests.js | @@ -109,7 +109,7 @@ describe('Rectangle element tests', function() {
expect(rectangle.tooltipPosition()).toEqual({
x: 10,
- y: 0,
+ y: 15,
});
// Test when the y is below the base (negative bar) | false |
Other | chartjs | Chart.js | 8e7162ca91a704b637852e3a813519a7fcfdbf46.json | Add missing comma | docs/02-Line-Chart.md | @@ -81,7 +81,7 @@ var data = {
pointHoverBorderWidth: 2,
// Tension - bezier curve tension of the line. Set to 0 to draw straight Wlines connecting points
- tension: 0.1
+ tension: 0.1,
// The actual data
data: [65, 59, 80, 81, 56, 55, 40],
@@ -151,4 +151,4 @@ new Chart(ctx, {
// and the Line c... | false |
Other | chartjs | Chart.js | 3d6b47b0d5de5e341ec69f978864609f11d7ef63.json | Fix legend generation when no datasets | src/controllers/controller.doughnut.js | @@ -35,16 +35,20 @@ module.exports = function(Chart) {
legend: {
labels: {
generateLabels: function(data) {
- return data.labels.map(function(label, i) {
- return {
- text: label,
- fillStyle: data.datasets[0].backgroundColor[i],
- hidden: isNaN(data.datasets[0].data[i]),
-
- ... | true |
Other | chartjs | Chart.js | 3d6b47b0d5de5e341ec69f978864609f11d7ef63.json | Fix legend generation when no datasets | src/controllers/controller.polarArea.js | @@ -36,16 +36,20 @@ module.exports = function(Chart) {
legend: {
labels: {
generateLabels: function(data) {
- return data.labels.map(function(label, i) {
- return {
- text: label,
- fillStyle: data.datasets[0].backgroundColor[i],
- hidden: isNaN(data.datasets[0].data[i]),
-
- ... | true |
Other | chartjs | Chart.js | 8d5b3809f6a607ebf2be7af40fb538ea5e42c4db.json | Fix global font settings | src/core/core.legend.js | @@ -22,10 +22,6 @@ module.exports = function(Chart) {
labels: {
boxWidth: 40,
- fontSize: Chart.defaults.global.defaultFontSize,
- fontStyle: Chart.defaults.global.defaultFontStyle,
- fontColor: Chart.defaults.global.defaultFontColor,
- fontFamily: Chart.defaults.global.defaultFontFamily,
padding: ... | true |
Other | chartjs | Chart.js | 8d5b3809f6a607ebf2be7af40fb538ea5e42c4db.json | Fix global font settings | src/core/core.scale.js | @@ -21,11 +21,6 @@ module.exports = function(Chart) {
// scale label
scaleLabel: {
- fontColor: Chart.defaults.global.defaultFontColor,
- fontFamily: Chart.defaults.global.defaultFontFamily,
- fontSize: Chart.defaults.global.defaultFontSize,
- fontStyle: Chart.defaults.global.defaultFontStyle,
-
// ... | true |
Other | chartjs | Chart.js | 8d5b3809f6a607ebf2be7af40fb538ea5e42c4db.json | Fix global font settings | src/core/core.title.js | @@ -9,9 +9,6 @@ module.exports = function(Chart) {
position: 'top',
fullWidth: true, // marks that this box should take the full width of the canvas (pushing down other boxes)
- fontColor: Chart.defaults.global.defaultFontColor,
- fontFamily: Chart.defaults.global.defaultFontFamily,
- fontSize: Chart.default... | true |
Other | chartjs | Chart.js | 8d5b3809f6a607ebf2be7af40fb538ea5e42c4db.json | Fix global font settings | src/core/core.tooltip.js | @@ -9,21 +9,14 @@ module.exports = function(Chart) {
custom: null,
mode: 'single',
backgroundColor: "rgba(0,0,0,0.8)",
- titleFontFamily: Chart.defaults.global.defaultFontFamily,
- titleFontSize: Chart.defaults.global.defaultFontSize,
titleFontStyle: "bold",
titleSpacing: 2,
titleMarginBottom: 6,
... | true |
Other | chartjs | Chart.js | 8d5b3809f6a607ebf2be7af40fb538ea5e42c4db.json | Fix global font settings | src/scales/scale.linear.js | @@ -162,12 +162,11 @@ module.exports = function(Chart) {
var maxTicks;
if (this.isHorizontal()) {
- maxTicks = Math.min(this.options.ticks.maxTicksLimit ? this.options.ticks.maxTicksLimit : 11,
- Math.ceil(this.width / 50));
+ maxTicks = Math.min(this.options.ticks.maxTicksLimit ? this.options.ticks... | true |
Other | chartjs | Chart.js | 8d5b3809f6a607ebf2be7af40fb538ea5e42c4db.json | Fix global font settings | src/scales/scale.radialLinear.js | @@ -34,18 +34,9 @@ module.exports = function(Chart) {
},
pointLabels: {
- //String - Point label font declaration
- fontFamily: Chart.defaults.global.defaultFontFamily,
-
- //String - Point label font weight
- fontStyle: Chart.defaults.global.defaultFontStyle,
-
//Number - Point label font size in p... | true |
Other | chartjs | Chart.js | 8d5b3809f6a607ebf2be7af40fb538ea5e42c4db.json | Fix global font settings | src/scales/scale.time.js | @@ -145,8 +145,9 @@ module.exports = function(Chart) {
this.tickRange = Math.ceil(this.lastTick.diff(this.firstTick, this.tickUnit, true));
} else {
// Determine the smallest needed unit of the time
+ var tickFontSize = helpers.getValueOrDefault(this.options.ticks.fontSize, Chart.defaults.global.defaul... | true |
Other | chartjs | Chart.js | 8d5b3809f6a607ebf2be7af40fb538ea5e42c4db.json | Fix global font settings | test/core.helpers.tests.js | @@ -225,19 +225,11 @@ describe('Core helper tests', function() {
},
position: "right",
scaleLabel: {
- fontColor: '#666',
- fontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",
- fontSize: 12,
- fontStyle: 'normal',
labelString: '',
display: false,
... | true |
Other | chartjs | Chart.js | 8d5b3809f6a607ebf2be7af40fb538ea5e42c4db.json | Fix global font settings | test/core.legend.tests.js | @@ -18,10 +18,6 @@ describe('Legend block tests', function() {
labels: {
boxWidth: 40,
- fontSize: Chart.defaults.global.defaultFontSize,
- fontStyle: Chart.defaults.global.defaultFontStyle,
- fontColor: Chart.defaults.global.defaultFontColor,
- fontFamily: Chart.defaults.global.defaultFontFamily... | true |
Other | chartjs | Chart.js | 8d5b3809f6a607ebf2be7af40fb538ea5e42c4db.json | Fix global font settings | test/core.title.tests.js | @@ -11,9 +11,6 @@ describe('Title block tests', function() {
display: false,
position: 'top',
fullWidth: true,
- fontColor: Chart.defaults.global.defaultFontColor,
- fontFamily: Chart.defaults.global.defaultFontFamily,
- fontSize: Chart.defaults.global.defaultFontSize,
fontStyle: 'bold',
paddi... | true |
Other | chartjs | Chart.js | 8d5b3809f6a607ebf2be7af40fb538ea5e42c4db.json | Fix global font settings | test/scale.category.tests.js | @@ -24,19 +24,11 @@ describe('Category scale tests', function() {
},
position: "bottom",
scaleLabel: {
- fontColor: '#666',
- fontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",
- fontSize: 12,
- fontStyle: 'normal',
labelString: '',
display: false,
},
ticks: {
... | true |
Other | chartjs | Chart.js | 8d5b3809f6a607ebf2be7af40fb538ea5e42c4db.json | Fix global font settings | test/scale.linear.tests.js | @@ -23,19 +23,11 @@ describe('Linear Scale', function() {
},
position: "left",
scaleLabel: {
- fontColor: '#666',
- fontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",
- fontSize: 12,
- fontStyle: 'normal',
labelString: '',
display: false,
},
ticks: {
beginAt... | true |
Other | chartjs | Chart.js | 8d5b3809f6a607ebf2be7af40fb538ea5e42c4db.json | Fix global font settings | test/scale.logarithmic.tests.js | @@ -22,19 +22,11 @@ describe('Logarithmic Scale tests', function() {
},
position: "left",
scaleLabel: {
- fontColor: '#666',
- fontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",
- fontSize: 12,
- fontStyle: 'normal',
labelString: '',
display: false,
},
ticks: {
... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.