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
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-aop/src/main/java/org/springframework/aop/framework/ReflectiveMethodInvocation.java
@@ -151,12 +151,12 @@ public Object proceed() throws Throwable { } Object interceptorOrInterceptionAdvice = - this.interceptorsAndDynamicMethodMatchers.get(++this.currentInterceptorIndex); + this.interceptorsAndDynamicMethodMatchers.get(++this.currentInterceptorIndex); if (interceptorOrInterceptionAdvice instanceof InterceptorAndDynamicMethodMatcher) { // Evaluate dynamic method matcher here: static part will already have // been evaluated and found to match. InterceptorAndDynamicMethodMatcher dm = - (InterceptorAndDynamicMethodMatcher) interceptorOrInterceptionAdvice; + (InterceptorAndDynamicMethodMatcher) interceptorOrInterceptionAdvice; if (dm.methodMatcher.matches(this.method, this.targetClass, this.arguments)) { return dm.interceptor.invoke(this); }
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-aop/src/main/java/org/springframework/aop/target/ThreadLocalTargetSource.java
@@ -78,8 +78,10 @@ public Object getTarget() throws BeansException { Object target = this.targetInThread.get(); if (target == null) { if (logger.isDebugEnabled()) { - logger.debug("No target for prototype '" + getTargetBeanName() + "' bound to thread: " + - "creating one and binding it to thread '" + Thread.currentThread().getName() + "'"); + logger.debug("No target for prototype '" + getTargetBeanName() + + "' bound to thread: " + + "creating one and binding it to thread '" + + Thread.currentThread().getName() + "'"); } // Associate target with ThreadLocal. target = newPrototypeInstance();
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-aop/src/test/java/org/springframework/aop/aspectj/TigerAspectJExpressionPointcutTests.java
@@ -90,9 +90,9 @@ public void testMatchGenericArgument() { @Test public void testMatchVarargs() throws SecurityException, NoSuchMethodException { class MyTemplate { - public int queryForInt(String sql, Object... params) { - return 0; - } + public int queryForInt(String sql, Object... params) { + return 0; + } } String expression = "execution(int *.*(String, Object...))"; @@ -101,8 +101,8 @@ public int queryForInt(String sql, Object... params) { // TODO: the expression above no longer matches Object[] // assertFalse(jdbcVarArgs.matches( - // JdbcTemplate.class.getMethod("queryForInt", String.class, Object[].class), - // JdbcTemplate.class)); + // JdbcTemplate.class.getMethod("queryForInt", String.class, Object[].class), + // JdbcTemplate.class)); assertTrue(jdbcVarArgs.matches( MyTemplate.class.getMethod("queryForInt", String.class, Object[].class),
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-aop/src/test/java/org/springframework/aop/aspectj/TrickyAspectJPointcutExpressionTests.java
@@ -131,14 +131,14 @@ public TestException(String string) { } public static interface TestService { - public String sayHello(); + public String sayHello(); } @Log - public static class TestServiceImpl implements TestService{ - public String sayHello() { - throw new TestException("TestServiceImpl"); - } + public static class TestServiceImpl implements TestService { + public String sayHello() { + throw new TestException("TestServiceImpl"); + } } public class LogUserAdvice implements MethodBeforeAdvice, ThrowsAdvice { @@ -149,12 +149,12 @@ public class LogUserAdvice implements MethodBeforeAdvice, ThrowsAdvice { public void before(Method method, Object[] objects, Object o) throws Throwable { countBefore++; - } + } public void afterThrowing(Exception e) throws Throwable { countThrows++; - throw e; - } + throw e; + } public int getCountBefore() { return countBefore;
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-aop/src/test/java/org/springframework/aop/aspectj/TypePatternClassFilterTests.java
@@ -80,7 +80,7 @@ public void testAndOrNotReplacement() { @Test(expected=IllegalArgumentException.class) public void testSetTypePatternWithNullArgument() throws Exception { - new TypePatternClassFilter(null); + new TypePatternClassFilter(null); } @Test(expected=IllegalStateException.class)
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AbstractAspectJAdvisorFactoryTests.java
@@ -411,6 +411,7 @@ public void testIntroductionOnTargetExcludedByTypePattern() { CannotBeUnlocked.class); assertFalse("Type pattern must have excluded mixin", proxy instanceof Lockable); } + /* prereq AspectJ 1.6.7 @Test public void testIntroductionBasedOnAnnotationMatch_Spr5307() { @@ -426,8 +427,10 @@ public void testIntroductionBasedOnAnnotationMatch_Spr5307() { Lockable lockable = (Lockable)proxy; lockable.locked(); } - */ + */ + // TODO: Why does this test fail? It hasn't been run before, so it maybe never actually passed... + public void XtestIntroductionWithArgumentBinding() { TestBean target = new TestBean(); @@ -764,8 +767,8 @@ public static class BindingAspectWithSingleArg { public void setAge(int a) {} @Around(value="setAge(age)",argNames="age") - // @ArgNames({"age"}) // AMC needs more work here? ignoring pjp arg... ok?? - // // argNames should be suported in Around as it is in Pointcut + // @ArgNames({"age"}) // AMC needs more work here? ignoring pjp arg... ok?? + // argNames should be suported in Around as it is in Pointcut public void changeReturnType(ProceedingJoinPoint pjp, int age) throws Throwable { pjp.proceed(new Object[] {age*2}); }
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-aop/src/test/java/org/springframework/aop/framework/MethodInvocationTests.java
@@ -68,7 +68,7 @@ public String toString() { Method m = Object.class.getMethod("hashCode", (Class[]) null); Object proxy = new Object(); ReflectiveMethodInvocation invocation = - new ReflectiveMethodInvocation(proxy, target, m, null, null, is); + new ReflectiveMethodInvocation(proxy, target, m, null, null, is); // If it hits target, the test will fail with the UnsupportedOpException // in the inner class above.
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/GenericInterfaceDrivenDependencyInjectionAspect.aj
@@ -41,7 +41,7 @@ package org.springframework.beans.factory.aspectj; * @since 3.0.0 */ public abstract aspect GenericInterfaceDrivenDependencyInjectionAspect<I> extends AbstractInterfaceDrivenDependencyInjectionAspect { - declare parents: I implements ConfigurableObject; + declare parents: I implements ConfigurableObject; public pointcut inConfigurableBean() : within(I+);
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-aspects/src/main/java/org/springframework/orm/jpa/aspectj/JpaExceptionTranslatorAspect.aj
@@ -9,14 +9,14 @@ import org.springframework.dao.DataAccessException; import org.springframework.orm.jpa.EntityManagerFactoryUtils; public aspect JpaExceptionTranslatorAspect { - pointcut entityManagerCall(): call(* EntityManager.*(..)) || call(* EntityManagerFactory.*(..)) || call(* EntityTransaction.*(..)) || call(* Query.*(..)); + pointcut entityManagerCall(): call(* EntityManager.*(..)) || call(* EntityManagerFactory.*(..)) || call(* EntityTransaction.*(..)) || call(* Query.*(..)); - after() throwing(RuntimeException re): entityManagerCall() { - DataAccessException dex = EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(re); - if (dex != null) { - throw dex; - } else { - throw re; - } - } -} \ No newline at end of file + after() throwing(RuntimeException re): entityManagerCall() { + DataAccessException dex = EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(re); + if (dex != null) { + throw dex; + } else { + throw re; + } + } +}
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-aspects/src/main/java/org/springframework/transaction/aspectj/AbstractTransactionAspect.aj
@@ -66,7 +66,7 @@ public abstract aspect AbstractTransactionAspect extends TransactionAspectSuppor @SuppressAjWarnings("adviceDidNotMatch") after(Object txObject) throwing(Throwable t) : transactionalMethodExecution(txObject) { try { - completeTransactionAfterThrowing(TransactionAspectSupport.currentTransactionInfo(), t); + completeTransactionAfterThrowing(TransactionAspectSupport.currentTransactionInfo(), t); } catch (Throwable t2) { logger.error("Failed to close transaction after throwing in a transactional method", t2);
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-aspects/src/test/java/org/springframework/mock/staticmock/Person_Roo_Entity.aj
@@ -18,83 +18,83 @@ package org.springframework.mock.staticmock; privileged aspect Person_Roo_Entity { - @javax.persistence.PersistenceContext - transient javax.persistence.EntityManager Person.entityManager; - - @javax.persistence.Id - @javax.persistence.GeneratedValue(strategy = javax.persistence.GenerationType.AUTO) - @javax.persistence.Column(name = "id") - private java.lang.Long Person.id; - - @javax.persistence.Version - @javax.persistence.Column(name = "version") - private java.lang.Integer Person.version; - - public java.lang.Long Person.getId() { - return this.id; - } - - public void Person.setId(java.lang.Long id) { - this.id = id; - } - - public java.lang.Integer Person.getVersion() { - return this.version; - } - - public void Person.setVersion(java.lang.Integer version) { - this.version = version; - } - - @org.springframework.transaction.annotation.Transactional - public void Person.persist() { - if (this.entityManager == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)"); - this.entityManager.persist(this); - } - - @org.springframework.transaction.annotation.Transactional - public void Person.remove() { - if (this.entityManager == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)"); - this.entityManager.remove(this); - } - - @org.springframework.transaction.annotation.Transactional - public void Person.flush() { - if (this.entityManager == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)"); - this.entityManager.flush(); - } - - @org.springframework.transaction.annotation.Transactional - public void Person.merge() { - if (this.entityManager == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)"); - Person merged = this.entityManager.merge(this); - this.entityManager.flush(); - this.id = merged.getId(); - } - - public static long Person.countPeople() { - javax.persistence.EntityManager em = new Person().entityManager; - if (em == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)"); - return (Long) em.createQuery("select count(o) from Person o").getSingleResult(); - } - - public static java.util.List<Person> Person.findAllPeople() { - javax.persistence.EntityManager em = new Person().entityManager; - if (em == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)"); - return em.createQuery("select o from Person o").getResultList(); - } - - public static Person Person.findPerson(java.lang.Long id) { - if (id == null) throw new IllegalArgumentException("An identifier is required to retrieve an instance of Person"); - javax.persistence.EntityManager em = new Person().entityManager; - if (em == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)"); - return em.find(Person.class, id); - } - - public static java.util.List<Person> Person.findPersonEntries(int firstResult, int maxResults) { - javax.persistence.EntityManager em = new Person().entityManager; - if (em == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)"); - return em.createQuery("select o from Person o").setFirstResult(firstResult).setMaxResults(maxResults).getResultList(); - } + @javax.persistence.PersistenceContext + transient javax.persistence.EntityManager Person.entityManager; + + @javax.persistence.Id + @javax.persistence.GeneratedValue(strategy = javax.persistence.GenerationType.AUTO) + @javax.persistence.Column(name = "id") + private java.lang.Long Person.id; + + @javax.persistence.Version + @javax.persistence.Column(name = "version") + private java.lang.Integer Person.version; + + public java.lang.Long Person.getId() { + return this.id; + } + + public void Person.setId(java.lang.Long id) { + this.id = id; + } + + public java.lang.Integer Person.getVersion() { + return this.version; + } + + public void Person.setVersion(java.lang.Integer version) { + this.version = version; + } + + @org.springframework.transaction.annotation.Transactional + public void Person.persist() { + if (this.entityManager == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)"); + this.entityManager.persist(this); + } + + @org.springframework.transaction.annotation.Transactional + public void Person.remove() { + if (this.entityManager == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)"); + this.entityManager.remove(this); + } + + @org.springframework.transaction.annotation.Transactional + public void Person.flush() { + if (this.entityManager == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)"); + this.entityManager.flush(); + } + + @org.springframework.transaction.annotation.Transactional + public void Person.merge() { + if (this.entityManager == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)"); + Person merged = this.entityManager.merge(this); + this.entityManager.flush(); + this.id = merged.getId(); + } + + public static long Person.countPeople() { + javax.persistence.EntityManager em = new Person().entityManager; + if (em == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)"); + return (Long) em.createQuery("select count(o) from Person o").getSingleResult(); + } + + public static java.util.List<Person> Person.findAllPeople() { + javax.persistence.EntityManager em = new Person().entityManager; + if (em == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)"); + return em.createQuery("select o from Person o").getResultList(); + } + + public static Person Person.findPerson(java.lang.Long id) { + if (id == null) throw new IllegalArgumentException("An identifier is required to retrieve an instance of Person"); + javax.persistence.EntityManager em = new Person().entityManager; + if (em == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)"); + return em.find(Person.class, id); + } + + public static java.util.List<Person> Person.findPersonEntries(int firstResult, int maxResults) { + javax.persistence.EntityManager em = new Person().entityManager; + if (em == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)"); + return em.createQuery("select o from Person o").setFirstResult(firstResult).setMaxResults(maxResults).getResultList(); + } }
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-beans/src/main/java/org/springframework/beans/AbstractPropertyAccessor.java
@@ -103,7 +103,7 @@ public void setPropertyValues(PropertyValues pvs, boolean ignoreUnknown, boolean } - // Redefined with public visibility. + // Redefined with public visibility. @Override public Class getPropertyType(String propertyPath) { return null;
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-beans/src/main/java/org/springframework/beans/BeanWrapperImpl.java
@@ -738,7 +738,7 @@ public Object run() throws Exception { } } else { - value = readMethod.invoke(object, (Object[]) null); + value = readMethod.invoke(object, (Object[]) null); } if (tokens.keys != null) {
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-beans/src/main/java/org/springframework/beans/DirectFieldAccessor.java
@@ -64,7 +64,7 @@ public void doWith(Field field) { if (fieldMap.containsKey(field.getName())) { // ignore superclass declarations of fields already found in a subclass } - else { + else { fieldMap.put(field.getName(), field); } }
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-beans/src/main/java/org/springframework/beans/PropertyAccessor.java
@@ -191,7 +191,7 @@ public interface PropertyAccessor { * @see #setPropertyValues(PropertyValues, boolean, boolean) */ void setPropertyValues(PropertyValues pvs, boolean ignoreUnknown) - throws BeansException; + throws BeansException; /** * Perform a batch update with full control over behavior. @@ -213,6 +213,6 @@ void setPropertyValues(PropertyValues pvs, boolean ignoreUnknown) * successfully updated. */ void setPropertyValues(PropertyValues pvs, boolean ignoreUnknown, boolean ignoreInvalid) - throws BeansException; + throws BeansException; }
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-beans/src/main/java/org/springframework/beans/factory/config/FieldRetrievingFactoryBean.java
@@ -159,7 +159,7 @@ public void afterPropertiesSet() throws ClassNotFoundException, NoSuchFieldExcep if (this.targetClass == null && this.targetObject == null) { if (this.targetField != null) { throw new IllegalArgumentException( - "Specify targetClass or targetObject in combination with targetField"); + "Specify targetClass or targetObject in combination with targetField"); } // If no other property specified, consider bean name as static field expression.
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-beans/src/main/java/org/springframework/beans/factory/config/PreferencesPlaceholderConfigurer.java
@@ -76,9 +76,9 @@ public void setUserTreePath(String userTreePath) { */ public void afterPropertiesSet() { this.systemPrefs = (this.systemTreePath != null) ? - Preferences.systemRoot().node(this.systemTreePath) : Preferences.systemRoot(); + Preferences.systemRoot().node(this.systemTreePath) : Preferences.systemRoot(); this.userPrefs = (this.userTreePath != null) ? - Preferences.userRoot().node(this.userTreePath) : Preferences.userRoot(); + Preferences.userRoot().node(this.userTreePath) : Preferences.userRoot(); } /**
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-beans/src/main/java/org/springframework/beans/factory/config/PropertyPathFactoryBean.java
@@ -162,15 +162,15 @@ public void setBeanFactory(BeanFactory beanFactory) { if (this.targetBeanWrapper == null && this.targetBeanName == null) { if (this.propertyPath != null) { throw new IllegalArgumentException( - "Specify 'targetObject' or 'targetBeanName' in combination with 'propertyPath'"); + "Specify 'targetObject' or 'targetBeanName' in combination with 'propertyPath'"); } // No other properties specified: check bean name. int dotIndex = this.beanName.indexOf('.'); if (dotIndex == -1) { throw new IllegalArgumentException( - "Neither 'targetObject' nor 'targetBeanName' specified, and PropertyPathFactoryBean " + - "bean name '" + this.beanName + "' does not follow 'beanName.property' syntax"); + "Neither 'targetObject' nor 'targetBeanName' specified, and PropertyPathFactoryBean " + + "bean name '" + this.beanName + "' does not follow 'beanName.property' syntax"); } this.targetBeanName = this.beanName.substring(0, dotIndex); this.propertyPath = this.beanName.substring(dotIndex + 1);
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-beans/src/main/java/org/springframework/beans/factory/support/BeanDefinitionResource.java
@@ -80,7 +80,7 @@ public String getDescription() { @Override public boolean equals(Object obj) { return (obj == this || - (obj instanceof BeanDefinitionResource && + (obj instanceof BeanDefinitionResource && ((BeanDefinitionResource) obj).beanDefinition.equals(this.beanDefinition))); }
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-beans/src/main/java/org/springframework/beans/factory/support/BeanDefinitionValueResolver.java
@@ -339,7 +339,7 @@ private Object resolveManagedArray(Object argName, List<?> ml, Class elementType Object resolved = Array.newInstance(elementType, ml.size()); for (int i = 0; i < ml.size(); i++) { Array.set(resolved, i, - resolveValueIfNecessary(new KeyedArgName(argName, i), ml.get(i))); + resolveValueIfNecessary(new KeyedArgName(argName, i), ml.get(i))); } return resolved; } @@ -351,7 +351,7 @@ private List resolveManagedList(Object argName, List<?> ml) { List<Object> resolved = new ArrayList<Object>(ml.size()); for (int i = 0; i < ml.size(); i++) { resolved.add( - resolveValueIfNecessary(new KeyedArgName(argName, i), ml.get(i))); + resolveValueIfNecessary(new KeyedArgName(argName, i), ml.get(i))); } return resolved; }
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-beans/src/main/java/org/springframework/beans/factory/support/DefaultListableBeanFactory.java
@@ -744,7 +744,7 @@ protected Object doResolveDependency(DependencyDescriptor descriptor, Class<?> t TypeConverter converter = (typeConverter != null ? typeConverter : getTypeConverter()); return (descriptor.getField() != null ? converter.convertIfNecessary(value, type, descriptor.getField()) : - converter.convertIfNecessary(value, type, descriptor.getMethodParameter())); + converter.convertIfNecessary(value, type, descriptor.getMethodParameter())); } if (type.isArray()) {
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-beans/src/main/java/org/springframework/beans/propertyeditors/CustomNumberEditor.java
@@ -85,8 +85,8 @@ public CustomNumberEditor(Class<? extends Number> numberClass, boolean allowEmpt * @see java.text.NumberFormat#parse * @see java.text.NumberFormat#format */ - public CustomNumberEditor(Class<? extends Number> numberClass, NumberFormat numberFormat, boolean allowEmpty) - throws IllegalArgumentException { + public CustomNumberEditor(Class<? extends Number> numberClass, + NumberFormat numberFormat, boolean allowEmpty) throws IllegalArgumentException { if (numberClass == null || !Number.class.isAssignableFrom(numberClass)) { throw new IllegalArgumentException("Property class must be a subclass of Number");
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-beans/src/main/java/org/springframework/beans/support/MutableSortDefinition.java
@@ -159,7 +159,8 @@ public boolean equals(Object other) { } SortDefinition otherSd = (SortDefinition) other; return (getProperty().equals(otherSd.getProperty()) && - isAscending() == otherSd.isAscending() && isIgnoreCase() == otherSd.isIgnoreCase()); + isAscending() == otherSd.isAscending() && + isIgnoreCase() == otherSd.isIgnoreCase()); } @Override
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-beans/src/test/java/org/springframework/beans/BeanUtilsTests.java
@@ -250,17 +250,17 @@ public void testResolveSignatureWithArray() throws Exception { } @Test - public void testSPR6063() { - PropertyDescriptor[] descrs = BeanUtils.getPropertyDescriptors(Bean.class); - - PropertyDescriptor keyDescr = BeanUtils.getPropertyDescriptor(Bean.class, "value"); - assertEquals(String.class, keyDescr.getPropertyType()); - for (PropertyDescriptor propertyDescriptor : descrs) { - if (propertyDescriptor.getName().equals(keyDescr.getName())) { - assertEquals(propertyDescriptor.getName() + " has unexpected type", keyDescr.getPropertyType(), propertyDescriptor.getPropertyType()); - } - } - } + public void testSPR6063() { + PropertyDescriptor[] descrs = BeanUtils.getPropertyDescriptors(Bean.class); + + PropertyDescriptor keyDescr = BeanUtils.getPropertyDescriptor(Bean.class, "value"); + assertEquals(String.class, keyDescr.getPropertyType()); + for (PropertyDescriptor propertyDescriptor : descrs) { + if (propertyDescriptor.getName().equals(keyDescr.getName())) { + assertEquals(propertyDescriptor.getName() + " has unexpected type", keyDescr.getPropertyType(), propertyDescriptor.getPropertyType()); + } + } + } private void assertSignatureEquals(Method desiredMethod, String signature) { assertEquals(desiredMethod, BeanUtils.resolveSignature(signature, MethodSignatureBean.class));
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-beans/src/test/java/test/util/TestResourceUtils.java
@@ -27,20 +27,20 @@ */ public class TestResourceUtils { - /** - * Loads a {@link ClassPathResource} qualified by the simple name of clazz, - * and relative to the package for clazz. - * - * <p>Example: given a clazz 'com.foo.BarTests' and a resourceSuffix of 'context.xml', - * this method will return a ClassPathResource representing com/foo/BarTests-context.xml - * - * <p>Intended for use loading context configuration XML files within JUnit tests. - * - * @param clazz - * @param resourceSuffix - */ - public static ClassPathResource qualifiedResource(Class<?> clazz, String resourceSuffix) { - return new ClassPathResource(format("%s-%s", clazz.getSimpleName(), resourceSuffix), clazz); - } + /** + * Loads a {@link ClassPathResource} qualified by the simple name of clazz, + * and relative to the package for clazz. + * + * <p>Example: given a clazz 'com.foo.BarTests' and a resourceSuffix of 'context.xml', + * this method will return a ClassPathResource representing com/foo/BarTests-context.xml + * + * <p>Intended for use loading context configuration XML files within JUnit tests. + * + * @param clazz + * @param resourceSuffix + */ + public static ClassPathResource qualifiedResource(Class<?> clazz, String resourceSuffix) { + return new ClassPathResource(format("%s-%s", clazz.getSimpleName(), resourceSuffix), clazz); + } }
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-context-support/src/main/java/org/springframework/mail/javamail/MimeMessageHelper.java
@@ -241,7 +241,7 @@ public MimeMessageHelper(MimeMessage mimeMessage, boolean multipart) throws Mess * @see #MimeMessageHelper(javax.mail.internet.MimeMessage, int, String) */ public MimeMessageHelper(MimeMessage mimeMessage, boolean multipart, String encoding) - throws MessagingException { + throws MessagingException { this(mimeMessage, (multipart ? MULTIPART_MODE_MIXED_RELATED : MULTIPART_MODE_NO), encoding); } @@ -283,7 +283,7 @@ public MimeMessageHelper(MimeMessage mimeMessage, int multipartMode) throws Mess * @see #MULTIPART_MODE_MIXED_RELATED */ public MimeMessageHelper(MimeMessage mimeMessage, int multipartMode, String encoding) - throws MessagingException { + throws MessagingException { this.mimeMessage = mimeMessage; createMimeMultiparts(mimeMessage, multipartMode); @@ -380,8 +380,8 @@ public final boolean isMultipart() { private void checkMultipart() throws IllegalStateException { if (!isMultipart()) { throw new IllegalStateException("Not in multipart mode - " + - "create an appropriate MimeMessageHelper via a constructor that takes a 'multipart' flag " + - "if you need to set alternative texts or add inline elements or attachments."); + "create an appropriate MimeMessageHelper via a constructor that takes a 'multipart' flag " + + "if you need to set alternative texts or add inline elements or attachments."); } } @@ -546,7 +546,7 @@ public void setFrom(String from) throws MessagingException { public void setFrom(String from, String personal) throws MessagingException, UnsupportedEncodingException { Assert.notNull(from, "From address must not be null"); setFrom(getEncoding() != null ? - new InternetAddress(from, personal, getEncoding()) : new InternetAddress(from, personal)); + new InternetAddress(from, personal, getEncoding()) : new InternetAddress(from, personal)); } public void setReplyTo(InternetAddress replyTo) throws MessagingException { @@ -608,8 +608,8 @@ public void addTo(String to) throws MessagingException { public void addTo(String to, String personal) throws MessagingException, UnsupportedEncodingException { Assert.notNull(to, "To address must not be null"); addTo(getEncoding() != null ? - new InternetAddress(to, personal, getEncoding()) : - new InternetAddress(to, personal)); + new InternetAddress(to, personal, getEncoding()) : + new InternetAddress(to, personal)); } @@ -653,8 +653,8 @@ public void addCc(String cc) throws MessagingException { public void addCc(String cc, String personal) throws MessagingException, UnsupportedEncodingException { Assert.notNull(cc, "Cc address must not be null"); addCc(getEncoding() != null ? - new InternetAddress(cc, personal, getEncoding()) : - new InternetAddress(cc, personal)); + new InternetAddress(cc, personal, getEncoding()) : + new InternetAddress(cc, personal)); } @@ -698,8 +698,8 @@ public void addBcc(String bcc) throws MessagingException { public void addBcc(String bcc, String personal) throws MessagingException, UnsupportedEncodingException { Assert.notNull(bcc, "Bcc address must not be null"); addBcc(getEncoding() != null ? - new InternetAddress(bcc, personal, getEncoding()) : - new InternetAddress(bcc, personal)); + new InternetAddress(bcc, personal, getEncoding()) : + new InternetAddress(bcc, personal)); } private InternetAddress parseAddress(String address) throws MessagingException { @@ -960,7 +960,7 @@ public void addInline(String contentId, Resource resource) throws MessagingExcep * @see #addInline(String, javax.activation.DataSource) */ public void addInline(String contentId, InputStreamSource inputStreamSource, String contentType) - throws MessagingException { + throws MessagingException { Assert.notNull(inputStreamSource, "InputStreamSource must not be null"); if (inputStreamSource instanceof Resource && ((Resource) inputStreamSource).isOpen()) { @@ -1035,7 +1035,7 @@ public void addAttachment(String attachmentFilename, File file) throws Messaging * @see org.springframework.core.io.Resource */ public void addAttachment(String attachmentFilename, InputStreamSource inputStreamSource) - throws MessagingException { + throws MessagingException { String contentType = getFileTypeMap().getContentType(attachmentFilename); addAttachment(attachmentFilename, inputStreamSource, contentType); @@ -1059,7 +1059,7 @@ public void addAttachment(String attachmentFilename, InputStreamSource inputStre */ public void addAttachment( String attachmentFilename, InputStreamSource inputStreamSource, String contentType) - throws MessagingException { + throws MessagingException { Assert.notNull(inputStreamSource, "InputStreamSource must not be null"); if (inputStreamSource instanceof Resource && ((Resource) inputStreamSource).isOpen()) { @@ -1079,7 +1079,7 @@ public void addAttachment( * @return the Activation Framework DataSource */ protected DataSource createDataSource( - final InputStreamSource inputStreamSource, final String contentType, final String name) { + final InputStreamSource inputStreamSource, final String contentType, final String name) { return new DataSource() { public InputStream getInputStream() throws IOException {
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-context-support/src/main/java/org/springframework/scheduling/quartz/LocalDataSourceJobStore.java
@@ -83,14 +83,14 @@ public class LocalDataSourceJobStore extends JobStoreCMT { @Override public void initialize(ClassLoadHelper loadHelper, SchedulerSignaler signaler) - throws SchedulerConfigException { + throws SchedulerConfigException { // Absolutely needs thread-bound DataSource to initialize. this.dataSource = SchedulerFactoryBean.getConfigTimeDataSource(); if (this.dataSource == null) { throw new SchedulerConfigException( - "No local DataSource found for configuration - " + - "'dataSource' property must be set on SchedulerFactoryBean"); + "No local DataSource found for configuration - " + + "'dataSource' property must be set on SchedulerFactoryBean"); } // Configure transactional connection settings for Quartz.
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-context-support/src/main/java/org/springframework/scheduling/quartz/LocalTaskExecutorThreadPool.java
@@ -52,8 +52,8 @@ public void initialize() throws SchedulerConfigException { this.taskExecutor = SchedulerFactoryBean.getConfigTimeTaskExecutor(); if (this.taskExecutor == null) { throw new SchedulerConfigException( - "No local TaskExecutor found for configuration - " + - "'taskExecutor' property must be set on SchedulerFactoryBean"); + "No local TaskExecutor found for configuration - " + + "'taskExecutor' property must be set on SchedulerFactoryBean"); } }
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-context-support/src/main/java/org/springframework/scheduling/quartz/ResourceLoaderClassLoadHelper.java
@@ -77,8 +77,8 @@ public Class loadClass(String name) throws ClassNotFoundException { @SuppressWarnings("unchecked") public <T> Class<? extends T> loadClass(String name, Class<T> clazz) throws ClassNotFoundException { - return loadClass(name); - } + return loadClass(name); + } public URL getResource(String name) { Resource resource = this.resourceLoader.getResource(name);
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-context-support/src/test/java/org/springframework/scheduling/quartz/CronTriggerBeanTests.java
@@ -32,7 +32,7 @@ public void testInvalidStartDelay() { @Test public void testStartTime() throws Exception { - CronTriggerBean bean = createTriggerBean(); + CronTriggerBean bean = createTriggerBean(); Date startTime = new Date(System.currentTimeMillis() + 1234L); bean.setStartTime(startTime); bean.afterPropertiesSet();
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-context/src/main/java/org/springframework/context/support/AbstractApplicationContext.java
@@ -1257,7 +1257,7 @@ private MessageSource getMessageSource() throws IllegalStateException { */ protected MessageSource getInternalParentMessageSource() { return (getParent() instanceof AbstractApplicationContext) ? - ((AbstractApplicationContext) getParent()).messageSource : getParent(); + ((AbstractApplicationContext) getParent()).messageSource : getParent(); }
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-context/src/main/java/org/springframework/ejb/access/LocalSlsbInvokerInterceptor.java
@@ -93,7 +93,7 @@ public Object invokeInContext(MethodInvocation invocation) throws Throwable { } catch (IllegalAccessException ex) { throw new EjbAccessException("Could not access method [" + invocation.getMethod().getName() + - "] of local EJB [" + getJndiName() + "]", ex); + "] of local EJB [" + getJndiName() + "]", ex); } finally { if (ejb instanceof EJBLocalObject) {
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-context/src/main/java/org/springframework/ejb/access/SimpleRemoteSlsbInvokerInterceptor.java
@@ -106,7 +106,7 @@ protected Object doInvoke(MethodInvocation invocation) throws Throwable { if (targetEx instanceof RemoteException) { RemoteException rex = (RemoteException) targetEx; throw RmiClientInterceptorUtils.convertRmiAccessException( - invocation.getMethod(), rex, isConnectFailure(rex), getJndiName()); + invocation.getMethod(), rex, isConnectFailure(rex), getJndiName()); } else if (targetEx instanceof CreateException) { throw RmiClientInterceptorUtils.convertRmiAccessException(
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-context/src/main/java/org/springframework/remoting/rmi/JndiRmiClientInterceptor.java
@@ -190,8 +190,8 @@ public void prepare() throws RemoteLookupFailureException { else if (getServiceInterface() != null) { boolean isImpl = getServiceInterface().isInstance(remoteObj); logger.debug("Using service interface [" + getServiceInterface().getName() + - "] for JNDI RMI object [" + getJndiName() + "] - " + - (!isImpl ? "not " : "") + "directly implemented"); + "] for JNDI RMI object [" + getJndiName() + "] - " + + (!isImpl ? "not " : "") + "directly implemented"); } } if (this.cacheStub) { @@ -426,7 +426,7 @@ else if (targetEx instanceof SystemException) { * @see org.springframework.remoting.support.RemoteInvocation */ protected Object doInvoke(MethodInvocation methodInvocation, RmiInvocationHandler invocationHandler) - throws RemoteException, NoSuchMethodException, IllegalAccessException, InvocationTargetException { + throws RemoteException, NoSuchMethodException, IllegalAccessException, InvocationTargetException { if (AopUtils.isToStringMethod(methodInvocation.getMethod())) { return "RMI invoker proxy for service URL [" + getJndiName() + "]";
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-context/src/main/java/org/springframework/remoting/rmi/RmiClientInterceptor.java
@@ -152,8 +152,8 @@ public void prepare() throws RemoteLookupFailureException { else if (getServiceInterface() != null) { boolean isImpl = getServiceInterface().isInstance(remoteObj); logger.debug("Using service interface [" + getServiceInterface().getName() + - "] for RMI stub [" + getServiceUrl() + "] - " + - (!isImpl ? "not " : "") + "directly implemented"); + "] for RMI stub [" + getServiceUrl() + "] - " + + (!isImpl ? "not " : "") + "directly implemented"); } } if (this.cacheStub) {
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-context/src/main/java/org/springframework/remoting/rmi/RmiInvocationHandler.java
@@ -54,6 +54,6 @@ public interface RmiInvocationHandler extends Remote { * @throws InvocationTargetException if the method invocation resulted in an exception */ public Object invoke(RemoteInvocation invocation) - throws RemoteException, NoSuchMethodException, IllegalAccessException, InvocationTargetException; + throws RemoteException, NoSuchMethodException, IllegalAccessException, InvocationTargetException; }
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-context/src/main/java/org/springframework/remoting/rmi/RmiInvocationWrapper.java
@@ -67,7 +67,7 @@ public String getTargetInterfaceName() { * @see RmiBasedExporter#invoke(org.springframework.remoting.support.RemoteInvocation, Object) */ public Object invoke(RemoteInvocation invocation) - throws RemoteException, NoSuchMethodException, IllegalAccessException, InvocationTargetException { + throws RemoteException, NoSuchMethodException, IllegalAccessException, InvocationTargetException { return this.rmiExporter.invoke(invocation, this.wrappedObject); }
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-context/src/test/java/org/springframework/aop/framework/ProxyFactoryBeanTests.java
@@ -678,8 +678,8 @@ public void testInnerBeanTargetUsingAutowiring() { public void testFrozenFactoryBean() { BeanFactory bf = new XmlBeanFactory(new ClassPathResource(FROZEN_CONTEXT, CLASS)); - Advised advised = (Advised)bf.getBean("frozen"); - assertTrue("The proxy should be frozen", advised.isFrozen()); + Advised advised = (Advised)bf.getBean("frozen"); + assertTrue("The proxy should be frozen", advised.isFrozen()); } @Test
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-context/src/test/java/org/springframework/context/annotation/configuration/AutowiredConfigurationTests.java
@@ -46,7 +46,7 @@ public class AutowiredConfigurationTests { @Test public void testAutowiredConfigurationDependencies() { ClassPathXmlApplicationContext factory = new ClassPathXmlApplicationContext( - AutowiredConfigurationTests.class.getSimpleName() + ".xml", AutowiredConfigurationTests.class); + AutowiredConfigurationTests.class.getSimpleName() + ".xml", AutowiredConfigurationTests.class); assertThat(factory.getBean("colour", Colour.class), equalTo(Colour.RED)); assertThat(factory.getBean("testBean", TestBean.class).getName(), equalTo(Colour.RED.toString())); @@ -100,7 +100,7 @@ static class AutowiredConstructorConfig { @Test public void testValueInjection() { ClassPathXmlApplicationContext factory = new ClassPathXmlApplicationContext( - "ValueInjectionTests.xml", AutowiredConfigurationTests.class); + "ValueInjectionTests.xml", AutowiredConfigurationTests.class); System.clearProperty("myProp"); @@ -155,7 +155,7 @@ public TestBean testBean2() { @Test public void testCustomProperties() { ClassPathXmlApplicationContext factory = new ClassPathXmlApplicationContext( - "AutowiredConfigurationTests-custom.xml", AutowiredConfigurationTests.class); + "AutowiredConfigurationTests-custom.xml", AutowiredConfigurationTests.class); TestBean testBean = factory.getBean("testBean", TestBean.class); assertThat(testBean.getName(), equalTo("localhost"));
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-context/src/test/java/org/springframework/context/annotation/configuration/ImportResourceTests.java
@@ -42,140 +42,140 @@ * @author Juergen Hoeller */ public class ImportResourceTests { - @Test - public void testImportXml() { - AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(ImportXmlConfig.class); - assertTrue("did not contain java-declared bean", ctx.containsBean("javaDeclaredBean")); - assertTrue("did not contain xml-declared bean", ctx.containsBean("xmlDeclaredBean")); + @Test + public void testImportXml() { + AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(ImportXmlConfig.class); + assertTrue("did not contain java-declared bean", ctx.containsBean("javaDeclaredBean")); + assertTrue("did not contain xml-declared bean", ctx.containsBean("xmlDeclaredBean")); TestBean tb = ctx.getBean("javaDeclaredBean", TestBean.class); assertEquals("myName", tb.getName()); - } + } - @Configuration - @ImportResource("classpath:org/springframework/context/annotation/configuration/ImportXmlConfig-context.xml") - static class ImportXmlConfig { + @Configuration + @ImportResource("classpath:org/springframework/context/annotation/configuration/ImportXmlConfig-context.xml") + static class ImportXmlConfig { @Value("${name}") private String name; - public @Bean TestBean javaDeclaredBean() { - return new TestBean(this.name); - } - } - - @Ignore // TODO: SPR-6310 - @Test - public void testImportXmlWithRelativePath() { - AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(ImportXmlWithRelativePathConfig.class); - assertTrue("did not contain java-declared bean", ctx.containsBean("javaDeclaredBean")); - assertTrue("did not contain xml-declared bean", ctx.containsBean("xmlDeclaredBean")); + public @Bean TestBean javaDeclaredBean() { + return new TestBean(this.name); + } + } + + @Ignore // TODO: SPR-6310 + @Test + public void testImportXmlWithRelativePath() { + AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(ImportXmlWithRelativePathConfig.class); + assertTrue("did not contain java-declared bean", ctx.containsBean("javaDeclaredBean")); + assertTrue("did not contain xml-declared bean", ctx.containsBean("xmlDeclaredBean")); TestBean tb = ctx.getBean("javaDeclaredBean", TestBean.class); assertEquals("myName", tb.getName()); - } - - @Configuration - @ImportResource("ImportXmlConfig-context.xml") - static class ImportXmlWithRelativePathConfig { - public @Bean TestBean javaDeclaredBean() { - return new TestBean("java.declared"); - } - } - - @Ignore // TODO: SPR-6310 - @Test - public void testImportXmlByConvention() { - ApplicationContext ctx = new AnnotationConfigApplicationContext(ImportXmlByConventionConfig.class); - assertTrue("context does not contain xml-declared bean", ctx.containsBean("xmlDeclaredBean")); - } - - @Configuration - //@ImportXml - static class ImportXmlByConventionConfig { - } - - @Test - public void testImportXmlIsInheritedFromSuperclassDeclarations() { - AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(FirstLevelSubConfig.class); - assertTrue(ctx.containsBean("xmlDeclaredBean")); - } - - @Test - public void testImportXmlIsMergedFromSuperclassDeclarations() { - AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(SecondLevelSubConfig.class); - assertTrue("failed to pick up second-level-declared XML bean", ctx.containsBean("secondLevelXmlDeclaredBean")); - assertTrue("failed to pick up parent-declared XML bean", ctx.containsBean("xmlDeclaredBean")); - } - - @Configuration - @ImportResource("classpath:org/springframework/context/annotation/configuration/ImportXmlConfig-context.xml") - static class BaseConfig { - } - - @Configuration - static class FirstLevelSubConfig extends BaseConfig { - } - - @Configuration - @ImportResource("classpath:org/springframework/context/annotation/configuration/SecondLevelSubConfig-context.xml") - static class SecondLevelSubConfig extends BaseConfig { - } - - @Test - public void testImportXmlWithNamespaceConfig() { - AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(ImportXmlWithAopNamespaceConfig.class); - Object bean = ctx.getBean("proxiedXmlBean"); - assertTrue(AopUtils.isAopProxy(bean)); - } - - @Configuration - @ImportResource("classpath:org/springframework/context/annotation/configuration/ImportXmlWithAopNamespace-context.xml") - static class ImportXmlWithAopNamespaceConfig { - } - - @Aspect - static class AnAspect { - @Before("execution(* test.beans.TestBean.*(..))") - public void advice() { } - } - - @Test - public void testImportXmlWithAutowiredConfig() { - AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(ImportXmlAutowiredConfig.class); - String name = ctx.getBean("xmlBeanName", String.class); - assertThat(name, equalTo("xml.declared")); - } - - @Configuration - @ImportResource(value="classpath:org/springframework/context/annotation/configuration/ImportXmlConfig-context.xml") - static class ImportXmlAutowiredConfig { - @Autowired TestBean xmlDeclaredBean; - - public @Bean String xmlBeanName() { - return xmlDeclaredBean.getName(); - } - } - - @Test - public void testImportNonXmlResource() { - AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(ImportNonXmlResourceConfig.class); - assertTrue(ctx.containsBean("propertiesDeclaredBean")); - } - - @Configuration - @ImportResource(value="classpath:org/springframework/context/annotation/configuration/ImportNonXmlResourceConfig-context.properties", - reader=PropertiesBeanDefinitionReader.class) - static class ImportNonXmlResourceConfig { - } - - @Ignore // TODO: SPR-6327 - @Test - public void testImportDifferentResourceTypes() { - AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(SubResourceConfig.class); - assertTrue(ctx.containsBean("propertiesDeclaredBean")); - assertTrue(ctx.containsBean("xmlDeclaredBean")); - } - - @Configuration - @ImportResource(value="classpath:org/springframework/context/annotation/configuration/ImportXmlConfig-context.xml", - reader=XmlBeanDefinitionReader.class) - static class SubResourceConfig extends ImportNonXmlResourceConfig { - } -} \ No newline at end of file + } + + @Configuration + @ImportResource("ImportXmlConfig-context.xml") + static class ImportXmlWithRelativePathConfig { + public @Bean TestBean javaDeclaredBean() { + return new TestBean("java.declared"); + } + } + + @Ignore // TODO: SPR-6310 + @Test + public void testImportXmlByConvention() { + ApplicationContext ctx = new AnnotationConfigApplicationContext(ImportXmlByConventionConfig.class); + assertTrue("context does not contain xml-declared bean", ctx.containsBean("xmlDeclaredBean")); + } + + @Configuration + //@ImportXml + static class ImportXmlByConventionConfig { + } + + @Test + public void testImportXmlIsInheritedFromSuperclassDeclarations() { + AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(FirstLevelSubConfig.class); + assertTrue(ctx.containsBean("xmlDeclaredBean")); + } + + @Test + public void testImportXmlIsMergedFromSuperclassDeclarations() { + AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(SecondLevelSubConfig.class); + assertTrue("failed to pick up second-level-declared XML bean", ctx.containsBean("secondLevelXmlDeclaredBean")); + assertTrue("failed to pick up parent-declared XML bean", ctx.containsBean("xmlDeclaredBean")); + } + + @Configuration + @ImportResource("classpath:org/springframework/context/annotation/configuration/ImportXmlConfig-context.xml") + static class BaseConfig { + } + + @Configuration + static class FirstLevelSubConfig extends BaseConfig { + } + + @Configuration + @ImportResource("classpath:org/springframework/context/annotation/configuration/SecondLevelSubConfig-context.xml") + static class SecondLevelSubConfig extends BaseConfig { + } + + @Test + public void testImportXmlWithNamespaceConfig() { + AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(ImportXmlWithAopNamespaceConfig.class); + Object bean = ctx.getBean("proxiedXmlBean"); + assertTrue(AopUtils.isAopProxy(bean)); + } + + @Configuration + @ImportResource("classpath:org/springframework/context/annotation/configuration/ImportXmlWithAopNamespace-context.xml") + static class ImportXmlWithAopNamespaceConfig { + } + + @Aspect + static class AnAspect { + @Before("execution(* test.beans.TestBean.*(..))") + public void advice() { } + } + + @Test + public void testImportXmlWithAutowiredConfig() { + AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(ImportXmlAutowiredConfig.class); + String name = ctx.getBean("xmlBeanName", String.class); + assertThat(name, equalTo("xml.declared")); + } + + @Configuration + @ImportResource(value="classpath:org/springframework/context/annotation/configuration/ImportXmlConfig-context.xml") + static class ImportXmlAutowiredConfig { + @Autowired TestBean xmlDeclaredBean; + + public @Bean String xmlBeanName() { + return xmlDeclaredBean.getName(); + } + } + + @Test + public void testImportNonXmlResource() { + AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(ImportNonXmlResourceConfig.class); + assertTrue(ctx.containsBean("propertiesDeclaredBean")); + } + + @Configuration + @ImportResource(value="classpath:org/springframework/context/annotation/configuration/ImportNonXmlResourceConfig-context.properties", + reader=PropertiesBeanDefinitionReader.class) + static class ImportNonXmlResourceConfig { + } + + @Ignore // TODO: SPR-6327 + @Test + public void testImportDifferentResourceTypes() { + AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(SubResourceConfig.class); + assertTrue(ctx.containsBean("propertiesDeclaredBean")); + assertTrue(ctx.containsBean("xmlDeclaredBean")); + } + + @Configuration + @ImportResource(value="classpath:org/springframework/context/annotation/configuration/ImportXmlConfig-context.xml", + reader=XmlBeanDefinitionReader.class) + static class SubResourceConfig extends ImportNonXmlResourceConfig { + } +}
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-context/src/test/java/org/springframework/context/support/ClassPathXmlApplicationContextTests.java
@@ -319,8 +319,7 @@ private void assertOneMessageSourceOnly(ClassPathXmlApplicationContext ctx, Obje @Test public void testResourceAndInputStream() throws IOException { - ClassPathXmlApplicationContext ctx = - new ClassPathXmlApplicationContext(RESOURCE_CONTEXT) { + ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(RESOURCE_CONTEXT) { public Resource getResource(String location) { if (TEST_PROPERTIES.equals(location)) { return new ClassPathResource(TEST_PROPERTIES, ClassPathXmlApplicationContextTests.class);
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-context/src/test/java/org/springframework/context/support/NoOpAdvice.java
@@ -26,7 +26,7 @@ public class NoOpAdvice implements ThrowsAdvice { public void afterThrowing(Exception ex) throws Throwable { - // no-op + // no-op } }
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-context/src/test/java/org/springframework/context/support/Spr7283Tests.java
@@ -27,22 +27,22 @@ */ public class Spr7283Tests { - @Test - public void testListWithInconsistentElementType() { - ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("spr7283.xml", getClass()); + @Test + public void testListWithInconsistentElementType() { + ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("spr7283.xml", getClass()); List list = ctx.getBean("list", List.class); assertEquals(2, list.size()); assertTrue(list.get(0) instanceof A); assertTrue(list.get(1) instanceof B); - } + } - public static class A { - public A() {} - } + public static class A { + public A() {} + } - public static class B { - public B() {} - } + public static class B { + public B() {} + } }
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-context/src/test/java/org/springframework/scripting/groovy/LogUserAdvice.java
@@ -13,17 +13,17 @@ public class LogUserAdvice implements MethodBeforeAdvice, ThrowsAdvice { public void before(Method method, Object[] objects, Object o) throws Throwable { countBefore++; - System.out.println("Method:"+method.getName()); - } + System.out.println("Method:"+method.getName()); + } public void afterThrowing(Exception e) throws Throwable { countThrows++; - System.out.println("***********************************************************************************"); - System.out.println("Exception caught:"); - System.out.println("***********************************************************************************"); - e.printStackTrace(); - throw e; - } + System.out.println("***********************************************************************************"); + System.out.println("Exception caught:"); + System.out.println("***********************************************************************************"); + e.printStackTrace(); + throw e; + } public int getCountBefore() { return countBefore;
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-core/src/main/java/org/springframework/core/Constants.java
@@ -319,17 +319,17 @@ public String toCodeForSuffix(Object value, String nameSuffix) throws ConstantEx * @see #toCodeForProperty */ public String propertyToConstantNamePrefix(String propertyName) { - StringBuilder parsedPrefix = new StringBuilder(); - for(int i = 0; i < propertyName.length(); i++) { - char c = propertyName.charAt(i); - if (Character.isUpperCase(c)) { - parsedPrefix.append("_"); - parsedPrefix.append(c); - } - else { - parsedPrefix.append(Character.toUpperCase(c)); - } - } + StringBuilder parsedPrefix = new StringBuilder(); + for (int i = 0; i < propertyName.length(); i++) { + char c = propertyName.charAt(i); + if (Character.isUpperCase(c)) { + parsedPrefix.append("_"); + parsedPrefix.append(c); + } + else { + parsedPrefix.append(Character.toUpperCase(c)); + } + } return parsedPrefix.toString(); }
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-core/src/main/java/org/springframework/core/convert/converter/GenericConverter.java
@@ -94,23 +94,23 @@ public Class<?> getTargetType() { return this.targetType; } - @Override - public boolean equals(Object obj) { - if (this == obj) { + @Override + public boolean equals(Object obj) { + if (this == obj) { return true; } - if (obj == null || obj.getClass() != ConvertiblePair.class) { + if (obj == null || obj.getClass() != ConvertiblePair.class) { return false; } - ConvertiblePair other = (ConvertiblePair) obj; - return this.sourceType.equals(other.sourceType) && this.targetType.equals(other.targetType); + ConvertiblePair other = (ConvertiblePair) obj; + return this.sourceType.equals(other.sourceType) && this.targetType.equals(other.targetType); - } + } - @Override - public int hashCode() { - return this.sourceType.hashCode() * 31 + this.targetType.hashCode(); - } - } + @Override + public int hashCode() { + return this.sourceType.hashCode() * 31 + this.targetType.hashCode(); + } + } }
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-core/src/main/java/org/springframework/core/io/AbstractResource.java
@@ -194,7 +194,7 @@ public String toString() { @Override public boolean equals(Object obj) { return (obj == this || - (obj instanceof Resource && ((Resource) obj).getDescription().equals(getDescription()))); + (obj instanceof Resource && ((Resource) obj).getDescription().equals(getDescription()))); } /**
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-core/src/main/java/org/springframework/core/io/ByteArrayResource.java
@@ -112,7 +112,7 @@ public String getDescription() { @Override public boolean equals(Object obj) { return (obj == this || - (obj instanceof ByteArrayResource && Arrays.equals(((ByteArrayResource) obj).byteArray, this.byteArray))); + (obj instanceof ByteArrayResource && Arrays.equals(((ByteArrayResource) obj).byteArray, this.byteArray))); } /**
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-core/src/main/java/org/springframework/core/io/DescriptiveResource.java
@@ -70,7 +70,7 @@ public String getDescription() { @Override public boolean equals(Object obj) { return (obj == this || - (obj instanceof DescriptiveResource && ((DescriptiveResource) obj).description.equals(this.description))); + (obj instanceof DescriptiveResource && ((DescriptiveResource) obj).description.equals(this.description))); } /**
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-core/src/main/java/org/springframework/core/io/FileSystemResource.java
@@ -204,7 +204,7 @@ public OutputStream getOutputStream() throws IOException { @Override public boolean equals(Object obj) { return (obj == this || - (obj instanceof FileSystemResource && this.path.equals(((FileSystemResource) obj).path))); + (obj instanceof FileSystemResource && this.path.equals(((FileSystemResource) obj).path))); } /**
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-core/src/main/java/org/springframework/core/io/InputStreamResource.java
@@ -111,7 +111,7 @@ public String getDescription() { @Override public boolean equals(Object obj) { return (obj == this || - (obj instanceof InputStreamResource && ((InputStreamResource) obj).inputStream.equals(this.inputStream))); + (obj instanceof InputStreamResource && ((InputStreamResource) obj).inputStream.equals(this.inputStream))); } /**
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-core/src/main/java/org/springframework/core/io/UrlResource.java
@@ -207,7 +207,7 @@ public String getDescription() { @Override public boolean equals(Object obj) { return (obj == this || - (obj instanceof UrlResource && this.cleanedUrl.equals(((UrlResource) obj).cleanedUrl))); + (obj instanceof UrlResource && this.cleanedUrl.equals(((UrlResource) obj).cleanedUrl))); } /**
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-core/src/main/java/org/springframework/util/FileCopyUtils.java
@@ -61,7 +61,7 @@ public static int copy(File in, File out) throws IOException { Assert.notNull(in, "No input File specified"); Assert.notNull(out, "No output File specified"); return copy(new BufferedInputStream(new FileInputStream(in)), - new BufferedOutputStream(new FileOutputStream(out))); + new BufferedOutputStream(new FileOutputStream(out))); } /**
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-core/src/test/java/org/springframework/core/ExceptionDepthComparatorTests.java
@@ -28,78 +28,78 @@ */ public class ExceptionDepthComparatorTests { - @Test - public void targetBeforeSameDepth() throws Exception { - Class<? extends Throwable> foundClass = findClosestMatch(TargetException.class, SameDepthException.class); - assertEquals(TargetException.class, foundClass); - } - - @Test - public void sameDepthBeforeTarget() throws Exception { - Class<? extends Throwable> foundClass = findClosestMatch(SameDepthException.class, TargetException.class); - assertEquals(TargetException.class, foundClass); - } - - @Test - public void lowestDepthBeforeTarget() throws Exception { - Class<? extends Throwable> foundClass = findClosestMatch(LowestDepthException.class, TargetException.class); - assertEquals(TargetException.class, foundClass); - } - - @Test - public void targetBeforeLowestDepth() throws Exception { - Class<? extends Throwable> foundClass = findClosestMatch(TargetException.class, LowestDepthException.class); - assertEquals(TargetException.class, foundClass); - } - - @Test - public void noDepthBeforeTarget() throws Exception { - Class<? extends Throwable> foundClass = findClosestMatch(NoDepthException.class, TargetException.class); - assertEquals(TargetException.class, foundClass); - } - - @Test - public void noDepthBeforeHighestDepth() throws Exception { - Class<? extends Throwable> foundClass = findClosestMatch(NoDepthException.class, HighestDepthException.class); - assertEquals(HighestDepthException.class, foundClass); - } - - @Test - public void highestDepthBeforeNoDepth() throws Exception { - Class<? extends Throwable> foundClass = findClosestMatch(HighestDepthException.class, NoDepthException.class); - assertEquals(HighestDepthException.class, foundClass); - } - - @Test - public void highestDepthBeforeLowestDepth() throws Exception { - Class<? extends Throwable> foundClass = findClosestMatch(HighestDepthException.class, LowestDepthException.class); - assertEquals(LowestDepthException.class, foundClass); - } - - @Test - public void lowestDepthBeforeHighestDepth() throws Exception { - Class<? extends Throwable> foundClass = findClosestMatch(LowestDepthException.class, HighestDepthException.class); - assertEquals(LowestDepthException.class, foundClass); - } - - private Class<? extends Throwable> findClosestMatch(Class<? extends Throwable>... classes) { - return ExceptionDepthComparator.findClosestMatch(Arrays.asList(classes), new TargetException()); - } - - - public class HighestDepthException extends Throwable { - } - - public class LowestDepthException extends HighestDepthException { - } - - public class TargetException extends LowestDepthException { - } - - public class SameDepthException extends LowestDepthException { - } - - public class NoDepthException extends TargetException { - } + @Test + public void targetBeforeSameDepth() throws Exception { + Class<? extends Throwable> foundClass = findClosestMatch(TargetException.class, SameDepthException.class); + assertEquals(TargetException.class, foundClass); + } + + @Test + public void sameDepthBeforeTarget() throws Exception { + Class<? extends Throwable> foundClass = findClosestMatch(SameDepthException.class, TargetException.class); + assertEquals(TargetException.class, foundClass); + } + + @Test + public void lowestDepthBeforeTarget() throws Exception { + Class<? extends Throwable> foundClass = findClosestMatch(LowestDepthException.class, TargetException.class); + assertEquals(TargetException.class, foundClass); + } + + @Test + public void targetBeforeLowestDepth() throws Exception { + Class<? extends Throwable> foundClass = findClosestMatch(TargetException.class, LowestDepthException.class); + assertEquals(TargetException.class, foundClass); + } + + @Test + public void noDepthBeforeTarget() throws Exception { + Class<? extends Throwable> foundClass = findClosestMatch(NoDepthException.class, TargetException.class); + assertEquals(TargetException.class, foundClass); + } + + @Test + public void noDepthBeforeHighestDepth() throws Exception { + Class<? extends Throwable> foundClass = findClosestMatch(NoDepthException.class, HighestDepthException.class); + assertEquals(HighestDepthException.class, foundClass); + } + + @Test + public void highestDepthBeforeNoDepth() throws Exception { + Class<? extends Throwable> foundClass = findClosestMatch(HighestDepthException.class, NoDepthException.class); + assertEquals(HighestDepthException.class, foundClass); + } + + @Test + public void highestDepthBeforeLowestDepth() throws Exception { + Class<? extends Throwable> foundClass = findClosestMatch(HighestDepthException.class, LowestDepthException.class); + assertEquals(LowestDepthException.class, foundClass); + } + + @Test + public void lowestDepthBeforeHighestDepth() throws Exception { + Class<? extends Throwable> foundClass = findClosestMatch(LowestDepthException.class, HighestDepthException.class); + assertEquals(LowestDepthException.class, foundClass); + } + + private Class<? extends Throwable> findClosestMatch( + Class<? extends Throwable>... classes) { + return ExceptionDepthComparator.findClosestMatch(Arrays.asList(classes), new TargetException()); + } + + public class HighestDepthException extends Throwable { + } + + public class LowestDepthException extends HighestDepthException { + } + + public class TargetException extends LowestDepthException { + } + + public class SameDepthException extends LowestDepthException { + } + + public class NoDepthException extends TargetException { + } }
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-core/src/test/java/org/springframework/core/GenericTypeResolverTests.java
@@ -130,26 +130,26 @@ public void genericMethodReturnTypes() { assertEquals(Object.class, resolveReturnTypeForGenericMethod(extractMagicValue, new Object[] { map })); } - /** - * @since 3.2 - */ - @Test - public void testResolveType() { - Method intMessageMethod = findMethod(MyTypeWithMethods.class, "readIntegerInputMessage", MyInterfaceType.class); - MethodParameter intMessageMethodParam = new MethodParameter(intMessageMethod, 0); - assertEquals(MyInterfaceType.class, - resolveType(intMessageMethodParam.getGenericParameterType(), new HashMap<TypeVariable, Type>())); - - Method intArrMessageMethod = findMethod(MyTypeWithMethods.class, "readIntegerArrayInputMessage", MyInterfaceType[].class); - MethodParameter intArrMessageMethodParam = new MethodParameter(intArrMessageMethod, 0); - assertEquals(MyInterfaceType[].class, - resolveType(intArrMessageMethodParam.getGenericParameterType(), new HashMap<TypeVariable, Type>())); - - Method genericArrMessageMethod = findMethod(MySimpleTypeWithMethods.class, "readGenericArrayInputMessage", Object[].class); - MethodParameter genericArrMessageMethodParam = new MethodParameter(genericArrMessageMethod, 0); - Map<TypeVariable, Type> varMap = getTypeVariableMap(MySimpleTypeWithMethods.class); - assertEquals(Integer[].class, resolveType(genericArrMessageMethodParam.getGenericParameterType(), varMap)); - } + /** + * @since 3.2 + */ + @Test + public void testResolveType() { + Method intMessageMethod = findMethod(MyTypeWithMethods.class, "readIntegerInputMessage", MyInterfaceType.class); + MethodParameter intMessageMethodParam = new MethodParameter(intMessageMethod, 0); + assertEquals(MyInterfaceType.class, + resolveType(intMessageMethodParam.getGenericParameterType(), new HashMap<TypeVariable, Type>())); + + Method intArrMessageMethod = findMethod(MyTypeWithMethods.class, "readIntegerArrayInputMessage", MyInterfaceType[].class); + MethodParameter intArrMessageMethodParam = new MethodParameter(intArrMessageMethod, 0); + assertEquals(MyInterfaceType[].class, + resolveType(intArrMessageMethodParam.getGenericParameterType(), new HashMap<TypeVariable, Type>())); + + Method genericArrMessageMethod = findMethod(MySimpleTypeWithMethods.class, "readGenericArrayInputMessage", Object[].class); + MethodParameter genericArrMessageMethodParam = new MethodParameter(genericArrMessageMethod, 0); + Map<TypeVariable, Type> varMap = getTypeVariableMap(MySimpleTypeWithMethods.class); + assertEquals(Integer[].class, resolveType(genericArrMessageMethodParam.getGenericParameterType(), varMap)); + } public interface MyInterfaceType<T> { @@ -234,14 +234,14 @@ public static <K, V> V extractMagicValue(Map<K, V> map) { return null; } - public void readIntegerInputMessage(MyInterfaceType<Integer> message) { - } + public void readIntegerInputMessage(MyInterfaceType<Integer> message) { + } - public void readIntegerArrayInputMessage(MyInterfaceType<Integer>[] message) { - } + public void readIntegerArrayInputMessage(MyInterfaceType<Integer>[] message) { + } - public void readGenericArrayInputMessage(T[] message) { - } + public void readGenericArrayInputMessage(T[] message) { + } } public static class MySimpleTypeWithMethods extends MyTypeWithMethods<Integer> {
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectionHelper.java
@@ -124,7 +124,7 @@ public static int getTypeDifferenceWeight(List<TypeDescriptor> paramTypes, List< Class paramTypeClazz = paramType.getType(); if (paramTypeClazz.isPrimitive()) { paramTypeClazz = Object.class; - } + } Class superClass = argType.getClass().getSuperclass(); while (superClass != null) { if (paramType.equals(superClass)) {
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-expression/src/test/java/org/springframework/expression/spel/ConstructorInvocationTests.java
@@ -192,7 +192,7 @@ public void testVarargsInvocation01() { @Test public void testVarargsInvocation02() { - // Calling 'Fruit(int i, String... strings)' - returns int+length_of_strings + // Calling 'Fruit(int i, String... strings)' - returns int+length_of_strings evaluate("new org.springframework.expression.spel.testresources.Fruit(5,'a','b','c').stringscount()", 8, Integer.class); evaluate("new org.springframework.expression.spel.testresources.Fruit(2,'a').stringscount()", 3, Integer.class); evaluate("new org.springframework.expression.spel.testresources.Fruit(4).stringscount()", 4, Integer.class);
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-expression/src/test/java/org/springframework/expression/spel/SpelDocumentationTests.java
@@ -435,8 +435,8 @@ public void testFunctions() throws Exception { ExpressionParser parser = new SpelExpressionParser(); StandardEvaluationContext context = new StandardEvaluationContext(); - context.registerFunction("reverseString", - StringUtils.class.getDeclaredMethod("reverseString", new Class[] { String.class })); + context.registerFunction("reverseString", StringUtils.class.getDeclaredMethod( + "reverseString", new Class[] { String.class })); String helloWorldReversed = parser.parseExpression("#reverseString('hello world')").getValue(context, String.class); Assert.assertEquals("dlrow olleh",helloWorldReversed); @@ -456,8 +456,8 @@ public void testTernary() throws Exception { parser.parseExpression("Name").setValue(societyContext, "IEEE"); societyContext.setVariable("queryName", "Nikola Tesla"); - String expression = "isMember(#queryName)? #queryName + ' is a member of the ' " + - "+ Name + ' Society' : #queryName + ' is not a member of the ' + Name + ' Society'"; + String expression = "isMember(#queryName)? #queryName + ' is a member of the ' " + + "+ Name + ' Society' : #queryName + ' is not a member of the ' + Name + ' Society'"; String queryResultString = parser.parseExpression(expression).getValue(societyContext, String.class); Assert.assertEquals("Nikola Tesla is a member of the IEEE Society",queryResultString); @@ -487,28 +487,28 @@ public void testTemplating() throws Exception { static class TemplatedParserContext implements ParserContext { - public String getExpressionPrefix() { - return "${"; - } + public String getExpressionPrefix() { + return "${"; + } - public String getExpressionSuffix() { - return "}"; - } + public String getExpressionSuffix() { + return "}"; + } - public boolean isTemplate() { - return true; - } + public boolean isTemplate() { + return true; + } } static class StringUtils { - public static String reverseString(String input) { - StringBuilder backwards = new StringBuilder(); - for (int i = 0; i < input.length(); i++) { - backwards.append(input.charAt(input.length() - 1 - i)); - } - return backwards.toString(); - } + public static String reverseString(String input) { + StringBuilder backwards = new StringBuilder(); + for (int i = 0; i < input.length(); i++) { + backwards.append(input.charAt(input.length() - 1 - i)); + } + return backwards.toString(); + } } }
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-jdbc/src/main/java/org/springframework/jdbc/core/JdbcOperations.java
@@ -364,7 +364,7 @@ <T> T query(String sql, PreparedStatementSetter pss, ResultSetExtractor<T> rse) * @see java.sql.Types */ <T> T query(String sql, Object[] args, int[] argTypes, ResultSetExtractor<T> rse) - throws DataAccessException; + throws DataAccessException; /** * Query given SQL to create a prepared statement from SQL and a list @@ -422,7 +422,7 @@ <T> T query(String sql, Object[] args, int[] argTypes, ResultSetExtractor<T> rse * @throws DataAccessException if the query fails */ void query(String sql, PreparedStatementSetter pss, RowCallbackHandler rch) - throws DataAccessException; + throws DataAccessException; /** * Query given SQL to create a prepared statement from SQL and a list of @@ -437,7 +437,7 @@ void query(String sql, PreparedStatementSetter pss, RowCallbackHandler rch) * @see java.sql.Types */ void query(String sql, Object[] args, int[] argTypes, RowCallbackHandler rch) - throws DataAccessException; + throws DataAccessException; /** * Query given SQL to create a prepared statement from SQL and a list of @@ -510,7 +510,7 @@ <T> List<T> query(String sql, PreparedStatementSetter pss, RowMapper<T> rowMappe * @see java.sql.Types */ <T> List<T> query(String sql, Object[] args, int[] argTypes, RowMapper<T> rowMapper) - throws DataAccessException; + throws DataAccessException; /** * Query given SQL to create a prepared statement from SQL and a list @@ -614,7 +614,7 @@ <T> T queryForObject(String sql, RowMapper<T> rowMapper, Object... args) * @see java.sql.Types */ <T> T queryForObject(String sql, Object[] args, int[] argTypes, Class<T> requiredType) - throws DataAccessException; + throws DataAccessException; /** * Query given SQL to create a prepared statement from SQL and a
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-jdbc/src/main/java/org/springframework/jdbc/datasource/DataSourceTransactionManager.java
@@ -177,7 +177,7 @@ protected Object doGetTransaction() { DataSourceTransactionObject txObject = new DataSourceTransactionObject(); txObject.setSavepointAllowed(isNestedTransactionAllowed()); ConnectionHolder conHolder = - (ConnectionHolder) TransactionSynchronizationManager.getResource(this.dataSource); + (ConnectionHolder) TransactionSynchronizationManager.getResource(this.dataSource); txObject.setConnectionHolder(conHolder, false); return txObject; }
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/LobCreatorUtils.java
@@ -58,7 +58,7 @@ public static void registerTransactionSynchronization( if (TransactionSynchronizationManager.isSynchronizationActive()) { logger.debug("Registering Spring transaction synchronization for LobCreator"); TransactionSynchronizationManager.registerSynchronization( - new SpringLobCreatorSynchronization(lobCreator)); + new SpringLobCreatorSynchronization(lobCreator)); } else { if (jtaTransactionManager != null) { @@ -77,7 +77,7 @@ public static void registerTransactionSynchronization( } } throw new IllegalStateException("Active Spring transaction synchronization or active " + - "JTA transaction with specified [javax.transaction.TransactionManager] required"); + "JTA transaction with specified [javax.transaction.TransactionManager] required"); } }
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/OracleLobHandler.java
@@ -414,7 +414,7 @@ public void populateLob(Object lob) throws Exception { } public void setClobAsString(PreparedStatement ps, int paramIndex, final String content) - throws SQLException { + throws SQLException { if (content != null) { Clob clob = (Clob) createLob(ps, true, new LobCallback() { @@ -437,7 +437,7 @@ public void populateLob(Object lob) throws Exception { public void setClobAsAsciiStream( PreparedStatement ps, int paramIndex, final InputStream asciiStream, int contentLength) - throws SQLException { + throws SQLException { if (asciiStream != null) { Clob clob = (Clob) createLob(ps, true, new LobCallback() { @@ -460,7 +460,7 @@ public void populateLob(Object lob) throws Exception { public void setClobAsCharacterStream( PreparedStatement ps, int paramIndex, final Reader characterStream, int contentLength) - throws SQLException { + throws SQLException { if (characterStream != null) { Clob clob = (Clob) createLob(ps, true, new LobCallback() {
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-jdbc/src/main/java/org/springframework/jdbc/support/nativejdbc/JBossNativeJdbcExtractor.java
@@ -94,11 +94,11 @@ public JBossNativeJdbcExtractor() { this.wrappedStatementClass = getClass().getClassLoader().loadClass(prefix + "WrappedStatement"); this.wrappedResultSetClass = getClass().getClassLoader().loadClass(prefix + "WrappedResultSet"); this.getUnderlyingConnectionMethod = - this.wrappedConnectionClass.getMethod("getUnderlyingConnection", (Class[]) null); + this.wrappedConnectionClass.getMethod("getUnderlyingConnection", (Class[]) null); this.getUnderlyingStatementMethod = - this.wrappedStatementClass.getMethod("getUnderlyingStatement", (Class[]) null); + this.wrappedStatementClass.getMethod("getUnderlyingStatement", (Class[]) null); this.getUnderlyingResultSetMethod = - this.wrappedResultSetClass.getMethod("getUnderlyingResultSet", (Class[]) null); + this.wrappedResultSetClass.getMethod("getUnderlyingResultSet", (Class[]) null); } catch (Exception ex) { throw new IllegalStateException(
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-jms/src/main/java/org/springframework/jms/core/JmsOperations.java
@@ -160,7 +160,7 @@ public interface JmsOperations { * @throws JmsException checked JMSException converted to unchecked */ void convertAndSend(Object message, MessagePostProcessor postProcessor) - throws JmsException; + throws JmsException; /** * Send the given object to the specified destination, converting the object @@ -172,7 +172,7 @@ void convertAndSend(Object message, MessagePostProcessor postProcessor) * @throws JmsException checked JMSException converted to unchecked */ void convertAndSend(Destination destination, Object message, MessagePostProcessor postProcessor) - throws JmsException; + throws JmsException; /** * Send the given object to the specified destination, converting the object @@ -185,7 +185,7 @@ void convertAndSend(Destination destination, Object message, MessagePostProcesso * @throws JmsException checked JMSException converted to unchecked */ void convertAndSend(String destinationName, Object message, MessagePostProcessor postProcessor) - throws JmsException; + throws JmsException; //-------------------------------------------------------------------------
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-jms/src/main/java/org/springframework/jms/core/JmsTemplate.java
@@ -648,7 +648,7 @@ public Message createMessage(Session session) throws JMSException { public void convertAndSend( String destinationName, final Object message, final MessagePostProcessor postProcessor) - throws JmsException { + throws JmsException { send(destinationName, new MessageCreator() { public Message createMessage(Session session) throws JMSException {
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-jms/src/test/java/org/springframework/jms/core/JmsTemplate102Tests.java
@@ -366,7 +366,7 @@ public void testQueueProducerCallback() throws Exception { template.execute(new ProducerCallback() { public Object doInJms(Session session, MessageProducer producer) - throws JMSException { + throws JMSException { boolean b = session.getTransacted(); int i = producer.getPriority(); return null; @@ -627,7 +627,7 @@ public Message createMessage(Session session) throws JMSException { else { template.send("testQueue", new MessageCreator() { public Message createMessage(Session session) - throws JMSException { + throws JMSException { return session.createTextMessage("just testing"); } }); @@ -690,15 +690,15 @@ private void sendTopic(boolean ignoreQOS, boolean explicitTopic) throws Exceptio if (explicitTopic) { template.send(mockTopic, new MessageCreator() { public Message createMessage(Session session) - throws JMSException { + throws JMSException { return session.createTextMessage("just testing"); } }); } else { template.send("testTopic", new MessageCreator() { public Message createMessage(Session session) - throws JMSException { + throws JMSException { return session.createTextMessage("just testing"); } });
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/HibernateTransactionManager.java
@@ -660,7 +660,7 @@ public boolean isRollbackOnly() { @Override public void flush() { try { - this.sessionHolder.getSession().flush(); + this.sessionHolder.getSession().flush(); } catch (HibernateException ex) { throw convertHibernateAccessException(ex);
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateTransactionManager.java
@@ -888,7 +888,7 @@ public boolean isRollbackOnly() { public void flush() { try { - this.sessionHolder.getSession().flush(); + this.sessionHolder.getSession().flush(); } catch (HibernateException ex) { throw convertHibernateAccessException(ex);
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-orm/src/main/java/org/springframework/orm/hibernate3/LocalCacheProviderProxy.java
@@ -41,7 +41,7 @@ public LocalCacheProviderProxy() { // absolutely needs thread-bound CacheProvider to initialize if (cp == null) { throw new IllegalStateException("No Hibernate CacheProvider found - " + - "'cacheProvider' property must be set on LocalSessionFactoryBean"); + "'cacheProvider' property must be set on LocalSessionFactoryBean"); } this.cacheProvider = cp; }
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-orm/src/main/java/org/springframework/orm/hibernate3/LocalDataSourceConnectionProvider.java
@@ -49,7 +49,7 @@ public void configure(Properties props) throws HibernateException { // absolutely needs thread-bound DataSource to initialize if (this.dataSource == null) { throw new HibernateException("No local DataSource found for configuration - " + - "'dataSource' property must be set on LocalSessionFactoryBean"); + "'dataSource' property must be set on LocalSessionFactoryBean"); } this.dataSourceToUse = getDataSourceToUse(this.dataSource); }
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-orm/src/main/java/org/springframework/orm/hibernate3/LocalRegionFactoryProxy.java
@@ -56,7 +56,7 @@ public LocalRegionFactoryProxy() { // absolutely needs thread-bound RegionFactory to initialize if (rf == null) { throw new IllegalStateException("No Hibernate RegionFactory found - " + - "'cacheRegionFactory' property must be set on LocalSessionFactoryBean"); + "'cacheRegionFactory' property must be set on LocalSessionFactoryBean"); } this.regionFactory = rf; }
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-orm/src/main/java/org/springframework/orm/hibernate3/LocalTransactionManagerLookup.java
@@ -53,7 +53,7 @@ public LocalTransactionManagerLookup() { // absolutely needs thread-bound TransactionManager to initialize if (tm == null) { throw new IllegalStateException("No JTA TransactionManager found - " + - "'jtaTransactionManager' property must be set on LocalSessionFactoryBean"); + "'jtaTransactionManager' property must be set on LocalSessionFactoryBean"); } this.transactionManager = tm; }
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-orm/src/main/java/org/springframework/orm/hibernate3/SessionFactoryUtils.java
@@ -354,7 +354,7 @@ private static Session doGetSession( if (!allowCreate && !isSessionTransactional(session, sessionFactory)) { closeSession(session); throw new IllegalStateException("No Hibernate Session bound to thread, " + - "and configuration does not allow creation of non-transactional one here"); + "and configuration does not allow creation of non-transactional one here"); } return session; @@ -371,8 +371,8 @@ private static Session doGetSession( * @throws DataAccessResourceFailureException if the Session couldn't be created */ private static Session getJtaSynchronizedSession( - SessionHolder sessionHolder, SessionFactory sessionFactory, - SQLExceptionTranslator jdbcExceptionTranslator) throws DataAccessResourceFailureException { + SessionHolder sessionHolder, SessionFactory sessionFactory, + SQLExceptionTranslator jdbcExceptionTranslator) throws DataAccessResourceFailureException { // JTA synchronization is only possible with a javax.transaction.TransactionManager. // We'll check the Hibernate SessionFactory: If a TransactionManagerLookup is specified @@ -612,7 +612,7 @@ public static void applyTransactionTimeout(Query query, SessionFactory sessionFa public static void applyTransactionTimeout(Criteria criteria, SessionFactory sessionFactory) { Assert.notNull(criteria, "No Criteria object specified"); SessionHolder sessionHolder = - (SessionHolder) TransactionSynchronizationManager.getResource(sessionFactory); + (SessionHolder) TransactionSynchronizationManager.getResource(sessionFactory); if (sessionHolder != null && sessionHolder.hasTimeout()) { criteria.setTimeout(sessionHolder.getTimeToLiveInSeconds()); }
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-orm/src/main/java/org/springframework/orm/hibernate3/support/AbstractLobType.java
@@ -76,7 +76,7 @@ public abstract class AbstractLobType implements UserType { */ protected AbstractLobType() { this(LocalSessionFactoryBean.getConfigTimeLobHandler(), - LocalSessionFactoryBean.getConfigTimeTransactionManager()); + LocalSessionFactoryBean.getConfigTimeTransactionManager()); } /** @@ -150,7 +150,7 @@ public final Object nullSafeGet(ResultSet rs, String[] names, Object owner) if (this.lobHandler == null) { throw new IllegalStateException("No LobHandler found for configuration - " + - "lobHandler property must be set on LocalSessionFactoryBean"); + "lobHandler property must be set on LocalSessionFactoryBean"); } try { @@ -172,7 +172,7 @@ public final void nullSafeSet(PreparedStatement st, Object value, int index) if (this.lobHandler == null) { throw new IllegalStateException("No LobHandler found for configuration - " + - "lobHandler property must be set on LocalSessionFactoryBean"); + "lobHandler property must be set on LocalSessionFactoryBean"); } LobCreator lobCreator = this.lobHandler.getLobCreator(); @@ -211,7 +211,7 @@ protected abstract Object nullSafeGetInternal( * @throws HibernateException in case of any other exceptions */ protected abstract void nullSafeSetInternal( - PreparedStatement ps, int index, Object value, LobCreator lobCreator) + PreparedStatement ps, int index, Object value, LobCreator lobCreator) throws SQLException, IOException, HibernateException; }
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-orm/src/main/java/org/springframework/orm/hibernate3/support/HibernateDaoSupport.java
@@ -138,7 +138,7 @@ protected final void checkDaoConfig() { * @see org.springframework.orm.hibernate3.SessionFactoryUtils#getSession(SessionFactory, boolean) */ protected final Session getSession() - throws DataAccessResourceFailureException, IllegalStateException { + throws DataAccessResourceFailureException, IllegalStateException { return getSession(this.hibernateTemplate.isAllowCreate()); } @@ -163,10 +163,10 @@ protected final Session getSession() * @see org.springframework.orm.hibernate3.SessionFactoryUtils#getSession(SessionFactory, boolean) */ protected final Session getSession(boolean allowCreate) - throws DataAccessResourceFailureException, IllegalStateException { + throws DataAccessResourceFailureException, IllegalStateException { return (!allowCreate ? - SessionFactoryUtils.getSession(getSessionFactory(), false) : + SessionFactoryUtils.getSession(getSessionFactory(), false) : SessionFactoryUtils.getSession( getSessionFactory(), this.hibernateTemplate.getEntityInterceptor(),
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-orm/src/main/java/org/springframework/orm/hibernate3/support/OpenSessionInViewInterceptor.java
@@ -156,7 +156,7 @@ public void preHandle(WebRequest request) throws DataAccessException { } if ((isSingleSession() && TransactionSynchronizationManager.hasResource(getSessionFactory())) || - SessionFactoryUtils.isDeferredCloseActive(getSessionFactory())) { + SessionFactoryUtils.isDeferredCloseActive(getSessionFactory())) { // Do not modify the Session: just mark the request accordingly. Integer count = (Integer) request.getAttribute(participateAttributeName, WebRequest.SCOPE_REQUEST); int newCount = (count != null ? count + 1 : 1);
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-orm/src/main/java/org/springframework/orm/ibatis/support/AbstractLobTypeHandler.java
@@ -79,7 +79,7 @@ public AbstractLobTypeHandler() { protected AbstractLobTypeHandler(LobHandler lobHandler) { if (lobHandler == null) { throw new IllegalStateException("No LobHandler found for configuration - " + - "lobHandler property must be set on SqlMapClientFactoryBean"); + "lobHandler property must be set on SqlMapClientFactoryBean"); } this.lobHandler = lobHandler; }
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-orm/src/main/java/org/springframework/orm/jdo/JdoTemplate.java
@@ -201,9 +201,9 @@ public <T> T execute(JdoCallback<T> action, boolean exposeNativePersistenceManag Assert.notNull(action, "Callback object must not be null"); PersistenceManager pm = PersistenceManagerFactoryUtils.getPersistenceManager( - getPersistenceManagerFactory(), isAllowCreate()); + getPersistenceManagerFactory(), isAllowCreate()); boolean existingTransaction = - TransactionSynchronizationManager.hasResource(getPersistenceManagerFactory()); + TransactionSynchronizationManager.hasResource(getPersistenceManagerFactory()); try { PersistenceManager pmToExpose = (exposeNativePersistenceManager ? pm : createPersistenceManagerProxy(pm)); T result = action.doInJdo(pmToExpose);
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-orm/src/main/java/org/springframework/orm/jdo/LocalPersistenceManagerFactoryBean.java
@@ -281,7 +281,7 @@ public PersistenceManagerFactory getObject() { public Class<? extends PersistenceManagerFactory> getObjectType() { return (this.persistenceManagerFactory != null ? - this.persistenceManagerFactory.getClass() : PersistenceManagerFactory.class); + this.persistenceManagerFactory.getClass() : PersistenceManagerFactory.class); } public boolean isSingleton() {
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-orm/src/main/java/org/springframework/orm/jdo/PersistenceManagerFactoryUtils.java
@@ -106,7 +106,7 @@ static SQLExceptionTranslator newJdbcExceptionTranslator(Object connectionFactor * @see JdoTransactionManager */ public static PersistenceManager getPersistenceManager(PersistenceManagerFactory pmf, boolean allowCreate) - throws DataAccessResourceFailureException, IllegalStateException { + throws DataAccessResourceFailureException, IllegalStateException { try { return doGetPersistenceManager(pmf, allowCreate); @@ -133,7 +133,7 @@ public static PersistenceManager getPersistenceManager(PersistenceManagerFactory * @see JdoTransactionManager */ public static PersistenceManager doGetPersistenceManager(PersistenceManagerFactory pmf, boolean allowCreate) - throws JDOException, IllegalStateException { + throws JDOException, IllegalStateException { Assert.notNull(pmf, "No PersistenceManagerFactory specified"); @@ -204,7 +204,7 @@ public static void applyTransactionTimeout( Assert.notNull(query, "No Query object specified"); PersistenceManagerHolder pmHolder = - (PersistenceManagerHolder) TransactionSynchronizationManager.getResource(pmf); + (PersistenceManagerHolder) TransactionSynchronizationManager.getResource(pmf); if (pmHolder != null && pmHolder.hasTimeout()) { jdoDialect.applyQueryTimeout(query, pmHolder.getTimeToLiveInSeconds()); }
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-orm/src/main/java/org/springframework/orm/jdo/support/JdoDaoSupport.java
@@ -144,7 +144,7 @@ protected final PersistenceManager getPersistenceManager() { * @see org.springframework.orm.jdo.PersistenceManagerFactoryUtils#getPersistenceManager */ protected final PersistenceManager getPersistenceManager(boolean allowCreate) - throws DataAccessResourceFailureException, IllegalStateException { + throws DataAccessResourceFailureException, IllegalStateException { return PersistenceManagerFactoryUtils.getPersistenceManager(getPersistenceManagerFactory(), allowCreate); }
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-orm/src/main/java/org/springframework/orm/jpa/JpaTransactionManager.java
@@ -659,7 +659,7 @@ public boolean isRollbackOnly() { public void flush() { try { - this.entityManagerHolder.getEntityManager().flush(); + this.entityManagerHolder.getEntityManager().flush(); } catch (RuntimeException ex) { throw DataAccessUtils.translateIfNecessary(ex, getJpaDialect());
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-orm/src/test/java/org/springframework/orm/hibernate3/support/OpenSessionInViewTests.java
@@ -436,7 +436,7 @@ public void doFilter(ServletRequest servletRequest, ServletResponse servletRespo final FilterChain filterChain2 = new FilterChain() { public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse) - throws IOException, ServletException { + throws IOException, ServletException { assertTrue(TransactionSynchronizationManager.hasResource(sf2)); filter.doFilter(servletRequest, servletResponse, filterChain); } @@ -665,7 +665,7 @@ public void doFilter(ServletRequest servletRequest, ServletResponse servletRespo final FilterChain filterChain2 = new FilterChain() { public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse) - throws IOException, ServletException { + throws IOException, ServletException { HibernateTransactionManager tm = new HibernateTransactionManager(sf2); TransactionStatus ts = tm.getTransaction(new DefaultTransactionDefinition()); @@ -767,7 +767,7 @@ public void doFilter(ServletRequest servletRequest, ServletResponse servletRespo FilterChain filterChain2 = new FilterChain() { public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse) - throws IOException, ServletException { + throws IOException, ServletException { filter.doFilter(servletRequest, servletResponse, filterChain); } };
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-orm/src/test/java/org/springframework/orm/jdo/support/OpenPersistenceManagerInViewTests.java
@@ -154,7 +154,7 @@ public void doFilter(ServletRequest servletRequest, ServletResponse servletRespo final FilterChain filterChain2 = new FilterChain() { public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse) - throws IOException, ServletException { + throws IOException, ServletException { assertTrue(TransactionSynchronizationManager.hasResource(pmf2)); filter.doFilter(servletRequest, servletResponse, filterChain); }
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-orm/src/test/java/org/springframework/orm/jpa/support/OpenEntityManagerInViewTests.java
@@ -265,7 +265,7 @@ public void doFilter(ServletRequest servletRequest, ServletResponse servletRespo final FilterChain filterChain2 = new FilterChain() { public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse) - throws IOException, ServletException { + throws IOException, ServletException { assertTrue(TransactionSynchronizationManager.hasResource(factory2)); filter.doFilter(servletRequest, servletResponse, filterChain); } @@ -334,7 +334,7 @@ public void doFilter(ServletRequest servletRequest, ServletResponse servletRespo final FilterChain filterChain2 = new FilterChain() { public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse) - throws IOException, ServletException { + throws IOException, ServletException { assertTrue(TransactionSynchronizationManager.hasResource(factory2)); filter.doFilter(servletRequest, servletResponse, filterChain); count2.incrementAndGet();
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-oxm/src/main/java/org/springframework/oxm/XmlMappingException.java
@@ -30,18 +30,18 @@ public abstract class XmlMappingException extends NestedRuntimeException { * Construct an <code>XmlMappingException</code> with the specified detail message. * @param msg the detail message */ - public XmlMappingException(String msg) { - super(msg); - } + public XmlMappingException(String msg) { + super(msg); + } /** * Construct an <code>XmlMappingException</code> with the specified detail message * and nested exception. * @param msg the detail message * @param cause the nested exception */ - public XmlMappingException(String msg, Throwable cause) { - super(msg, cause); - } + public XmlMappingException(String msg, Throwable cause) { + super(msg, cause); + } }
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-oxm/src/main/java/org/springframework/oxm/xstream/XStreamMarshaller.java
@@ -425,12 +425,12 @@ protected void marshalXmlStreamWriter(Object graph, XMLStreamWriter streamWriter @Override protected void marshalOutputStream(Object graph, OutputStream outputStream) throws XmlMappingException, IOException { - if (this.streamDriver != null) { - marshal(graph, this.streamDriver.createWriter(outputStream)); - } - else { - marshalWriter(graph, new OutputStreamWriter(outputStream, this.encoding)); - } + if (this.streamDriver != null) { + marshal(graph, this.streamDriver.createWriter(outputStream)); + } + else { + marshalWriter(graph, new OutputStreamWriter(outputStream, this.encoding)); + } } @Override
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-oxm/src/test/java/org/springframework/oxm/jaxb/BinaryObject.java
@@ -24,34 +24,34 @@ @XmlRootElement(namespace = "http://springframework.org/spring-ws") public class BinaryObject { - @XmlElement(namespace = "http://springframework.org/spring-ws") - private byte[] bytes; + @XmlElement(namespace = "http://springframework.org/spring-ws") + private byte[] bytes; - @XmlElement(namespace = "http://springframework.org/spring-ws") - private DataHandler dataHandler; + @XmlElement(namespace = "http://springframework.org/spring-ws") + private DataHandler dataHandler; - @XmlElement(namespace = "http://springframework.org/spring-ws") - @XmlAttachmentRef - private DataHandler swaDataHandler; + @XmlElement(namespace = "http://springframework.org/spring-ws") + @XmlAttachmentRef + private DataHandler swaDataHandler; - public BinaryObject() { - } + public BinaryObject() { + } - public BinaryObject(byte[] bytes, DataHandler dataHandler) { - this.bytes = bytes; - this.dataHandler = dataHandler; - swaDataHandler = dataHandler; - } + public BinaryObject(byte[] bytes, DataHandler dataHandler) { + this.bytes = bytes; + this.dataHandler = dataHandler; + swaDataHandler = dataHandler; + } - public byte[] getBytes() { - return bytes; - } + public byte[] getBytes() { + return bytes; + } - public DataHandler getDataHandler() { - return dataHandler; - } + public DataHandler getDataHandler() { + return dataHandler; + } - public DataHandler getSwaDataHandler() { - return swaDataHandler; - } + public DataHandler getSwaDataHandler() { + return swaDataHandler; + } }
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-oxm/src/test/java/org/springframework/oxm/jibx/Flights.java
@@ -20,17 +20,17 @@ public class Flights { - protected ArrayList flightList = new ArrayList(); + protected ArrayList flightList = new ArrayList(); - public void addFlight(FlightType flight) { - flightList.add(flight); - } + public void addFlight(FlightType flight) { + flightList.add(flight); + } - public FlightType getFlight(int index) { - return (FlightType) flightList.get(index); - } + public FlightType getFlight(int index) { + return (FlightType) flightList.get(index); + } - public int sizeFlightList() { - return flightList.size(); - } + public int sizeFlightList() { + return flightList.size(); + } }
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-oxm/src/test/java/org/springframework/oxm/xmlbeans/XmlOptionsFactoryBeanTests.java
@@ -27,15 +27,15 @@ */ public class XmlOptionsFactoryBeanTests { - private XmlOptionsFactoryBean factoryBean = new XmlOptionsFactoryBean(); + private XmlOptionsFactoryBean factoryBean = new XmlOptionsFactoryBean(); - @Test + @Test public void xmlOptionsFactoryBean() throws Exception { - factoryBean.setOptions(Collections.singletonMap(XmlOptions.SAVE_PRETTY_PRINT, Boolean.TRUE)); - XmlOptions xmlOptions = factoryBean.getObject(); - assertNotNull("No XmlOptions returned", xmlOptions); - assertTrue("Option not set", xmlOptions.hasOption(XmlOptions.SAVE_PRETTY_PRINT)); - assertFalse("Invalid option set", xmlOptions.hasOption(XmlOptions.LOAD_LINE_NUMBERS)); - } + factoryBean.setOptions(Collections.singletonMap(XmlOptions.SAVE_PRETTY_PRINT, Boolean.TRUE)); + XmlOptions xmlOptions = factoryBean.getObject(); + assertNotNull("No XmlOptions returned", xmlOptions); + assertTrue("Option not set", xmlOptions.hasOption(XmlOptions.SAVE_PRETTY_PRINT)); + assertFalse("Invalid option set", xmlOptions.hasOption(XmlOptions.LOAD_LINE_NUMBERS)); + } }
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-oxm/src/test/java/org/springframework/oxm/xstream/Flight.java
@@ -21,14 +21,14 @@ @XStreamAlias("flight") public class Flight { - @XStreamAlias("number") - private long flightNumber; + @XStreamAlias("number") + private long flightNumber; - public long getFlightNumber() { - return flightNumber; - } + public long getFlightNumber() { + return flightNumber; + } - public void setFlightNumber(long number) { - this.flightNumber = number; - } -} \ No newline at end of file + public void setFlightNumber(long number) { + this.flightNumber = number; + } +}
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-struts/src/main/java/org/springframework/web/servlet/view/tiles/ComponentControllerSupport.java
@@ -69,7 +69,7 @@ public abstract class ComponentControllerSupport extends ControllerSupport { public final void perform( ComponentContext componentContext, HttpServletRequest request, HttpServletResponse response, ServletContext servletContext) - throws ServletException, IOException { + throws ServletException, IOException { try { execute(componentContext, request, response, servletContext); @@ -97,7 +97,7 @@ public final void perform( public final void execute( ComponentContext componentContext, HttpServletRequest request, HttpServletResponse response, ServletContext servletContext) - throws Exception { + throws Exception { synchronized (this) { if (this.webApplicationContext == null) {
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-struts/src/main/java/org/springframework/web/servlet/view/tiles/TilesView.java
@@ -138,7 +138,7 @@ protected String prepareForRendering(HttpServletRequest request, HttpServletResp * @return the component definition */ protected ComponentDefinition getComponentDefinition(DefinitionsFactory factory, HttpServletRequest request) - throws Exception { + throws Exception { return factory.getDefinition(getUrl(), request, getServletContext()); }
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-struts/src/main/java/org/springframework/web/struts/ContextLoaderPlugIn.java
@@ -340,7 +340,7 @@ protected WebApplicationContext createWebApplicationContext(WebApplicationContex wac.setNamespace(getNamespace()); if (getContextConfigLocation() != null) { wac.setConfigLocations( - StringUtils.tokenizeToStringArray( + StringUtils.tokenizeToStringArray( getContextConfigLocation(), ConfigurableWebApplicationContext.CONFIG_LOCATION_DELIMITERS)); } wac.addBeanFactoryPostProcessor(
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-test-mvc/src/main/java/org/springframework/test/util/MatcherAssertionErrors.java
@@ -37,7 +37,7 @@ public abstract class MatcherAssertionErrors { private MatcherAssertionErrors() { - } + } /** * Asserts that the given matcher matches the actual value. @@ -65,8 +65,8 @@ public static <T> void assertThat(String reason, T actual, Matcher<T> matcher) { description.appendText("\nExpected: "); description.appendDescriptionOf(matcher); if (describeMismatchMethod != null) { - description.appendText("\n but: "); - matcher.describeMismatch(actual, description); + description.appendText("\n but: "); + matcher.describeMismatch(actual, description); } else { description.appendText("\n got: ");
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-test-mvc/src/main/java/org/springframework/test/web/servlet/RequestBuilder.java
@@ -22,6 +22,6 @@ public interface RequestBuilder { * @param servletContext the {@link ServletContext} to use to create the request * @return the request */ - MockHttpServletRequest buildRequest(ServletContext servletContext); + MockHttpServletRequest buildRequest(ServletContext servletContext); }
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-test-mvc/src/main/java/org/springframework/test/web/servlet/result/StatusResultMatchers.java
@@ -86,461 +86,461 @@ public void match(MvcResult result) throws Exception { }; } - /** - * Assert the response status code is {@code HttpStatus.CONTINUE} (100). - */ - public ResultMatcher isContinue() { - return matcher(HttpStatus.CONTINUE); - } - - /** - * Assert the response status code is {@code HttpStatus.SWITCHING_PROTOCOLS} (101). - */ - public ResultMatcher isSwitchingProtocols() { - return matcher(HttpStatus.SWITCHING_PROTOCOLS); - } - - /** - * Assert the response status code is {@code HttpStatus.PROCESSING} (102). - */ - public ResultMatcher isProcessing() { - return matcher(HttpStatus.PROCESSING); - } - - /** - * Assert the response status code is {@code HttpStatus.CHECKPOINT} (103). - */ - public ResultMatcher isCheckpoint() { - return matcher(HttpStatus.valueOf(103)); - } - - /** - * Assert the response status code is {@code HttpStatus.OK} (200). - */ - public ResultMatcher isOk() { - return matcher(HttpStatus.OK); - } - - /** - * Assert the response status code is {@code HttpStatus.CREATED} (201). - */ - public ResultMatcher isCreated() { - return matcher(HttpStatus.CREATED); - } - - /** - * Assert the response status code is {@code HttpStatus.ACCEPTED} (202). - */ - public ResultMatcher isAccepted() { - return matcher(HttpStatus.ACCEPTED); - } - - /** - * Assert the response status code is {@code HttpStatus.NON_AUTHORITATIVE_INFORMATION} (203). - */ - public ResultMatcher isNonAuthoritativeInformation() { - return matcher(HttpStatus.NON_AUTHORITATIVE_INFORMATION); - } - - /** - * Assert the response status code is {@code HttpStatus.NO_CONTENT} (204). - */ - public ResultMatcher isNoContent() { - return matcher(HttpStatus.NO_CONTENT); - } - - /** - * Assert the response status code is {@code HttpStatus.RESET_CONTENT} (205). - */ - public ResultMatcher isResetContent() { - return matcher(HttpStatus.RESET_CONTENT); - } - - /** - * Assert the response status code is {@code HttpStatus.PARTIAL_CONTENT} (206). - */ - public ResultMatcher isPartialContent() { - return matcher(HttpStatus.PARTIAL_CONTENT); - } - - /** - * Assert the response status code is {@code HttpStatus.MULTI_STATUS} (207). - */ - public ResultMatcher isMultiStatus() { - return matcher(HttpStatus.MULTI_STATUS); - } - - /** - * Assert the response status code is {@code HttpStatus.ALREADY_REPORTED} (208). - */ - public ResultMatcher isAlreadyReported() { - return matcher(HttpStatus.ALREADY_REPORTED); - } - - /** - * Assert the response status code is {@code HttpStatus.IM_USED} (226). - */ - public ResultMatcher isImUsed() { - return matcher(HttpStatus.IM_USED); - } - - /** - * Assert the response status code is {@code HttpStatus.MULTIPLE_CHOICES} (300). - */ - public ResultMatcher isMultipleChoices() { - return matcher(HttpStatus.MULTIPLE_CHOICES); - } - - /** - * Assert the response status code is {@code HttpStatus.MOVED_PERMANENTLY} (301). - */ - public ResultMatcher isMovedPermanently() { - return matcher(HttpStatus.MOVED_PERMANENTLY); - } - - /** - * Assert the response status code is {@code HttpStatus.FOUND} (302). - */ - public ResultMatcher isFound() { - return matcher(HttpStatus.FOUND); - } - - /** - * Assert the response status code is {@code HttpStatus.MOVED_TEMPORARILY} (302). - */ - public ResultMatcher isMovedTemporarily() { - return matcher(HttpStatus.MOVED_TEMPORARILY); - } - - /** - * Assert the response status code is {@code HttpStatus.SEE_OTHER} (303). - */ - public ResultMatcher isSeeOther() { - return matcher(HttpStatus.SEE_OTHER); - } - - /** - * Assert the response status code is {@code HttpStatus.NOT_MODIFIED} (304). - */ - public ResultMatcher isNotModified() { - return matcher(HttpStatus.NOT_MODIFIED); - } - - /** - * Assert the response status code is {@code HttpStatus.USE_PROXY} (305). - */ - public ResultMatcher isUseProxy() { - return matcher(HttpStatus.USE_PROXY); - } - - /** - * Assert the response status code is {@code HttpStatus.TEMPORARY_REDIRECT} (307). - */ - public ResultMatcher isTemporaryRedirect() { - return matcher(HttpStatus.TEMPORARY_REDIRECT); - } - - /** - * Assert the response status code is {@code HttpStatus.RESUME_INCOMPLETE} (308). - */ - public ResultMatcher isResumeIncomplete() { - return matcher(HttpStatus.valueOf(308)); - } - - /** - * Assert the response status code is {@code HttpStatus.BAD_REQUEST} (400). - */ - public ResultMatcher isBadRequest() { - return matcher(HttpStatus.BAD_REQUEST); - } - - /** - * Assert the response status code is {@code HttpStatus.UNAUTHORIZED} (401). - */ - public ResultMatcher isUnauthorized() { - return matcher(HttpStatus.UNAUTHORIZED); - } - - /** - * Assert the response status code is {@code HttpStatus.PAYMENT_REQUIRED} (402). - */ - public ResultMatcher isPaymentRequired() { - return matcher(HttpStatus.PAYMENT_REQUIRED); - } - - /** - * Assert the response status code is {@code HttpStatus.FORBIDDEN} (403). - */ - public ResultMatcher isForbidden() { - return matcher(HttpStatus.FORBIDDEN); - } - - /** - * Assert the response status code is {@code HttpStatus.NOT_FOUND} (404). - */ - public ResultMatcher isNotFound() { - return matcher(HttpStatus.NOT_FOUND); - } - - /** - * Assert the response status code is {@code HttpStatus.METHOD_NOT_ALLOWED} (405). - */ - public ResultMatcher isMethodNotAllowed() { - return matcher(HttpStatus.METHOD_NOT_ALLOWED); - } - - /** - * Assert the response status code is {@code HttpStatus.NOT_ACCEPTABLE} (406). - */ - public ResultMatcher isNotAcceptable() { - return matcher(HttpStatus.NOT_ACCEPTABLE); - } - - /** - * Assert the response status code is {@code HttpStatus.PROXY_AUTHENTICATION_REQUIRED} (407). - */ - public ResultMatcher isProxyAuthenticationRequired() { - return matcher(HttpStatus.PROXY_AUTHENTICATION_REQUIRED); - } - - /** - * Assert the response status code is {@code HttpStatus.REQUEST_TIMEOUT} (408). - */ - public ResultMatcher isRequestTimeout() { - return matcher(HttpStatus.REQUEST_TIMEOUT); - } - - /** - * Assert the response status code is {@code HttpStatus.CONFLICT} (409). - */ - public ResultMatcher isConflict() { - return matcher(HttpStatus.CONFLICT); - } - - /** - * Assert the response status code is {@code HttpStatus.GONE} (410). - */ - public ResultMatcher isGone() { - return matcher(HttpStatus.GONE); - } - - /** - * Assert the response status code is {@code HttpStatus.LENGTH_REQUIRED} (411). - */ - public ResultMatcher isLengthRequired() { - return matcher(HttpStatus.LENGTH_REQUIRED); - } - - /** - * Assert the response status code is {@code HttpStatus.PRECONDITION_FAILED} (412). - */ - public ResultMatcher isPreconditionFailed() { - return matcher(HttpStatus.PRECONDITION_FAILED); - } - - /** - * Assert the response status code is {@code HttpStatus.REQUEST_ENTITY_TOO_LARGE} (413). - */ - public ResultMatcher isRequestEntityTooLarge() { - return matcher(HttpStatus.REQUEST_ENTITY_TOO_LARGE); - } - - /** - * Assert the response status code is {@code HttpStatus.REQUEST_URI_TOO_LONG} (414). - */ - public ResultMatcher isRequestUriTooLong() { - return matcher(HttpStatus.REQUEST_URI_TOO_LONG); - } - - /** - * Assert the response status code is {@code HttpStatus.UNSUPPORTED_MEDIA_TYPE} (415). - */ - public ResultMatcher isUnsupportedMediaType() { - return matcher(HttpStatus.UNSUPPORTED_MEDIA_TYPE); - } - - /** - * Assert the response status code is {@code HttpStatus.REQUESTED_RANGE_NOT_SATISFIABLE} (416). - */ - public ResultMatcher isRequestedRangeNotSatisfiable() { - return matcher(HttpStatus.REQUESTED_RANGE_NOT_SATISFIABLE); - } - - /** - * Assert the response status code is {@code HttpStatus.EXPECTATION_FAILED} (417). - */ - public ResultMatcher isExpectationFailed() { - return matcher(HttpStatus.EXPECTATION_FAILED); - } - - /** - * Assert the response status code is {@code HttpStatus.I_AM_A_TEAPOT} (418). - */ - public ResultMatcher isIAmATeapot() { - return matcher(HttpStatus.valueOf(418)); - } - - /** - * Assert the response status code is {@code HttpStatus.INSUFFICIENT_SPACE_ON_RESOURCE} (419). - * @deprecated matching the deprecation of HttpStatus.INSUFFICIENT_SPACE_ON_RESOURCE - */ - public ResultMatcher isInsufficientSpaceOnResource() { - return matcher(HttpStatus.INSUFFICIENT_SPACE_ON_RESOURCE); - } - - /** - * Assert the response status code is {@code HttpStatus.METHOD_FAILURE} (420). - * @deprecated matching the deprecation of HttpStatus.METHOD_FAILURE - */ - public ResultMatcher isMethodFailure() { - return matcher(HttpStatus.METHOD_FAILURE); - } - - /** - * Assert the response status code is {@code HttpStatus.DESTINATION_LOCKED} (421). - * @deprecated matching the deprecation of HttpStatus.DESTINATION_LOCKED - */ - public ResultMatcher isDestinationLocked() { - return matcher(HttpStatus.DESTINATION_LOCKED); - } - - /** - * Assert the response status code is {@code HttpStatus.UNPROCESSABLE_ENTITY} (422). - */ - public ResultMatcher isUnprocessableEntity() { - return matcher(HttpStatus.UNPROCESSABLE_ENTITY); - } - - /** - * Assert the response status code is {@code HttpStatus.LOCKED} (423). - */ - public ResultMatcher isLocked() { - return matcher(HttpStatus.LOCKED); - } - - /** - * Assert the response status code is {@code HttpStatus.FAILED_DEPENDENCY} (424). - */ - public ResultMatcher isFailedDependency() { - return matcher(HttpStatus.FAILED_DEPENDENCY); - } - - /** - * Assert the response status code is {@code HttpStatus.UPGRADE_REQUIRED} (426). - */ - public ResultMatcher isUpgradeRequired() { - return matcher(HttpStatus.UPGRADE_REQUIRED); - } - - /** - * Assert the response status code is {@code HttpStatus.PRECONDITION_REQUIRED} (428). - */ - public ResultMatcher isPreconditionRequired() { - return matcher(HttpStatus.valueOf(428)); - } - - /** - * Assert the response status code is {@code HttpStatus.TOO_MANY_REQUESTS} (429). - */ - public ResultMatcher isTooManyRequests() { - return matcher(HttpStatus.valueOf(429)); - } - - /** - * Assert the response status code is {@code HttpStatus.REQUEST_HEADER_FIELDS_TOO_LARGE} (431). - */ - public ResultMatcher isRequestHeaderFieldsTooLarge() { - return matcher(HttpStatus.valueOf(431)); - } - - /** - * Assert the response status code is {@code HttpStatus.INTERNAL_SERVER_ERROR} (500). - */ - public ResultMatcher isInternalServerError() { - return matcher(HttpStatus.INTERNAL_SERVER_ERROR); - } - - /** - * Assert the response status code is {@code HttpStatus.NOT_IMPLEMENTED} (501). - */ - public ResultMatcher isNotImplemented() { - return matcher(HttpStatus.NOT_IMPLEMENTED); - } - - /** - * Assert the response status code is {@code HttpStatus.BAD_GATEWAY} (502). - */ - public ResultMatcher isBadGateway() { - return matcher(HttpStatus.BAD_GATEWAY); - } - - /** - * Assert the response status code is {@code HttpStatus.SERVICE_UNAVAILABLE} (503). - */ - public ResultMatcher isServiceUnavailable() { - return matcher(HttpStatus.SERVICE_UNAVAILABLE); - } - - /** - * Assert the response status code is {@code HttpStatus.GATEWAY_TIMEOUT} (504). - */ - public ResultMatcher isGatewayTimeout() { - return matcher(HttpStatus.GATEWAY_TIMEOUT); - } - - /** - * Assert the response status code is {@code HttpStatus.HTTP_VERSION_NOT_SUPPORTED} (505). - */ - public ResultMatcher isHttpVersionNotSupported() { - return matcher(HttpStatus.HTTP_VERSION_NOT_SUPPORTED); - } - - /** - * Assert the response status code is {@code HttpStatus.VARIANT_ALSO_NEGOTIATES} (506). - */ - public ResultMatcher isVariantAlsoNegotiates() { - return matcher(HttpStatus.VARIANT_ALSO_NEGOTIATES); - } - - /** - * Assert the response status code is {@code HttpStatus.INSUFFICIENT_STORAGE} (507). - */ - public ResultMatcher isInsufficientStorage() { - return matcher(HttpStatus.INSUFFICIENT_STORAGE); - } - - /** - * Assert the response status code is {@code HttpStatus.LOOP_DETECTED} (508). - */ - public ResultMatcher isLoopDetected() { - return matcher(HttpStatus.LOOP_DETECTED); - } - - /** - * Assert the response status code is {@code HttpStatus.BANDWIDTH_LIMIT_EXCEEDED} (509). - */ - public ResultMatcher isBandwidthLimitExceeded() { - return matcher(HttpStatus.valueOf(509)); - } - - /** - * Assert the response status code is {@code HttpStatus.NOT_EXTENDED} (510). - */ - public ResultMatcher isNotExtended() { - return matcher(HttpStatus.NOT_EXTENDED); - } - - /** - * Assert the response status code is {@code HttpStatus.NETWORK_AUTHENTICATION_REQUIRED} (511). - */ - public ResultMatcher isNetworkAuthenticationRequired() { - return matcher(HttpStatus.valueOf(511)); - } - - /** + /** + * Assert the response status code is {@code HttpStatus.CONTINUE} (100). + */ + public ResultMatcher isContinue() { + return matcher(HttpStatus.CONTINUE); + } + + /** + * Assert the response status code is {@code HttpStatus.SWITCHING_PROTOCOLS} (101). + */ + public ResultMatcher isSwitchingProtocols() { + return matcher(HttpStatus.SWITCHING_PROTOCOLS); + } + + /** + * Assert the response status code is {@code HttpStatus.PROCESSING} (102). + */ + public ResultMatcher isProcessing() { + return matcher(HttpStatus.PROCESSING); + } + + /** + * Assert the response status code is {@code HttpStatus.CHECKPOINT} (103). + */ + public ResultMatcher isCheckpoint() { + return matcher(HttpStatus.valueOf(103)); + } + + /** + * Assert the response status code is {@code HttpStatus.OK} (200). + */ + public ResultMatcher isOk() { + return matcher(HttpStatus.OK); + } + + /** + * Assert the response status code is {@code HttpStatus.CREATED} (201). + */ + public ResultMatcher isCreated() { + return matcher(HttpStatus.CREATED); + } + + /** + * Assert the response status code is {@code HttpStatus.ACCEPTED} (202). + */ + public ResultMatcher isAccepted() { + return matcher(HttpStatus.ACCEPTED); + } + + /** + * Assert the response status code is {@code HttpStatus.NON_AUTHORITATIVE_INFORMATION} (203). + */ + public ResultMatcher isNonAuthoritativeInformation() { + return matcher(HttpStatus.NON_AUTHORITATIVE_INFORMATION); + } + + /** + * Assert the response status code is {@code HttpStatus.NO_CONTENT} (204). + */ + public ResultMatcher isNoContent() { + return matcher(HttpStatus.NO_CONTENT); + } + + /** + * Assert the response status code is {@code HttpStatus.RESET_CONTENT} (205). + */ + public ResultMatcher isResetContent() { + return matcher(HttpStatus.RESET_CONTENT); + } + + /** + * Assert the response status code is {@code HttpStatus.PARTIAL_CONTENT} (206). + */ + public ResultMatcher isPartialContent() { + return matcher(HttpStatus.PARTIAL_CONTENT); + } + + /** + * Assert the response status code is {@code HttpStatus.MULTI_STATUS} (207). + */ + public ResultMatcher isMultiStatus() { + return matcher(HttpStatus.MULTI_STATUS); + } + + /** + * Assert the response status code is {@code HttpStatus.ALREADY_REPORTED} (208). + */ + public ResultMatcher isAlreadyReported() { + return matcher(HttpStatus.ALREADY_REPORTED); + } + + /** + * Assert the response status code is {@code HttpStatus.IM_USED} (226). + */ + public ResultMatcher isImUsed() { + return matcher(HttpStatus.IM_USED); + } + + /** + * Assert the response status code is {@code HttpStatus.MULTIPLE_CHOICES} (300). + */ + public ResultMatcher isMultipleChoices() { + return matcher(HttpStatus.MULTIPLE_CHOICES); + } + + /** + * Assert the response status code is {@code HttpStatus.MOVED_PERMANENTLY} (301). + */ + public ResultMatcher isMovedPermanently() { + return matcher(HttpStatus.MOVED_PERMANENTLY); + } + + /** + * Assert the response status code is {@code HttpStatus.FOUND} (302). + */ + public ResultMatcher isFound() { + return matcher(HttpStatus.FOUND); + } + + /** + * Assert the response status code is {@code HttpStatus.MOVED_TEMPORARILY} (302). + */ + public ResultMatcher isMovedTemporarily() { + return matcher(HttpStatus.MOVED_TEMPORARILY); + } + + /** + * Assert the response status code is {@code HttpStatus.SEE_OTHER} (303). + */ + public ResultMatcher isSeeOther() { + return matcher(HttpStatus.SEE_OTHER); + } + + /** + * Assert the response status code is {@code HttpStatus.NOT_MODIFIED} (304). + */ + public ResultMatcher isNotModified() { + return matcher(HttpStatus.NOT_MODIFIED); + } + + /** + * Assert the response status code is {@code HttpStatus.USE_PROXY} (305). + */ + public ResultMatcher isUseProxy() { + return matcher(HttpStatus.USE_PROXY); + } + + /** + * Assert the response status code is {@code HttpStatus.TEMPORARY_REDIRECT} (307). + */ + public ResultMatcher isTemporaryRedirect() { + return matcher(HttpStatus.TEMPORARY_REDIRECT); + } + + /** + * Assert the response status code is {@code HttpStatus.RESUME_INCOMPLETE} (308). + */ + public ResultMatcher isResumeIncomplete() { + return matcher(HttpStatus.valueOf(308)); + } + + /** + * Assert the response status code is {@code HttpStatus.BAD_REQUEST} (400). + */ + public ResultMatcher isBadRequest() { + return matcher(HttpStatus.BAD_REQUEST); + } + + /** + * Assert the response status code is {@code HttpStatus.UNAUTHORIZED} (401). + */ + public ResultMatcher isUnauthorized() { + return matcher(HttpStatus.UNAUTHORIZED); + } + + /** + * Assert the response status code is {@code HttpStatus.PAYMENT_REQUIRED} (402). + */ + public ResultMatcher isPaymentRequired() { + return matcher(HttpStatus.PAYMENT_REQUIRED); + } + + /** + * Assert the response status code is {@code HttpStatus.FORBIDDEN} (403). + */ + public ResultMatcher isForbidden() { + return matcher(HttpStatus.FORBIDDEN); + } + + /** + * Assert the response status code is {@code HttpStatus.NOT_FOUND} (404). + */ + public ResultMatcher isNotFound() { + return matcher(HttpStatus.NOT_FOUND); + } + + /** + * Assert the response status code is {@code HttpStatus.METHOD_NOT_ALLOWED} (405). + */ + public ResultMatcher isMethodNotAllowed() { + return matcher(HttpStatus.METHOD_NOT_ALLOWED); + } + + /** + * Assert the response status code is {@code HttpStatus.NOT_ACCEPTABLE} (406). + */ + public ResultMatcher isNotAcceptable() { + return matcher(HttpStatus.NOT_ACCEPTABLE); + } + + /** + * Assert the response status code is {@code HttpStatus.PROXY_AUTHENTICATION_REQUIRED} (407). + */ + public ResultMatcher isProxyAuthenticationRequired() { + return matcher(HttpStatus.PROXY_AUTHENTICATION_REQUIRED); + } + + /** + * Assert the response status code is {@code HttpStatus.REQUEST_TIMEOUT} (408). + */ + public ResultMatcher isRequestTimeout() { + return matcher(HttpStatus.REQUEST_TIMEOUT); + } + + /** + * Assert the response status code is {@code HttpStatus.CONFLICT} (409). + */ + public ResultMatcher isConflict() { + return matcher(HttpStatus.CONFLICT); + } + + /** + * Assert the response status code is {@code HttpStatus.GONE} (410). + */ + public ResultMatcher isGone() { + return matcher(HttpStatus.GONE); + } + + /** + * Assert the response status code is {@code HttpStatus.LENGTH_REQUIRED} (411). + */ + public ResultMatcher isLengthRequired() { + return matcher(HttpStatus.LENGTH_REQUIRED); + } + + /** + * Assert the response status code is {@code HttpStatus.PRECONDITION_FAILED} (412). + */ + public ResultMatcher isPreconditionFailed() { + return matcher(HttpStatus.PRECONDITION_FAILED); + } + + /** + * Assert the response status code is {@code HttpStatus.REQUEST_ENTITY_TOO_LARGE} (413). + */ + public ResultMatcher isRequestEntityTooLarge() { + return matcher(HttpStatus.REQUEST_ENTITY_TOO_LARGE); + } + + /** + * Assert the response status code is {@code HttpStatus.REQUEST_URI_TOO_LONG} (414). + */ + public ResultMatcher isRequestUriTooLong() { + return matcher(HttpStatus.REQUEST_URI_TOO_LONG); + } + + /** + * Assert the response status code is {@code HttpStatus.UNSUPPORTED_MEDIA_TYPE} (415). + */ + public ResultMatcher isUnsupportedMediaType() { + return matcher(HttpStatus.UNSUPPORTED_MEDIA_TYPE); + } + + /** + * Assert the response status code is {@code HttpStatus.REQUESTED_RANGE_NOT_SATISFIABLE} (416). + */ + public ResultMatcher isRequestedRangeNotSatisfiable() { + return matcher(HttpStatus.REQUESTED_RANGE_NOT_SATISFIABLE); + } + + /** + * Assert the response status code is {@code HttpStatus.EXPECTATION_FAILED} (417). + */ + public ResultMatcher isExpectationFailed() { + return matcher(HttpStatus.EXPECTATION_FAILED); + } + + /** + * Assert the response status code is {@code HttpStatus.I_AM_A_TEAPOT} (418). + */ + public ResultMatcher isIAmATeapot() { + return matcher(HttpStatus.valueOf(418)); + } + + /** + * Assert the response status code is {@code HttpStatus.INSUFFICIENT_SPACE_ON_RESOURCE} (419). + * @deprecated matching the deprecation of HttpStatus.INSUFFICIENT_SPACE_ON_RESOURCE + */ + public ResultMatcher isInsufficientSpaceOnResource() { + return matcher(HttpStatus.INSUFFICIENT_SPACE_ON_RESOURCE); + } + + /** + * Assert the response status code is {@code HttpStatus.METHOD_FAILURE} (420). + * @deprecated matching the deprecation of HttpStatus.METHOD_FAILURE + */ + public ResultMatcher isMethodFailure() { + return matcher(HttpStatus.METHOD_FAILURE); + } + + /** + * Assert the response status code is {@code HttpStatus.DESTINATION_LOCKED} (421). + * @deprecated matching the deprecation of HttpStatus.DESTINATION_LOCKED + */ + public ResultMatcher isDestinationLocked() { + return matcher(HttpStatus.DESTINATION_LOCKED); + } + + /** + * Assert the response status code is {@code HttpStatus.UNPROCESSABLE_ENTITY} (422). + */ + public ResultMatcher isUnprocessableEntity() { + return matcher(HttpStatus.UNPROCESSABLE_ENTITY); + } + + /** + * Assert the response status code is {@code HttpStatus.LOCKED} (423). + */ + public ResultMatcher isLocked() { + return matcher(HttpStatus.LOCKED); + } + + /** + * Assert the response status code is {@code HttpStatus.FAILED_DEPENDENCY} (424). + */ + public ResultMatcher isFailedDependency() { + return matcher(HttpStatus.FAILED_DEPENDENCY); + } + + /** + * Assert the response status code is {@code HttpStatus.UPGRADE_REQUIRED} (426). + */ + public ResultMatcher isUpgradeRequired() { + return matcher(HttpStatus.UPGRADE_REQUIRED); + } + + /** + * Assert the response status code is {@code HttpStatus.PRECONDITION_REQUIRED} (428). + */ + public ResultMatcher isPreconditionRequired() { + return matcher(HttpStatus.valueOf(428)); + } + + /** + * Assert the response status code is {@code HttpStatus.TOO_MANY_REQUESTS} (429). + */ + public ResultMatcher isTooManyRequests() { + return matcher(HttpStatus.valueOf(429)); + } + + /** + * Assert the response status code is {@code HttpStatus.REQUEST_HEADER_FIELDS_TOO_LARGE} (431). + */ + public ResultMatcher isRequestHeaderFieldsTooLarge() { + return matcher(HttpStatus.valueOf(431)); + } + + /** + * Assert the response status code is {@code HttpStatus.INTERNAL_SERVER_ERROR} (500). + */ + public ResultMatcher isInternalServerError() { + return matcher(HttpStatus.INTERNAL_SERVER_ERROR); + } + + /** + * Assert the response status code is {@code HttpStatus.NOT_IMPLEMENTED} (501). + */ + public ResultMatcher isNotImplemented() { + return matcher(HttpStatus.NOT_IMPLEMENTED); + } + + /** + * Assert the response status code is {@code HttpStatus.BAD_GATEWAY} (502). + */ + public ResultMatcher isBadGateway() { + return matcher(HttpStatus.BAD_GATEWAY); + } + + /** + * Assert the response status code is {@code HttpStatus.SERVICE_UNAVAILABLE} (503). + */ + public ResultMatcher isServiceUnavailable() { + return matcher(HttpStatus.SERVICE_UNAVAILABLE); + } + + /** + * Assert the response status code is {@code HttpStatus.GATEWAY_TIMEOUT} (504). + */ + public ResultMatcher isGatewayTimeout() { + return matcher(HttpStatus.GATEWAY_TIMEOUT); + } + + /** + * Assert the response status code is {@code HttpStatus.HTTP_VERSION_NOT_SUPPORTED} (505). + */ + public ResultMatcher isHttpVersionNotSupported() { + return matcher(HttpStatus.HTTP_VERSION_NOT_SUPPORTED); + } + + /** + * Assert the response status code is {@code HttpStatus.VARIANT_ALSO_NEGOTIATES} (506). + */ + public ResultMatcher isVariantAlsoNegotiates() { + return matcher(HttpStatus.VARIANT_ALSO_NEGOTIATES); + } + + /** + * Assert the response status code is {@code HttpStatus.INSUFFICIENT_STORAGE} (507). + */ + public ResultMatcher isInsufficientStorage() { + return matcher(HttpStatus.INSUFFICIENT_STORAGE); + } + + /** + * Assert the response status code is {@code HttpStatus.LOOP_DETECTED} (508). + */ + public ResultMatcher isLoopDetected() { + return matcher(HttpStatus.LOOP_DETECTED); + } + + /** + * Assert the response status code is {@code HttpStatus.BANDWIDTH_LIMIT_EXCEEDED} (509). + */ + public ResultMatcher isBandwidthLimitExceeded() { + return matcher(HttpStatus.valueOf(509)); + } + + /** + * Assert the response status code is {@code HttpStatus.NOT_EXTENDED} (510). + */ + public ResultMatcher isNotExtended() { + return matcher(HttpStatus.NOT_EXTENDED); + } + + /** + * Assert the response status code is {@code HttpStatus.NETWORK_AUTHENTICATION_REQUIRED} (511). + */ + public ResultMatcher isNetworkAuthenticationRequired() { + return matcher(HttpStatus.valueOf(511)); + } + + /** * Match the expected response status to that of the HttpServletResponse */ - private ResultMatcher matcher(final HttpStatus status) { + private ResultMatcher matcher(final HttpStatus status) { return new ResultMatcher() { public void match(MvcResult result) { assertEquals("Status", status.value(), result.getResponse().getStatus());
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-test-mvc/src/main/java/org/springframework/test/web/servlet/setup/PatternMappingFilterProxy.java
@@ -62,7 +62,7 @@ public PatternMappingFilterProxy(Filter delegate, String... urlPatterns) { Assert.notNull(delegate, "A delegate Filter is required"); this.delegate = delegate; for(String urlPattern : urlPatterns) { - addUrlPattern(urlPattern); + addUrlPattern(urlPattern); } } @@ -127,4 +127,4 @@ public void destroy() { this.delegate.destroy(); } -} \ No newline at end of file +}
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-test-mvc/src/test/java/org/springframework/test/web/servlet/request/MockHttpServletRequestBuilderTests.java
@@ -228,9 +228,9 @@ public void requestParameterFromQueryWithEncoding() throws Exception { assertEquals("bar=baz", request.getParameter("foo")); } - @Test - public void acceptHeader() throws Exception { - this.builder.accept(MediaType.TEXT_HTML, MediaType.APPLICATION_XML); + @Test + public void acceptHeader() throws Exception { + this.builder.accept(MediaType.TEXT_HTML, MediaType.APPLICATION_XML); MockHttpServletRequest request = this.builder.buildRequest(this.servletContext); List<String> accept = Collections.list(request.getHeaders("Accept"));
true
Other
spring-projects
spring-framework
2cf45bad860f560d3a5806eb23ffe1669e907673.json
Replace space indentation with tabs Issue: SPR-10127
spring-test-mvc/src/test/java/org/springframework/test/web/servlet/samples/standalone/ExceptionHandlerTests.java
@@ -40,7 +40,7 @@ public void testExceptionHandlerMethod() throws Exception { standaloneSetup(new PersonController()).build() .perform(get("/person/Clyde")) .andExpect(status().isOk()) - .andExpect(forwardedUrl("errorView")); + .andExpect(forwardedUrl("errorView")); }
true