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 | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-aspects/src/test/java/org/springframework/beans/NestedTestBean.java | @@ -1,12 +1,12 @@
/*
* Copyright 2002-2005 the original author or authors.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-aspects/src/test/java/org/springframework/cache/config/CacheableService.java | @@ -18,7 +18,7 @@
/**
* Basic service interface.
- *
+ *
* @author Costin Leau
*/
public interface CacheableService<T> { | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-aspects/src/test/java/org/springframework/cache/config/DefaultCacheableService.java | @@ -25,7 +25,7 @@
/**
* Simple cacheable service
- *
+ *
* @author Costin Leau
*/
public class DefaultCacheableService implements CacheableService<Long> { | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-aspects/src/test/java/org/springframework/mock/staticmock/AnnotationDrivenStaticEntityMockingControlTest.java | @@ -45,7 +45,7 @@ public void testNoArgIntReturn() {
playback();
Assert.assertEquals(expectedCount, Person.countPeople());
}
-
+
@Test(expected=PersistenceException.class)
public void testNoArgThrows() {
Person.countPeople();
@@ -64,7 +64,7 @@ public void testArgMethodMatches() {
Assert.assertEquals(found, Person.findPerson(id));
}
-
+
@Test
public void testLongSeriesOfCalls() {
long id1 = 13;
@@ -80,7 +80,7 @@ public void testLongSeriesOfCalls() {
Person.countPeople();
expectReturn(0);
playback();
-
+
Assert.assertEquals(found1, Person.findPerson(id1));
Assert.assertEquals(found2, Person.findPerson(id2));
Assert.assertEquals(found1, Person.findPerson(id1));
@@ -122,22 +122,22 @@ public void testReentrant() {
public void testRejectUnexpectedCall() {
new Delegate().rejectUnexpectedCall();
}
-
+
@Test(expected=IllegalStateException.class)
public void testFailTooFewCalls() {
new Delegate().failTooFewCalls();
}
-
+
@Test
public void testEmpty() {
// Test that verification check doesn't blow up if no replay() call happened
}
-
+
@Test(expected=IllegalStateException.class)
public void testDoesntEverReplay() {
new Delegate().doesntEverReplay();
}
-
+
@Test(expected=IllegalStateException.class)
public void testDoesntEverSetReturn() {
new Delegate().doesntEverSetReturn(); | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-aspects/src/test/java/org/springframework/mock/staticmock/Delegate.java | @@ -52,7 +52,7 @@ public void testArgMethodNoMatchExpectThrow() {
AnnotationDrivenStaticEntityMockingControl.playback();
Assert.assertEquals(found, Person.findPerson(id + 1));
}
-
+
@Test
public void failTooFewCalls() {
long id = 13;
@@ -69,7 +69,7 @@ public void failTooFewCalls() {
public void doesntEverReplay() {
Person.countPeople();
}
-
+
@Test
public void doesntEverSetReturn() {
Person.countPeople();
@@ -81,7 +81,7 @@ public void rejectUnexpectedCall() {
AnnotationDrivenStaticEntityMockingControl.playback();
Person.countPeople();
}
-
+
@Test(expected=RemoteException.class)
public void testVerificationFailsEvenWhenTestFailsInExpectedManner() throws RemoteException {
Person.countPeople(); | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-aspects/src/test/java/org/springframework/mock/staticmock/Person_Roo_Entity.aj | @@ -17,84 +17,84 @@
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 | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-aspects/src/test/java/org/springframework/transaction/CallCountingTransactionManager.java | @@ -50,7 +50,7 @@ protected void doRollback(DefaultTransactionStatus status) {
++rollbacks;
--inflight;
}
-
+
public void clear() {
begun = commits = rollbacks = inflight = 0;
} | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-aspects/src/test/java/org/springframework/transaction/aspectj/ClassWithPrivateAnnotatedMember.java | @@ -1,12 +1,12 @@
/*
* Copyright 2002-2006 the original author or authors.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -28,7 +28,7 @@ public class ClassWithPrivateAnnotatedMember {
public void doSomething() {
doInTransaction();
}
-
+
@Transactional
private void doInTransaction() {}
} | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-aspects/src/test/java/org/springframework/transaction/aspectj/ClassWithProtectedAnnotatedMember.java | @@ -1,12 +1,12 @@
/*
* Copyright 2002-2006 the original author or authors.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -28,7 +28,7 @@ public class ClassWithProtectedAnnotatedMember {
public void doSomething() {
doInTransaction();
}
-
+
@Transactional
protected void doInTransaction() {}
} | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-aspects/src/test/java/org/springframework/transaction/aspectj/ITransactional.java | @@ -4,7 +4,7 @@
@Transactional
public interface ITransactional {
-
+
Object echo(Throwable t) throws Throwable;
} | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-aspects/src/test/java/org/springframework/transaction/aspectj/MethodAnnotationOnClassWithNoInterface.java | @@ -3,17 +3,17 @@
import org.springframework.transaction.annotation.Transactional;
public class MethodAnnotationOnClassWithNoInterface {
-
+
@Transactional(rollbackFor=InterruptedException.class)
public Object echo(Throwable t) throws Throwable {
if (t != null) {
throw t;
}
return t;
}
-
+
public void noTransactionAttribute() {
-
+
}
} | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-aspects/src/test/java/org/springframework/transaction/aspectj/TransactionAspectTests.java | @@ -31,25 +31,25 @@
* @author Ramnivas Laddad
*/
public class TransactionAspectTests extends AbstractDependencyInjectionSpringContextTests {
-
+
private TransactionAspectSupport transactionAspect;
-
+
private CallCountingTransactionManager txManager;
-
+
private TransactionalAnnotationOnlyOnClassWithNoInterface annotationOnlyOnClassWithNoInterface;
-
+
private ClassWithProtectedAnnotatedMember beanWithAnnotatedProtectedMethod;
private ClassWithPrivateAnnotatedMember beanWithAnnotatedPrivateMethod;
-
+
private MethodAnnotationOnClassWithNoInterface methodAnnotationOnly = new MethodAnnotationOnClassWithNoInterface();
public void setAnnotationOnlyOnClassWithNoInterface(
TransactionalAnnotationOnlyOnClassWithNoInterface annotationOnlyOnClassWithNoInterface) {
this.annotationOnlyOnClassWithNoInterface = annotationOnlyOnClassWithNoInterface;
}
-
+
public void setClassWithAnnotatedProtectedMethod(ClassWithProtectedAnnotatedMember aBean) {
this.beanWithAnnotatedProtectedMethod = aBean;
}
@@ -84,14 +84,14 @@ public void testCommitOnAnnotatedProtectedMethod() throws Throwable {
txManager.clear();
assertEquals(0, txManager.begun);
beanWithAnnotatedProtectedMethod.doInTransaction();
- assertEquals(1, txManager.commits);
+ assertEquals(1, txManager.commits);
}
public void testCommitOnAnnotatedPrivateMethod() throws Throwable {
txManager.clear();
assertEquals(0, txManager.begun);
beanWithAnnotatedPrivateMethod.doSomething();
- assertEquals(1, txManager.commits);
+ assertEquals(1, txManager.commits);
}
public void testNoCommitOnNonAnnotatedNonPublicMethodInTransactionalType() throws Throwable {
@@ -100,67 +100,67 @@ public void testNoCommitOnNonAnnotatedNonPublicMethodInTransactionalType() throw
annotationOnlyOnClassWithNoInterface.nonTransactionalMethod();
assertEquals(0,txManager.begun);
}
-
+
public void testCommitOnAnnotatedMethod() throws Throwable {
txManager.clear();
assertEquals(0, txManager.begun);
methodAnnotationOnly.echo(null);
assertEquals(1, txManager.commits);
}
-
-
+
+
public static class NotTransactional {
public void noop() {
}
}
-
+
public void testNotTransactional() throws Throwable {
txManager.clear();
assertEquals(0, txManager.begun);
new NotTransactional().noop();
assertEquals(0, txManager.begun);
}
-
-
+
+
public void testDefaultCommitOnAnnotatedClass() throws Throwable {
testRollback(new TransactionOperationCallback() {
public Object performTransactionalOperation() throws Throwable {
return annotationOnlyOnClassWithNoInterface.echo(new Exception());
}
}, false);
}
-
+
public void testDefaultRollbackOnAnnotatedClass() throws Throwable {
testRollback(new TransactionOperationCallback() {
public Object performTransactionalOperation() throws Throwable {
return annotationOnlyOnClassWithNoInterface.echo(new RuntimeException());
}
}, true);
}
-
-
+
+
public static class SubclassOfClassWithTransactionalAnnotation extends TransactionalAnnotationOnlyOnClassWithNoInterface {
}
-
+
public void testDefaultCommitOnSubclassOfAnnotatedClass() throws Throwable {
testRollback(new TransactionOperationCallback() {
public Object performTransactionalOperation() throws Throwable {
return new SubclassOfClassWithTransactionalAnnotation().echo(new Exception());
}
}, false);
}
-
+
public static class SubclassOfClassWithTransactionalMethodAnnotation extends MethodAnnotationOnClassWithNoInterface {
}
-
+
public void testDefaultCommitOnSubclassOfClassWithTransactionalMethodAnnotated() throws Throwable {
testRollback(new TransactionOperationCallback() {
public Object performTransactionalOperation() throws Throwable {
return new SubclassOfClassWithTransactionalMethodAnnotation().echo(new Exception());
}
}, false);
}
-
+
public static class ImplementsAnnotatedInterface implements ITransactional {
public Object echo(Throwable t) throws Throwable {
if (t != null) {
@@ -169,22 +169,22 @@ public Object echo(Throwable t) throws Throwable {
return t;
}
}
-
+
public void testDefaultCommitOnImplementationOfAnnotatedInterface() throws Throwable {
// testRollback(new TransactionOperationCallback() {
// public Object performTransactionalOperation() throws Throwable {
// return new ImplementsAnnotatedInterface().echo(new Exception());
// }
// }, false);
-
+
final Exception ex = new Exception();
testNotTransactional(new TransactionOperationCallback() {
public Object performTransactionalOperation() throws Throwable {
return new ImplementsAnnotatedInterface().echo(ex);
}
}, ex);
}
-
+
/**
* Note: resolution does not occur. Thus we can't make a class transactional if
* it implements a transactionally annotated interface. This behaviour could only
@@ -198,15 +198,15 @@ public void testDoesNotResolveTxAnnotationOnMethodFromClassImplementingAnnotated
TransactionAttribute ta = atas.getTransactionAttribute(m, ImplementsAnnotatedInterface.class);
assertNull(ta);
}
-
-
+
+
public void testDefaultRollbackOnImplementationOfAnnotatedInterface() throws Throwable {
// testRollback(new TransactionOperationCallback() {
// public Object performTransactionalOperation() throws Throwable {
// return new ImplementsAnnotatedInterface().echo(new RuntimeException());
// }
// }, true);
-
+
final Exception rollbackProvokingException = new RuntimeException();
testNotTransactional(new TransactionOperationCallback() {
public Object performTransactionalOperation() throws Throwable {
@@ -215,7 +215,7 @@ public Object performTransactionalOperation() throws Throwable {
}, rollbackProvokingException);
}
-
+
protected void testRollback(TransactionOperationCallback toc, boolean rollback) throws Throwable {
txManager.clear();
assertEquals(0, txManager.begun);
@@ -228,13 +228,13 @@ protected void testRollback(TransactionOperationCallback toc, boolean rollback)
return;
}
}
-
+
if (rollback) {
assertEquals(1, txManager.rollbacks);
}
assertEquals(1, txManager.begun);
}
-
+
protected void testNotTransactional(TransactionOperationCallback toc, Throwable expected) throws Throwable {
txManager.clear();
assertEquals(0, txManager.begun);
@@ -251,7 +251,7 @@ protected void testNotTransactional(TransactionOperationCallback toc, Throwable
assertEquals(0, txManager.begun);
}
}
-
+
private interface TransactionOperationCallback {
| true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-aspects/src/test/java/org/springframework/transaction/aspectj/TransactionalAnnotationOnlyOnClassWithNoInterface.java | @@ -4,14 +4,14 @@
@Transactional
public class TransactionalAnnotationOnlyOnClassWithNoInterface {
-
+
public Object echo(Throwable t) throws Throwable {
if (t != null) {
throw t;
}
return t;
}
-
+
void nonTransactionalMethod() {
// no-op
} | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/BeanWrapperImpl.java | @@ -559,7 +559,7 @@ private BeanWrapperImpl getNestedBeanWrapper(String nestedProperty) {
propertyValue = setDefaultValue(tokens);
}
else {
- throw new NullValueInNestedPathException(getRootClass(), this.nestedPath + canonicalName);
+ throw new NullValueInNestedPathException(getRootClass(), this.nestedPath + canonicalName);
}
}
@@ -723,7 +723,7 @@ public Object run() {
readMethod.setAccessible(true);
}
}
-
+
Object value;
if (System.getSecurityManager() != null) {
try {
@@ -740,36 +740,36 @@ public Object run() throws Exception {
else {
value = readMethod.invoke(object, (Object[]) null);
}
-
- if (tokens.keys != null) {
+
+ if (tokens.keys != null) {
if (value == null) {
if (this.autoGrowNestedPaths) {
value = setDefaultValue(tokens.actualName);
}
else {
throw new NullValueInNestedPathException(getRootClass(), this.nestedPath + propertyName,
"Cannot access indexed value of property referenced in indexed " +
- "property path '" + propertyName + "': returned null");
+ "property path '" + propertyName + "': returned null");
}
- }
+ }
String indexedPropertyName = tokens.actualName;
// apply indexes and map keys
for (int i = 0; i < tokens.keys.length; i++) {
String key = tokens.keys[i];
if (value == null) {
throw new NullValueInNestedPathException(getRootClass(), this.nestedPath + propertyName,
"Cannot access indexed value of property referenced in indexed " +
- "property path '" + propertyName + "': returned null");
+ "property path '" + propertyName + "': returned null");
}
else if (value.getClass().isArray()) {
int index = Integer.parseInt(key);
value = growArrayIfNecessary(value, index, indexedPropertyName);
value = Array.get(value, index);
}
else if (value instanceof List) {
- int index = Integer.parseInt(key);
+ int index = Integer.parseInt(key);
List list = (List) value;
- growCollectionIfNecessary(list, index, indexedPropertyName, pd, i + 1);
+ growCollectionIfNecessary(list, index, indexedPropertyName, pd, i + 1);
value = list.get(index);
}
else if (value instanceof Set) {
@@ -804,7 +804,7 @@ else if (value instanceof Map) {
"Property referenced in indexed property path '" + propertyName +
"' is neither an array nor a List nor a Set nor a Map; returned value was [" + value + "]");
}
- indexedPropertyName += PROPERTY_KEY_PREFIX + key + PROPERTY_KEY_SUFFIX;
+ indexedPropertyName += PROPERTY_KEY_PREFIX + key + PROPERTY_KEY_SUFFIX;
}
}
return value; | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/GenericTypeAwarePropertyDescriptor.java | @@ -95,7 +95,7 @@ public GenericTypeAwarePropertyDescriptor(Class beanClass, String propertyName,
public Class<?> getBeanClass() {
return this.beanClass;
}
-
+
@Override
public Method getReadMethod() {
return this.readMethod; | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/MethodInvocationException.java | @@ -30,7 +30,7 @@ public class MethodInvocationException extends PropertyAccessException {
* Error code that a method invocation error will be registered with.
*/
public static final String ERROR_CODE = "methodInvocation";
-
+
/**
* Create a new MethodInvocationException. | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/PropertyAccessException.java | @@ -30,7 +30,7 @@
public abstract class PropertyAccessException extends BeansException implements ErrorCoded {
private transient PropertyChangeEvent propertyChangeEvent;
-
+
/**
* Create a new PropertyAccessException. | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/PropertyEditorRegistrar.java | @@ -31,7 +31,7 @@
* @see java.beans.PropertyEditor
*/
public interface PropertyEditorRegistrar {
-
+
/**
* Register custom {@link java.beans.PropertyEditor PropertyEditors} with
* the given <code>PropertyEditorRegistry</code>. | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/PropertyValues.java | @@ -26,12 +26,12 @@
* @see PropertyValue
*/
public interface PropertyValues {
-
- /**
+
+ /**
* Return an array of the PropertyValue objects held in this object.
*/
- PropertyValue[] getPropertyValues();
-
+ PropertyValue[] getPropertyValues();
+
/**
* Return the property value with the given name, if any.
* @param propertyName the name to search for | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/factory/BeanFactoryUtils.java | @@ -115,7 +115,7 @@ public static String originalBeanName(String name) {
public static int countBeansIncludingAncestors(ListableBeanFactory lbf) {
return beanNamesIncludingAncestors(lbf).length;
}
-
+
/**
* Return all bean names in the factory, including ancestor factories.
* @param lbf the bean factory | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/factory/BeanIsNotAFactoryException.java | @@ -1,12 +1,12 @@
/*
* Copyright 2002-2005 the original author or authors.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/factory/DisposableBean.java | @@ -1,12 +1,12 @@
/*
* Copyright 2002-2005 the original author or authors.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/factory/HierarchicalBeanFactory.java | @@ -30,7 +30,7 @@
* @see org.springframework.beans.factory.config.ConfigurableBeanFactory#setParentBeanFactory
*/
public interface HierarchicalBeanFactory extends BeanFactory {
-
+
/**
* Return the parent bean factory, or <code>null</code> if there is none.
*/ | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/factory/InitializingBean.java | @@ -1,12 +1,12 @@
/*
* Copyright 2002-2005 the original author or authors.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -20,7 +20,7 @@
* Interface to be implemented by beans that need to react once all their
* properties have been set by a BeanFactory: for example, to perform custom
* initialization, or merely to check that all mandatory properties have been set.
- *
+ *
* <p>An alternative to implementing InitializingBean is specifying a custom
* init-method, for example in an XML bean definition.
* For a list of all bean lifecycle methods, see the BeanFactory javadocs.
@@ -33,7 +33,7 @@
* @see org.springframework.context.ApplicationContextAware
*/
public interface InitializingBean {
-
+
/**
* Invoked by a BeanFactory after it has set all bean properties supplied
* (and satisfied BeanFactoryAware and ApplicationContextAware). | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/factory/ListableBeanFactory.java | @@ -84,7 +84,7 @@ public interface ListableBeanFactory extends BeanFactory {
* or an empty array if none defined
*/
String[] getBeanDefinitionNames();
-
+
/**
* Return the names of beans matching the given type (including subclasses),
* judging from either bean definitions or the value of <code>getObjectType</code> | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/factory/NoSuchBeanDefinitionException.java | @@ -73,7 +73,7 @@ public NoSuchBeanDefinitionException(Class<?> type, String message) {
super("No unique bean of type [" + type.getName() + "] is defined: " + message);
this.beanType = type;
}
-
+
/**
* Create a new {@code NoSuchBeanDefinitionException}.
* @param type required type of the missing bean | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/factory/access/BootstrapException.java | @@ -1,12 +1,12 @@
/*
* Copyright 2002-2005 the original author or authors.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/factory/access/SingletonBeanFactoryLocator.java | @@ -40,7 +40,7 @@
* which accesses shared Spring {@link BeanFactory} instances.</p>
*
* <p>Please see the warning in BeanFactoryLocator's javadoc about appropriate usage
- * of singleton style BeanFactoryLocator implementations. It is the opinion of the
+ * of singleton style BeanFactoryLocator implementations. It is the opinion of the
* Spring team that the use of this class and similar classes is unnecessary except
* (sometimes) for a small amount of glue code. Excessive usage will lead to code
* that is more tightly coupled, and harder to modify or test.</p>
@@ -50,11 +50,11 @@
* searched for is 'classpath*:beanRefFactory.xml', with the Spring-standard
* 'classpath*:' prefix ensuring that if the classpath contains multiple copies
* of this file (perhaps one in each component jar) they will be combined. To
- * override the default resource name, instead of using the no-arg
+ * override the default resource name, instead of using the no-arg
* {@link #getInstance()} method, use the {@link #getInstance(String selector)}
* variant, which will treat the 'selector' argument as the resource name to
* search for.</p>
- *
+ *
* <p>The purpose of this 'outer' BeanFactory is to create and hold a copy of one
* or more 'inner' BeanFactory or ApplicationContext instances, and allow those
* to be obtained either directly or via an alias. As such, this class provides
@@ -80,10 +80,10 @@
* or created as three hierarchical ApplicationContexts, by one piece of code
* somewhere at application startup (perhaps a Servlet filter), from which all other
* code in the application would flow, obtained as beans from the context(s). However
- * when third party code enters into the picture, things can get problematic. If the
+ * when third party code enters into the picture, things can get problematic. If the
* third party code needs to create user classes, which should normally be obtained
* from a Spring BeanFactory/ApplicationContext, but can handle only newInstance()
- * style object creation, then some extra work is required to actually access and
+ * style object creation, then some extra work is required to actually access and
* use object from a BeanFactory/ApplicationContext. One solutions is to make the
* class created by the third party code be just a stub or proxy, which gets the
* real object from a BeanFactory/ApplicationContext, and delegates to it. However,
@@ -101,7 +101,7 @@
*
* <p>Another use of SingletonBeanFactoryLocator, is to demand-load/use one or more
* BeanFactories/ApplicationContexts. Because the definition can contain one of more
- * BeanFactories/ApplicationContexts, which can be independent or in a hierarchy, if
+ * BeanFactories/ApplicationContexts, which can be independent or in a hierarchy, if
* they are set to lazy-initialize, they will only be created when actually requested
* for use.
*
@@ -111,9 +111,9 @@
*
* <pre class="code"><?xml version="1.0" encoding="UTF-8"?>
* <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
- *
+ *
* <beans>
- *
+ *
* <bean id="com.mycompany.myapp"
* class="org.springframework.context.support.ClassPathXmlApplicationContext">
* <constructor-arg>
@@ -124,7 +124,7 @@
* </list>
* </constructor-arg>
* </bean>
- *
+ *
* </beans>
* </pre>
*
@@ -133,24 +133,24 @@
* <pre class="code">
* BeanFactoryLocator bfl = SingletonBeanFactoryLocator.getInstance();
* BeanFactoryReference bf = bfl.useBeanFactory("com.mycompany.myapp");
- * // now use some bean from factory
+ * // now use some bean from factory
* MyClass zed = bf.getFactory().getBean("mybean");
* </pre>
*
* Another relatively simple variation of the <code>beanRefFactory.xml</code> definition file could be:
*
* <pre class="code"><?xml version="1.0" encoding="UTF-8"?>
* <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
- *
+ *
* <beans>
- *
+ *
* <bean id="com.mycompany.myapp.util" lazy-init="true"
* class="org.springframework.context.support.ClassPathXmlApplicationContext">
* <constructor-arg>
* <value>com/mycompany/myapp/util/applicationContext.xml</value>
* </constructor-arg>
* </bean>
- *
+ *
* <!-- child of above -->
* <bean id="com.mycompany.myapp.dataaccess" lazy-init="true"
* class="org.springframework.context.support.ClassPathXmlApplicationContext">
@@ -161,7 +161,7 @@
* <ref bean="com.mycompany.myapp.util"/>
* </constructor-arg>
* </bean>
- *
+ *
* <!-- child of above -->
* <bean id="com.mycompany.myapp.services" lazy-init="true"
* class="org.springframework.context.support.ClassPathXmlApplicationContext">
@@ -172,15 +172,15 @@
* <ref bean="com.mycompany.myapp.dataaccess"/>
* </constructor-arg>
* </bean>
- *
+ *
* <!-- define an alias -->
* <bean id="com.mycompany.myapp.mypackage"
* class="java.lang.String">
* <constructor-arg>
* <value>com.mycompany.myapp.services</value>
* </constructor-arg>
* </bean>
- *
+ *
* </beans>
* </pre>
*
@@ -200,7 +200,7 @@
*
* <pre class="code"><?xml version="1.0" encoding="UTF-8"?>
* <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
- *
+ *
* <beans>
* <bean id="com.mycompany.myapp.util" lazy-init="true"
* class="org.springframework.context.support.ClassPathXmlApplicationContext">
@@ -210,12 +210,12 @@
* </bean>
* </beans>
* </pre>
- *
+ *
* <code>beanRefFactory.xml</code> file inside jar for data-access module:<br>
*
* <pre class="code"><?xml version="1.0" encoding="UTF-8"?>
* <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
- *
+ *
* <beans>
* <!-- child of util -->
* <bean id="com.mycompany.myapp.dataaccess" lazy-init="true"
@@ -229,12 +229,12 @@
* </bean>
* </beans>
* </pre>
- *
+ *
* <code>beanRefFactory.xml</code> file inside jar for services module:
*
* <pre class="code"><?xml version="1.0" encoding="UTF-8"?>
* <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
- *
+ *
* <beans>
* <!-- child of data-access -->
* <bean id="com.mycompany.myapp.services" lazy-init="true"
@@ -248,20 +248,20 @@
* </bean>
* </beans>
* </pre>
- *
+ *
* <code>beanRefFactory.xml</code> file inside jar for mypackage module. This doesn't
* create any of its own contexts, but allows the other ones to be referred to be
* a name known to this module:
*
* <pre class="code"><?xml version="1.0" encoding="UTF-8"?>
* <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
- *
+ *
* <beans>
* <!-- define an alias for "com.mycompany.myapp.services" -->
* <alias name="com.mycompany.myapp.services" alias="com.mycompany.myapp.mypackage"/>
* </beans>
* </pre>
- *
+ *
* @author Colin Sampaleanu
* @author Juergen Hoeller
* @see org.springframework.context.access.ContextSingletonBeanFactoryLocator
@@ -362,7 +362,7 @@ public BeanFactoryReference useBeanFactory(String factoryKey) throws BeansExcept
logger.trace("Factory group with resource name [" + this.resourceLocation +
"] requested. Creating new instance.");
}
-
+
// Create the BeanFactory but don't initialize it.
BeanFactory groupContext = createDefinition(this.resourceLocation, factoryKey);
@@ -446,7 +446,7 @@ protected BeanFactory createDefinition(String resourceLocation, String factoryKe
return factory;
}
-
+
/**
* Instantiate singletons and do any other normal initialization of the factory.
* Subclasses that override {@link #createDefinition createDefinition()} should | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/factory/access/package-info.java | @@ -2,7 +2,7 @@
/**
*
* Helper infrastructure to locate and access bean factories.
- *
+ *
* <p><b>Note: This package is only relevant for special sharing of bean
* factories, for example behind EJB facades. It is <i>not</i> used in a
* typical web application or standalone application.</b> | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.java | @@ -70,10 +70,10 @@
* if available, as a direct alternative to Spring's own <code>@Autowired</code>.
*
* <p>Only one constructor (at max) of any given bean class may carry this
- * annotation with the 'required' parameter set to <code>true</code>,
- * indicating <i>the</i> constructor to autowire when used as a Spring bean.
- * If multiple <i>non-required</i> constructors carry the annotation, they
- * will be considered as candidates for autowiring. The constructor with
+ * annotation with the 'required' parameter set to <code>true</code>,
+ * indicating <i>the</i> constructor to autowire when used as a Spring bean.
+ * If multiple <i>non-required</i> constructors carry the annotation, they
+ * will be considered as candidates for autowiring. The constructor with
* the greatest number of dependencies that can be satisfied by matching
* beans in the Spring container will be chosen. If none of the candidates
* can be satisfied, then a default constructor (if present) will be used.
@@ -109,9 +109,9 @@ public class AutowiredAnnotationBeanPostProcessor extends InstantiationAwareBean
private final Set<Class<? extends Annotation>> autowiredAnnotationTypes =
new LinkedHashSet<Class<? extends Annotation>>();
-
+
private String requiredParameterName = "required";
-
+
private boolean requiredParameterValue = true;
private int order = Ordered.LOWEST_PRECEDENCE - 2;
@@ -185,9 +185,9 @@ public void setRequiredParameterName(String requiredParameterName) {
}
/**
- * Set the boolean value that marks a dependency as required
- * <p>For example if using 'required=true' (the default),
- * this value should be <code>true</code>; but if using
+ * Set the boolean value that marks a dependency as required
+ * <p>For example if using 'required=true' (the default),
+ * this value should be <code>true</code>; but if using
* 'optional=false', this value should be <code>false</code>.
* @see #setRequiredParameterName(String)
*/ | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/factory/annotation/Configurable.java | @@ -25,7 +25,7 @@
/**
* Marks a class as being eligible for Spring-driven configuration.
- *
+ *
* <p>Typically used with the AspectJ <code>AnnotationBeanConfigurerAspect</code>.
*
* @author Rod Johnson
@@ -54,7 +54,7 @@
* Is dependency checking to be performed for configured objects?
*/
boolean dependencyCheck() default false;
-
+
/**
* Are dependencies to be injected prior to the construction of an object?
*/ | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/factory/annotation/Required.java | @@ -24,7 +24,7 @@
/**
* Marks a method (typically a JavaBean setter method) as being 'required': that is,
* the setter method must be configured to be dependency-injected with a value.
- *
+ *
* <p>Please do consult the javadoc for the {@link RequiredAnnotationBeanPostProcessor}
* class (which, by default, checks for the presence of this annotation).
* | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/factory/config/AbstractFactoryBean.java | @@ -45,7 +45,7 @@
* this class will create the object that it creates exactly once
* on initialization and subsequently return said singleton instance
* on all calls to the {@link #getObject()} method.
- *
+ *
* <p>Else, this class will create a new instance every time the
* {@link #getObject()} method is invoked. Subclasses are responsible
* for implementing the abstract {@link #createInstance()} template | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/factory/config/BeanFactoryPostProcessor.java | @@ -1,12 +1,12 @@
/*
* Copyright 2002-2005 the original author or authors.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/factory/config/CommonsLogFactoryBean.java | @@ -1,12 +1,12 @@
/*
* Copyright 2002-2008 the original author or authors.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/factory/config/CustomEditorConfigurer.java | @@ -35,15 +35,15 @@
/**
* {@link BeanFactoryPostProcessor} implementation that allows for convenient
* registration of custom {@link PropertyEditor property editors}.
- *
+ *
* <p>
* In case you want to register {@link PropertyEditor} instances, the
* recommended usage as of Spring 2.0 is to use custom
* {@link PropertyEditorRegistrar} implementations that in turn register any
* desired editor instances on a given
* {@link org.springframework.beans.PropertyEditorRegistry registry}. Each
* PropertyEditorRegistrar can register any number of custom editors.
- *
+ *
* <pre class="code">
* <bean id="customEditorConfigurer" class="org.springframework.beans.factory.config.CustomEditorConfigurer">
* <property name="propertyEditorRegistrars">
@@ -54,12 +54,12 @@
* </property>
* </bean>
* </pre>
- *
+ *
* <p>
* It's perfectly fine to register {@link PropertyEditor} <em>classes</em> via
* the {@code customEditors} property. Spring will create fresh instances of
* them for each editing attempt then:
- *
+ *
* <pre class="code">
* <bean id="customEditorConfigurer" class="org.springframework.beans.factory.config.CustomEditorConfigurer">
* <property name="customEditors">
@@ -70,15 +70,15 @@
* </property>
* </bean>
* </pre>
- *
+ *
* <p>
* Note, that you shouldn't register {@link PropertyEditor} bean instances via
* the {@code customEditors} property as {@link PropertyEditor}s are stateful
* and the instances will then have to be synchronized for every editing
* attempt. In case you need control over the instantiation process of
* {@link PropertyEditor}s, use a {@link PropertyEditorRegistrar} to register
* them.
- *
+ *
* <p>
* Also supports "java.lang.String[]"-style array class names and primitive
* class names (e.g. "boolean"). Delegates to {@link ClassUtils} for actual | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/factory/config/FieldRetrievingFactoryBean.java | @@ -30,7 +30,7 @@
/**
* {@link FactoryBean} which retrieves a static or non-static field value.
- *
+ *
* <p>Typically used for retrieving public static final constants. Usage example:
*
* <pre class="code">// standard definition for exposing a static field, specifying the "staticField" property
@@ -42,10 +42,10 @@
* <bean id="java.sql.Connection.TRANSACTION_SERIALIZABLE"
* class="org.springframework.beans.factory.config.FieldRetrievingFactoryBean"/></pre>
* </pre>
- *
+ *
* <p>If you are using Spring 2.0, you can also use the following style of configuration for
* public static fields.
- *
+ *
* <pre class="code"><util:constant static-field="java.sql.Connection.TRANSACTION_SERIALIZABLE"/></pre>
*
* @author Juergen Hoeller | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/factory/config/MethodInvokingFactoryBean.java | @@ -30,7 +30,7 @@
/**
* {@link FactoryBean} which returns a value which is the result of a static or instance
- * method invocation. For most use cases it is better to just use the container's
+ * method invocation. For most use cases it is better to just use the container's
* built-in factory method support for the same purpose, since that is smarter at
* converting arguments. This factory bean is still useful though when you need to
* call a method which doesn't return any value (for example, a static class method
@@ -55,7 +55,7 @@
*
* <p>This class depends on {@link #afterPropertiesSet()} being called once
* all properties have been set, as per the InitializingBean contract.
- *
+ *
* <p>An example (in an XML based bean factory definition) of a bean definition
* which uses this class to call a static factory method:
*
@@ -82,7 +82,7 @@
* </list>
* </property>
* </bean></pre>
- *
+ *
* @author Colin Sampaleanu
* @author Juergen Hoeller
* @since 21.11.2003 | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/factory/config/PropertyPathFactoryBean.java | @@ -31,7 +31,7 @@
/**
* {@link FactoryBean} that evaluates a property path on a given target object.
- *
+ *
* <p>The target object can be specified directly or via a bean name.
*
* <p>Usage examples:
@@ -64,12 +64,12 @@
*
* <!-- will result in 10, which is the value of property 'age' of bean 'tb' -->
* <bean id="tb.age" class="org.springframework.beans.factory.config.PropertyPathFactoryBean"/></pre>
- *
+ *
* <p>If you are using Spring 2.0 and XML Schema support in your configuration file(s),
* you can also use the following style of configuration for property path access.
* (See also the appendix entitled 'XML Schema-based configuration' in the Spring
* reference manual for more examples.)
- *
+ *
* <pre class="code"> <!-- will result in 10, which is the value of property 'age' of bean 'tb' -->
* <util:property-path id="name" path="testBean.age"/></pre>
* | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/factory/config/RuntimeBeanNameReference.java | @@ -18,7 +18,7 @@
import org.springframework.util.Assert;
-/**
+/**
* Immutable placeholder class used for a property value object when it's a
* reference to another bean name in the factory, to be resolved at runtime.
*
@@ -29,7 +29,7 @@
* @see org.springframework.beans.factory.BeanFactory#getBean
*/
public class RuntimeBeanNameReference implements BeanReference {
-
+
private final String beanName;
private Object source; | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/factory/config/RuntimeBeanReference.java | @@ -18,7 +18,7 @@
import org.springframework.util.Assert;
-/**
+/**
* Immutable placeholder class used for a property value object when it's
* a reference to another bean in the factory, to be resolved at runtime.
*
@@ -28,7 +28,7 @@
* @see org.springframework.beans.factory.BeanFactory#getBean
*/
public class RuntimeBeanReference implements BeanReference {
-
+
private final String beanName;
private final boolean toParent; | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/factory/package-info.java | @@ -6,7 +6,7 @@
* Provides an alternative to the Singleton and Prototype design
* patterns, including a consistent approach to configuration management.
* Builds on the org.springframework.beans package.
- *
+ *
* <p>This package and related packages are discussed in Chapter 11 of
* <a href="http://www.amazon.com/exec/obidos/tg/detail/-/0764543857/">Expert One-On-One J2EE Design and Development</a>
* by Rod Johnson (Wrox, 2002). | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/factory/parsing/FailFastProblemReporter.java | @@ -22,7 +22,7 @@
/**
* Simple {@link ProblemReporter} implementation that exhibits fail-fast
* behavior when errors are encountered.
- *
+ *
* <p>The first error encountered results in a {@link BeanDefinitionParsingException}
* being thrown.
* | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/factory/parsing/PropertyEntry.java | @@ -33,7 +33,7 @@ public class PropertyEntry implements ParseState.Entry {
* Creates a new instance of the {@link PropertyEntry} class.
* @param name the name of the JavaBean property represented by this instance
* @throws IllegalArgumentException if the supplied <code>name</code> is <code>null</code>
- * or consists wholly of whitespace
+ * or consists wholly of whitespace
*/
public PropertyEntry(String name) {
if (!StringUtils.hasText(name)) { | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/factory/parsing/QualifierEntry.java | @@ -20,7 +20,7 @@
/**
* {@link ParseState} entry representing an autowire candidate qualifier.
- *
+ *
* @author Mark Fisher
* @since 2.5
*/ | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractAutowireCapableBeanFactory.java | @@ -346,10 +346,10 @@ public Object autowire(Class beanClass, int autowireMode, boolean dependencyChec
else {
Object bean;
final BeanFactory parent = this;
-
+
if (System.getSecurityManager() != null) {
bean = AccessController.doPrivileged(new PrivilegedAction<Object>() {
-
+
public Object run() {
return getInstantiationStrategy().instantiate(bd, null, parent);
}
@@ -358,7 +358,7 @@ public Object run() {
else {
bean = getInstantiationStrategy().instantiate(bd, null, parent);
}
-
+
populateBean(beanClass.getName(), bd, new BeanWrapperImpl(bean));
return bean;
}
@@ -1346,7 +1346,7 @@ protected void applyPropertyValues(String beanName, BeanDefinition mbd, BeanWrap
MutablePropertyValues mpvs = null;
List<PropertyValue> original;
-
+
if (System.getSecurityManager()!= null) {
if (bw instanceof BeanWrapperImpl) {
((BeanWrapperImpl) bw).setSecurityContext(getAccessControlContext());
@@ -1473,7 +1473,7 @@ public Object run() {
else {
invokeAwareMethods(beanName, bean);
}
-
+
Object wrappedBean = bean;
if (mbd == null || !mbd.isSynthetic()) {
wrappedBean = applyBeanPostProcessorsBeforeInitialization(wrappedBean, beanName);
@@ -1540,7 +1540,7 @@ public Object run() throws Exception {
catch (PrivilegedActionException pae) {
throw pae.getException();
}
- }
+ }
else {
((InitializingBean) bean).afterPropertiesSet();
}
@@ -1585,7 +1585,7 @@ protected void invokeCustomInitMethod(String beanName, final Object bean, RootBe
if (logger.isDebugEnabled()) {
logger.debug("Invoking init method '" + initMethodName + "' on bean with name '" + beanName + "'");
}
-
+
if (System.getSecurityManager() != null) {
AccessController.doPrivileged(new PrivilegedExceptionAction<Object>() {
public Object run() throws Exception {
@@ -1610,7 +1610,7 @@ public Object run() throws Exception {
try {
ReflectionUtils.makeAccessible(initMethod);
initMethod.invoke(bean);
- }
+ }
catch (InvocationTargetException ex) {
throw ex.getTargetException();
} | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/factory/support/BeanDefinitionDefaults.java | @@ -20,7 +20,7 @@
/**
* A simple holder for <code>BeanDefinition</code> property defaults.
- *
+ *
* @author Mark Fisher
* @since 2.5
*/ | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/factory/support/CglibSubclassingInstantiationStrategy.java | @@ -53,7 +53,7 @@ public class CglibSubclassingInstantiationStrategy extends SimpleInstantiationSt
* be overridden to provide method lookup.
*/
private static final int LOOKUP_OVERRIDE = 1;
-
+
/**
* Index in the CGLIB callback array for a method that should
* be overridden using generic Methodreplacer functionality.
@@ -114,16 +114,16 @@ public Object instantiate(Constructor ctor, Object[] args) {
new ReplaceOverrideMethodInterceptor()
});
- return (ctor == null) ?
- enhancer.create() :
+ return (ctor == null) ?
+ enhancer.create() :
enhancer.create(ctor.getParameterTypes(), args);
}
/**
* Class providing hashCode and equals methods required by CGLIB to
* ensure that CGLIB doesn't generate a distinct class per bean.
- * Identity is based on class and bean definition.
+ * Identity is based on class and bean definition.
*/
private class CglibIdentitySupport {
@@ -157,7 +157,7 @@ public Object intercept(Object obj, Method method, Object[] args, MethodProxy mp
// Cast is safe, as CallbackFilter filters are used selectively.
LookupOverride lo = (LookupOverride) beanDefinition.getMethodOverrides().getOverride(method);
return owner.getBean(lo.getBeanName());
- }
+ }
}
@@ -180,7 +180,7 @@ public Object intercept(Object obj, Method method, Object[] args, MethodProxy mp
* CGLIB object to filter method interception behavior.
*/
private class CallbackFilterImpl extends CglibIdentitySupport implements CallbackFilter {
-
+
public int accept(Method method) {
MethodOverride methodOverride = beanDefinition.getMethodOverrides().getOverride(method);
if (logger.isTraceEnabled()) { | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/factory/support/ConstructorResolver.java | @@ -280,7 +280,7 @@ public Object run() {
beanInstance = this.beanFactory.getInstantiationStrategy().instantiate(
mbd, beanName, this.beanFactory, constructorToUse, argsToUse);
}
-
+
bw.setWrappedInstance(beanInstance);
return bw;
}
@@ -412,7 +412,7 @@ public Method[] run() {
rawCandidates = (mbd.isNonPublicAccessAllowed() ?
ReflectionUtils.getAllDeclaredMethods(factoryClazz) : factoryClazz.getMethods());
}
-
+
List<Method> candidateSet = new ArrayList<Method>();
for (Method candidate : rawCandidates) {
if (Modifier.isStatic(candidate.getModifiers()) == isStatic &&
@@ -570,7 +570,7 @@ public Object run() {
beanInstance = beanFactory.getInstantiationStrategy().instantiate(
mbd, beanName, beanFactory, factoryBean, factoryMethodToUse, argsToUse);
}
-
+
if (beanInstance == null) {
return null;
} | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/factory/support/FactoryBeanRegistrySupport.java | @@ -149,7 +149,7 @@ public Object run() throws Exception {
throw new BeanCreationException(beanName, "FactoryBean threw exception on object creation", ex);
}
-
+
// Do not accept a null value for a FactoryBean that's not fully
// initialized yet: Many FactoryBeans just return null then.
if (object == null && isSingletonCurrentlyInCreation(beanName)) {
@@ -206,7 +206,7 @@ protected void removeSingleton(String beanName) {
super.removeSingleton(beanName);
this.factoryBeanObjectCache.remove(beanName);
}
-
+
/**
* Returns the security context for this bean factory. If a security manager
* is set, interaction with the user code will be executed using the privileged | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/factory/support/LookupOverride.java | @@ -31,7 +31,7 @@
* @since 1.1
*/
public class LookupOverride extends MethodOverride {
-
+
private final String beanName;
| true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/factory/support/MethodOverride.java | @@ -34,7 +34,7 @@
* @since 1.1
*/
public abstract class MethodOverride implements BeanMetadataElement {
-
+
private final String methodName;
private boolean overloaded = true; | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/factory/support/MethodOverrides.java | @@ -82,7 +82,7 @@ public Set<MethodOverride> getOverrides() {
public boolean isEmpty() {
return this.overrides.isEmpty();
}
-
+
/**
* Return the override for the given method, if any.
* @param method method to check for overrides for | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/factory/support/MethodReplacer.java | @@ -30,7 +30,7 @@
* @since 1.1
*/
public interface MethodReplacer {
-
+
/**
* Reimplement the given method.
* @param obj the instance we're reimplementing the method for | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/factory/support/PropertiesBeanDefinitionReader.java | @@ -66,7 +66,7 @@
* ceo.$0(ref)=secretary // inject 'secretary' bean as 0th constructor arg
* ceo.$1=1000000 // inject value '1000000' at 1st constructor arg
* </pre>
- *
+ *
* @author Rod Johnson
* @author Juergen Hoeller
* @author Rob Harrop | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/factory/support/ReplaceOverride.java | @@ -76,12 +76,12 @@ public boolean matches(Method method) {
// It can't match.
return false;
}
-
+
if (!isOverloaded()) {
// No overloaded: don't worry about arg type matching.
return true;
}
-
+
// If we get to here, we need to insist on precise argument matching.
if (this.typeIdentifiers.size() != method.getParameterTypes().length) {
return false;
@@ -93,7 +93,7 @@ public boolean matches(Method method) {
return false;
}
}
- return true;
+ return true;
}
| true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/factory/support/SecurityContextProvider.java | @@ -1,12 +1,12 @@
/*
* Copyright 2002-2009 the original author or authors.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/factory/support/SimpleSecurityContextProvider.java | @@ -1,12 +1,12 @@
/*
* Copyright 2002-2009 the original author or authors.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -21,7 +21,7 @@
/**
* Simple {@link SecurityContextProvider} implementation.
- *
+ *
* @author Costin Leau
* @since 3.0
*/ | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/factory/support/package-info.java | @@ -3,7 +3,7 @@
*
* Classes supporting the <code>org.springframework.beans.factory</code> package.
* Contains abstract base classes for <code>BeanFactory</code> implementations.
- *
+ *
*
*/
package org.springframework.beans.factory.support; | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/factory/xml/AbstractBeanDefinitionParser.java | @@ -125,7 +125,7 @@ protected String resolveId(Element element, AbstractBeanDefinition definition, P
* parameter is <code>false</code>, because one typically does not want inner beans
* to be registered as top level beans.
* @param definition the bean definition to be registered
- * @param registry the registry that the bean is to be registered with
+ * @param registry the registry that the bean is to be registered with
* @see BeanDefinitionReaderUtils#registerBeanDefinition(BeanDefinitionHolder, BeanDefinitionRegistry)
*/
protected void registerBeanDefinition(BeanDefinitionHolder definition, BeanDefinitionRegistry registry) { | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/factory/xml/AbstractSimpleBeanDefinitionParser.java | @@ -40,11 +40,11 @@
* class immediately clear. Consider the following class definition:
*
* <pre class="code">public class SimpleCache implements Cache {
- *
+ *
* public void setName(String name) {...}
* public void setTimeout(int timeout) {...}
* public void setEvictionPolicy(EvictionPolicy policy) {...}
- *
+ *
* // remaining class definition elided for clarity...
* }</pre>
*
@@ -62,7 +62,7 @@
* protected Class getBeanClass(Element element) {
* return SimpleCache.class;
* }
- * }</pre>
+ * }</pre>
*
* <p>Please note that the <code>AbstractSimpleBeanDefinitionParser</code>
* is limited to populating the created bean definition with property values.
@@ -121,7 +121,7 @@ public abstract class AbstractSimpleBeanDefinitionParser extends AbstractSingleB
* property.
* @param element the XML element being parsed
* @param builder used to define the <code>BeanDefinition</code>
- * @see #extractPropertyName(String)
+ * @see #extractPropertyName(String)
*/
@Override
protected void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) { | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/factory/xml/BeansDtdResolver.java | @@ -42,7 +42,7 @@
* @see ResourceEntityResolver
*/
public class BeansDtdResolver implements EntityResolver {
-
+
private static final String DTD_EXTENSION = ".dtd";
private static final String[] DTD_NAMES = {"spring-beans-2.0", "spring-beans"}; | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/factory/xml/DefaultBeanDefinitionDocumentReader.java | @@ -223,7 +223,7 @@ protected void importBeanDefinitionResource(Element ele) {
Set<Resource> actualResources = new LinkedHashSet<Resource>(4);
- // Discover whether the location is an absolute or relative URI
+ // Discover whether the location is an absolute or relative URI
boolean absoluteLocation = false;
try {
absoluteLocation = ResourcePatternUtils.isUrl(location) || ResourceUtils.toURI(location).isAbsolute(); | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/factory/xml/NamespaceHandler.java | @@ -50,7 +50,7 @@ public interface NamespaceHandler {
/**
* Invoked by the {@link DefaultBeanDefinitionDocumentReader} after
* construction but before any custom elements are parsed.
- * @see NamespaceHandlerSupport#registerBeanDefinitionParser(String, BeanDefinitionParser)
+ * @see NamespaceHandlerSupport#registerBeanDefinitionParser(String, BeanDefinitionParser)
*/
void init();
@@ -66,7 +66,7 @@ public interface NamespaceHandler {
* <strong>not</strong> be used in a nested scenario.
* @param element the element that is to be parsed into one or more <code>BeanDefinitions</code>
* @param parserContext the object encapsulating the current state of the parsing process
- * @return the primary <code>BeanDefinition</code> (can be <code>null</code> as explained above)
+ * @return the primary <code>BeanDefinition</code> (can be <code>null</code> as explained above)
*/
BeanDefinition parse(Element element, ParserContext parserContext);
| true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/factory/xml/SimpleConstructorNamespaceHandler.java | @@ -1,12 +1,12 @@
/*
* Copyright 2010 the original author or authors.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -33,24 +33,24 @@
* attributes directly through to bean properties. An important point to note is
* that this <code>NamespaceHandler</code> does not have a corresponding schema
* since there is no way to know in advance all possible attribute names.
- *
+ *
* <p>
* An example of the usage of this <code>NamespaceHandler</code> is shown below:
- *
+ *
* <pre class="code">
* <bean id="author" class="..TestBean" c:name="Enescu" c:work-ref="compositions"/>
* </pre>
- *
+ *
* Here the '<code>c:name</code>' corresponds directly to the '<code>name</code>
* ' argument declared on the constructor of class '<code>TestBean</code>'. The
* '<code>c:work-ref</code>' attributes corresponds to the '<code>work</code>'
* argument and, rather than being the concrete value, it contains the name of
* the bean that will be considered as a parameter.
- *
+ *
* <b>Note</b>: This implementation supports only named parameters - there is no
* support for indexes or types. Further more, the names are used as hints by
* the container which, by default, does type introspection.
- *
+ *
* @see SimplePropertyNamespaceHandler
* @author Costin Leau
*/
@@ -90,7 +90,7 @@ public BeanDefinitionHolder decorate(Node node, BeanDefinitionHolder definition,
if (argName.startsWith(DELIMITER_PREFIX)) {
String arg = argName.substring(1).trim();
- // fast default check
+ // fast default check
if (!StringUtils.hasText(arg)) {
cvs.addGenericArgumentValue(valueHolder);
}
@@ -107,13 +107,13 @@ public BeanDefinitionHolder decorate(Node node, BeanDefinitionHolder definition,
parserContext.getReaderContext().error(
"Constructor argument '" + argName + "' specifies a negative index", attr);
}
-
+
if (cvs.hasIndexedArgumentValue(index)){
parserContext.getReaderContext().error(
"Constructor argument '" + argName + "' with index "+ index+" already defined using <constructor-arg>." +
" Only one approach may be used per argument.", attr);
}
-
+
cvs.addIndexedArgumentValue(index, valueHolder);
}
}
@@ -139,7 +139,7 @@ private boolean containsArgWithName(String name, ConstructorArgumentValues cvs)
return true;
}
-
+
private boolean checkName(String name, Collection<ValueHolder> values) {
for (ValueHolder holder : values) {
if (name.equals(holder.getName())) { | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/package-info.java | @@ -3,10 +3,10 @@
*
* This package contains interfaces and classes for manipulating Java beans.
* It is used by most other Spring packages.
- *
+ *
* <p>A BeanWrapper object may be used to set and get bean properties,
* singly or in bulk.
- *
+ *
* <p>The classes in this package are discussed in Chapter 11 of
* <a href="http://www.amazon.com/exec/obidos/tg/detail/-/0764543857/">Expert One-On-One J2EE Design and Development</a>
* by Rod Johnson (Wrox, 2002). | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/propertyeditors/CharacterEditor.java | @@ -28,7 +28,7 @@
* {@link java.beans.PropertyEditor property editor} for <code>char</code>!
* {@link org.springframework.beans.BeanWrapperImpl} will register this
* editor by default.
- *
+ *
* <p>Also supports conversion from a Unicode character sequence; e.g.
* <code>u0041</code> ('A').
* | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/propertyeditors/LocaleEditor.java | @@ -1,12 +1,12 @@
/*
* Copyright 2002-2005 the original author or authors.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/propertyeditors/ResourceBundleEditor.java | @@ -26,32 +26,32 @@
/**
* {@link java.beans.PropertyEditor} implementation for
* {@link java.util.ResourceBundle ResourceBundles}.
- *
+ *
* <p>Only supports conversion <i>from</i> a String, but not
* <i>to</i> a String.
- *
- * Find below some examples of using this class in a
+ *
+ * Find below some examples of using this class in a
* (properly configured) Spring container using XML-based metadata:
- *
+ *
* <pre class="code"> <bean id="errorDialog" class="...">
* <!--
* the 'messages' property is of type java.util.ResourceBundle.
* the 'DialogMessages.properties' file exists at the root of the CLASSPATH
* -->
* <property name="messages" value="DialogMessages"/>
* </bean></pre>
- *
+ *
* <pre class="code"> <bean id="errorDialog" class="...">
* <!--
* the 'DialogMessages.properties' file exists in the 'com/messages' package
* -->
* <property name="messages" value="com/messages/DialogMessages"/>
* </bean></pre>
- *
+ *
* <p>A 'properly configured' Spring {@link org.springframework.context.ApplicationContext container}
* might contain a {@link org.springframework.beans.factory.config.CustomEditorConfigurer}
* definition such that the conversion can be effected transparently:
- *
+ *
* <pre class="code"> <bean class="org.springframework.beans.factory.config.CustomEditorConfigurer">
* <property name="customEditors">
* <map>
@@ -61,10 +61,10 @@
* </map>
* </property>
* </bean></pre>
- *
+ *
* <p>Please note that this {@link java.beans.PropertyEditor} is
* <b>not</b> registered by default with any of the Spring infrastructure.
- *
+ *
* <p>Thanks to David Leal Valmana for the suggestion and initial prototype.
*
* @author Rick Evans | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/propertyeditors/StringArrayPropertyEditor.java | @@ -46,7 +46,7 @@ public class StringArrayPropertyEditor extends PropertyEditorSupport {
private final String charsToDelete;
private final boolean emptyArrayAsNull;
-
+
private final boolean trimValues;
@@ -83,7 +83,7 @@ public StringArrayPropertyEditor(String separator, boolean emptyArrayAsNull) {
* @param separator the separator to use for splitting a {@link String}
* @param emptyArrayAsNull <code>true</code> if an empty String array
* is to be transformed into <code>null</code>
- * @param trimValues <code>true</code> if the values in the parsed arrays
+ * @param trimValues <code>true</code> if the values in the parsed arrays
* are to be be trimmed of whitespace (default is true).
*/
public StringArrayPropertyEditor(String separator, boolean emptyArrayAsNull, boolean trimValues) {
@@ -111,7 +111,7 @@ public StringArrayPropertyEditor(String separator, String charsToDelete, boolean
* e.g. "\r\n\f" will delete all new lines and line feeds in a String.
* @param emptyArrayAsNull <code>true</code> if an empty String array
* is to be transformed into <code>null</code>
- * @param trimValues <code>true</code> if the values in the parsed arrays
+ * @param trimValues <code>true</code> if the values in the parsed arrays
* are to be be trimmed of whitespace (default is true).
*/
public StringArrayPropertyEditor(String separator, String charsToDelete, boolean emptyArrayAsNull, boolean trimValues) { | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/propertyeditors/package-info.java | @@ -3,7 +3,7 @@
*
* Properties editors used to convert from String values to object
* types such as java.util.Properties.
- *
+ *
* <p>Some of these editors are registered automatically by BeanWrapperImpl.
* "CustomXxxEditor" classes are intended for manual registration in
* specific binding processes, as they are localized or the like. | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/support/PropertyComparator.java | @@ -81,7 +81,7 @@ public int compare(Object o1, Object o2) {
}
int result;
-
+
// Put an object with null property at the end of the sort result.
try {
if (v1 != null) { | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/main/java/org/springframework/beans/support/SortDefinition.java | @@ -1,12 +1,12 @@
/*
* Copyright 2002-2005 the original author or authors.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/test/java/com/foo/ComponentBeanDefinitionParserTest.java | @@ -1,12 +1,12 @@
/*
* Copyright 2006-2010 the original author or authors.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/test/java/org/springframework/beans/AbstractPropertyValuesTests.java | @@ -1,12 +1,12 @@
/*
* Copyright 2002-2008 the original author or authors.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -25,7 +25,7 @@
* @author Rod Johnson
* @author Chris Beams
*/
-public abstract class AbstractPropertyValuesTests {
+public abstract class AbstractPropertyValuesTests {
/**
* Must contain: forname=Tony surname=Blair age=50 | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/test/java/org/springframework/beans/BeanUtilsTests.java | @@ -36,7 +36,7 @@
/**
* Unit tests for {@link BeanUtils}.
- *
+ *
* @author Juergen Hoeller
* @author Rob Harrop
* @author Chris Beams | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/test/java/org/springframework/beans/BeanWrapperAutoGrowingTests.java | @@ -71,12 +71,12 @@ public void setPropertyValueAutoGrowArray() {
@Test
public void getPropertyValueAutoGrowArrayBySeveralElements() {
assertNotNull(wrapper.getPropertyValue("array[4]"));
- assertEquals(5, bean.getArray().length);
- assertTrue(bean.getArray()[0] instanceof Bean);
- assertTrue(bean.getArray()[1] instanceof Bean);
- assertTrue(bean.getArray()[2] instanceof Bean);
- assertTrue(bean.getArray()[3] instanceof Bean);
- assertTrue(bean.getArray()[4] instanceof Bean);
+ assertEquals(5, bean.getArray().length);
+ assertTrue(bean.getArray()[0] instanceof Bean);
+ assertTrue(bean.getArray()[1] instanceof Bean);
+ assertTrue(bean.getArray()[2] instanceof Bean);
+ assertTrue(bean.getArray()[3] instanceof Bean);
+ assertTrue(bean.getArray()[4] instanceof Bean);
assertNotNull(wrapper.getPropertyValue("array[0]"));
assertNotNull(wrapper.getPropertyValue("array[1]"));
assertNotNull(wrapper.getPropertyValue("array[2]"));
@@ -94,7 +94,7 @@ public void getPropertyValueAutoGrowMultiDimensionalArray() {
public void getPropertyValueAutoGrowList() {
assertNotNull(wrapper.getPropertyValue("list[0]"));
assertEquals(1, bean.getList().size());
- assertTrue(bean.getList().get(0) instanceof Bean);
+ assertTrue(bean.getList().get(0) instanceof Bean);
}
@Test
@@ -107,11 +107,11 @@ public void setPropertyValueAutoGrowList() {
public void getPropertyValueAutoGrowListBySeveralElements() {
assertNotNull(wrapper.getPropertyValue("list[4]"));
assertEquals(5, bean.getList().size());
- assertTrue(bean.getList().get(0) instanceof Bean);
- assertTrue(bean.getList().get(1) instanceof Bean);
- assertTrue(bean.getList().get(2) instanceof Bean);
- assertTrue(bean.getList().get(3) instanceof Bean);
- assertTrue(bean.getList().get(4) instanceof Bean);
+ assertTrue(bean.getList().get(0) instanceof Bean);
+ assertTrue(bean.getList().get(1) instanceof Bean);
+ assertTrue(bean.getList().get(2) instanceof Bean);
+ assertTrue(bean.getList().get(3) instanceof Bean);
+ assertTrue(bean.getList().get(4) instanceof Bean);
assertNotNull(wrapper.getPropertyValue("list[0]"));
assertNotNull(wrapper.getPropertyValue("list[1]"));
assertNotNull(wrapper.getPropertyValue("list[2]"));
@@ -167,9 +167,9 @@ public static class Bean {
private Bean[] array;
private Bean[][] multiArray;
-
+
private List<Bean> list;
-
+
private List<List<Bean>> multiList;
private List listNotParameterized;
@@ -215,7 +215,7 @@ public List<Bean> getList() {
public void setList(List<Bean> list) {
this.list = list;
}
-
+
public List<List<Bean>> getMultiList() {
return multiList;
} | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/test/java/org/springframework/beans/ConcurrentBeanWrapperTests.java | @@ -1,12 +1,12 @@
/*
* Copyright 2002-2008 the original author or authors.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -50,7 +50,7 @@ public void testSingleThread() {
performSet();
}
}
-
+
@Test
public void testConcurrent() {
for (int i = 0; i < 10; i++) { | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/test/java/org/springframework/beans/MutablePropertyValuesTests.java | @@ -36,7 +36,7 @@ public void testValid() throws Exception {
pvs.addPropertyValue(new PropertyValue("surname", "Blair"));
pvs.addPropertyValue(new PropertyValue("age", "50"));
doTestTony(pvs);
-
+
MutablePropertyValues deepCopy = new MutablePropertyValues(pvs);
doTestTony(deepCopy);
deepCopy.setPropertyValueAt(new PropertyValue("name", "Gordon"), 0); | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/test/java/org/springframework/beans/factory/BeanFactoryUtilsTests.java | @@ -45,12 +45,12 @@
* @since 04.07.2003
*/
public final class BeanFactoryUtilsTests {
-
+
private static final Class<?> CLASS = BeanFactoryUtilsTests.class;
- private static final Resource ROOT_CONTEXT = qualifiedResource(CLASS, "root.xml");
- private static final Resource MIDDLE_CONTEXT = qualifiedResource(CLASS, "middle.xml");
- private static final Resource LEAF_CONTEXT = qualifiedResource(CLASS, "leaf.xml");
- private static final Resource DEPENDENT_BEANS_CONTEXT = qualifiedResource(CLASS, "dependentBeans.xml");
+ private static final Resource ROOT_CONTEXT = qualifiedResource(CLASS, "root.xml");
+ private static final Resource MIDDLE_CONTEXT = qualifiedResource(CLASS, "middle.xml");
+ private static final Resource LEAF_CONTEXT = qualifiedResource(CLASS, "leaf.xml");
+ private static final Resource DEPENDENT_BEANS_CONTEXT = qualifiedResource(CLASS, "dependentBeans.xml");
private ConfigurableListableBeanFactory listableBeanFactory;
| true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/test/java/org/springframework/beans/factory/ConcurrentBeanFactoryTests.java | @@ -48,7 +48,7 @@ public final class ConcurrentBeanFactoryTests {
private static final Log logger = LogFactory.getLog(ConcurrentBeanFactoryTests.class);
private static final Resource CONTEXT = qualifiedResource(ConcurrentBeanFactoryTests.class, "context.xml");
-
+
private static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("yyyy/MM/dd");
private static final Date DATE_1, DATE_2;
| true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/test/java/org/springframework/beans/factory/DefaultListableBeanFactoryTests.java | @@ -2539,38 +2539,38 @@ public String getUserName() {
return this.userName;
}
}
-
+
/**
* Bean that changes state on a business invocation, so that
* we can check whether it's been invoked
* @author Rod Johnson
*/
private static class SideEffectBean {
-
+
private int count;
-
+
public void setCount(int count) {
this.count = count;
}
-
+
public int getCount() {
return this.count;
}
-
+
public void doWork() {
++count;
}
}
-
+
private static class KnowsIfInstantiated {
-
+
private static boolean instantiated;
-
+
public static void clearInstantiationRecord() {
instantiated = false;
}
-
+
public static boolean wasInstantiated() {
return instantiated;
} | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/test/java/org/springframework/beans/factory/FactoryBeanLookupTests.java | @@ -40,31 +40,31 @@ public void setUp() {
beanFactory = new XmlBeanFactory(
new ClassPathResource("FactoryBeanLookupTests-context.xml", this.getClass()));
}
-
+
@Test
public void factoryBeanLookupByNameDereferencing() {
Object fooFactory = beanFactory.getBean("&fooFactory");
assertThat(fooFactory, instanceOf(FooFactoryBean.class));
}
-
+
@Test
public void factoryBeanLookupByType() {
FooFactoryBean fooFactory = beanFactory.getBean(FooFactoryBean.class);
assertNotNull(fooFactory);
}
-
+
@Test
public void factoryBeanLookupByTypeAndNameDereference() {
FooFactoryBean fooFactory = beanFactory.getBean("&fooFactory", FooFactoryBean.class);
assertNotNull(fooFactory);
}
-
+
@Test
public void factoryBeanObjectLookupByName() {
Object fooFactory = beanFactory.getBean("fooFactory");
assertThat(fooFactory, instanceOf(Foo.class));
}
-
+
@Test
public void factoryBeanObjectLookupByNameAndType() {
Foo foo = beanFactory.getBean("fooFactory", Foo.class); | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/test/java/org/springframework/beans/factory/FactoryBeanTests.java | @@ -33,9 +33,9 @@
public final class FactoryBeanTests {
private static final Class<?> CLASS = FactoryBeanTests.class;
- private static final Resource RETURNS_NULL_CONTEXT = qualifiedResource(CLASS, "returnsNull.xml");
- private static final Resource WITH_AUTOWIRING_CONTEXT = qualifiedResource(CLASS, "withAutowiring.xml");
-
+ private static final Resource RETURNS_NULL_CONTEXT = qualifiedResource(CLASS, "returnsNull.xml");
+ private static final Resource WITH_AUTOWIRING_CONTEXT = qualifiedResource(CLASS, "withAutowiring.xml");
+
@Test
public void testFactoryBeanReturnsNull() throws Exception {
XmlBeanFactory factory = new XmlBeanFactory(RETURNS_NULL_CONTEXT);
@@ -46,10 +46,10 @@ public void testFactoryBeanReturnsNull() throws Exception {
@Test
public void testFactoryBeansWithAutowiring() throws Exception {
XmlBeanFactory factory = new XmlBeanFactory(WITH_AUTOWIRING_CONTEXT);
-
+
BeanFactoryPostProcessor ppc = (BeanFactoryPostProcessor) factory.getBean("propertyPlaceholderConfigurer");
ppc.postProcessBeanFactory(factory);
-
+
Alpha alpha = (Alpha) factory.getBean("alpha");
Beta beta = (Beta) factory.getBean("beta");
Gamma gamma = (Gamma) factory.getBean("gamma");
@@ -63,10 +63,10 @@ public void testFactoryBeansWithAutowiring() throws Exception {
@Test
public void testFactoryBeansWithIntermediateFactoryBeanAutowiringFailure() throws Exception {
XmlBeanFactory factory = new XmlBeanFactory(WITH_AUTOWIRING_CONTEXT);
-
+
BeanFactoryPostProcessor ppc = (BeanFactoryPostProcessor) factory.getBean("propertyPlaceholderConfigurer");
ppc.postProcessBeanFactory(factory);
-
+
Beta beta = (Beta) factory.getBean("beta");
Alpha alpha = (Alpha) factory.getBean("alpha");
Gamma gamma = (Gamma) factory.getBean("gamma"); | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/test/java/org/springframework/beans/factory/access/SingletonBeanFactoryLocatorTests.java | @@ -26,7 +26,7 @@
/**
* Unit tests for {@link SingletonBeanFactoryLocator}.
- *
+ *
* @author Colin Sampaleanu
* @author Chris Beams
*/
@@ -38,7 +38,7 @@ public class SingletonBeanFactoryLocatorTests {
public void testBasicFunctionality() {
SingletonBeanFactoryLocator facLoc = new SingletonBeanFactoryLocator(
"classpath*:" + ClassUtils.addResourcePathToPackagePath(CLASS, REF1_XML));
-
+
basicFunctionalityTest(facLoc);
}
@@ -81,7 +81,7 @@ public void testGetInstance() {
BeanFactoryLocator facLoc = SingletonBeanFactoryLocator.getInstance(
ClassUtils.addResourcePathToPackagePath(CLASS, REF1_XML));
getInstanceTest1(facLoc);
-
+
facLoc = SingletonBeanFactoryLocator.getInstance(
"classpath*:/" + ClassUtils.addResourcePathToPackagePath(CLASS, REF1_XML));
getInstanceTest2(facLoc);
@@ -90,7 +90,7 @@ public void testGetInstance() {
facLoc = SingletonBeanFactoryLocator.getInstance(
"classpath:" + ClassUtils.addResourcePathToPackagePath(CLASS, REF1_XML));
getInstanceTest3(facLoc);
-
+
}
/**
@@ -109,12 +109,12 @@ protected void getInstanceTest1(BeanFactoryLocator facLoc) {
fac = bfr3.getFactory();
tb = (TestBean) fac.getBean("beans1.bean1");
assertTrue(tb.getName().equals("was beans1.bean1"));
-
+
BeanFactoryReference bfr4 = facLoc.useBeanFactory("a.qualified.name.which.is.an.alias");
fac = bfr4.getFactory();
tb = (TestBean) fac.getBean("beans1.bean1");
assertTrue(tb.getName().equals("was beans1.bean1"));
-
+
bfr.release();
bfr3.release();
bfr2.release();
@@ -152,7 +152,7 @@ protected void getInstanceTest2(BeanFactoryLocator facLoc) {
bfr4.release();
bfr3.release();
}
-
+
/**
* Worker method so subclass can use it too
*/ | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/test/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessorTests.java | @@ -45,7 +45,7 @@
/**
* Unit tests for {@link AutowiredAnnotationBeanPostProcessor}.
- *
+ *
* @author Juergen Hoeller
* @author Mark Fisher
* @author Sam Brannen | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/test/java/org/springframework/beans/factory/annotation/CustomAutowireConfigurerTests.java | @@ -30,7 +30,7 @@
/**
* Unit tests for {@link CustomAutowireConfigurer}.
- *
+ *
* @author Mark Fisher
* @author Juergen Hoeller
* @author Chris Beams | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/test/java/org/springframework/beans/factory/config/CustomEditorConfigurerTests.java | @@ -39,7 +39,7 @@
/**
* Unit tests for {@link CustomEditorConfigurer}.
- *
+ *
* @author Juergen Hoeller
* @author Chris Beams
* @since 31.07.2004 | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/test/java/org/springframework/beans/factory/config/FieldRetrievingFactoryBeanTests.java | @@ -30,13 +30,13 @@
/**
* Unit tests for {@link FieldRetrievingFactoryBean}.
- *
+ *
* @author Juergen Hoeller
* @author Chris Beams
* @since 31.07.2004
*/
public final class FieldRetrievingFactoryBeanTests {
-
+
private static final Resource CONTEXT =
qualifiedResource(FieldRetrievingFactoryBeanTests.class, "context.xml");
| true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/test/java/org/springframework/beans/factory/config/MethodInvokingFactoryBeanTests.java | @@ -29,7 +29,7 @@
/**
* Unit tests for {@link MethodInvokingFactoryBean}.
- *
+ *
* @author Colin Sampaleanu
* @author Juergen Hoeller
* @author Chris Beams | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/test/java/org/springframework/beans/factory/config/ObjectFactoryCreatingFactoryBeanTests.java | @@ -1,12 +1,12 @@
/*
* Copyright 2002-2010 the original author or authors.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -42,7 +42,7 @@ public class ObjectFactoryCreatingFactoryBeanTests {
private static final Resource CONTEXT =
qualifiedResource(ObjectFactoryCreatingFactoryBeanTests.class, "context.xml");
-
+
private XmlBeanFactory beanFactory;
@Before
@@ -116,7 +116,7 @@ public void testDoesNotComplainWhenTargetBeanNameRefersToSingleton() throws Exce
ObjectFactory<?> objectFactory = (ObjectFactory<?>) factory.getObject();
Object actualSingleton = objectFactory.getObject();
assertSame(expectedSingleton, actualSingleton);
-
+
verify(beanFactory);
}
| true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/test/java/org/springframework/beans/factory/config/PropertiesFactoryBeanTests.java | @@ -26,13 +26,13 @@
/**
* Unit tests for {@link PropertiesFactoryBean}.
- *
+ *
* @author Juergen Hoeller
* @author Chris Beams
* @since 01.11.2003
*/
public final class PropertiesFactoryBeanTests {
-
+
private static final Class<?> CLASS = PropertiesFactoryBeanTests.class;
private static final Resource TEST_PROPS = qualifiedResource(CLASS, "test.properties");
private static final Resource TEST_PROPS_XML = qualifiedResource(CLASS, "test.properties.xml"); | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyPathFactoryBeanTests.java | @@ -28,13 +28,13 @@
/**
* Unit tests for {@link PropertyPathFactoryBean}.
- *
+ *
* @author Juergen Hoeller
* @author Chris Beams
* @since 04.10.2004
*/
public class PropertyPathFactoryBeanTests {
-
+
private static final Resource CONTEXT = qualifiedResource(PropertyPathFactoryBeanTests.class, "context.xml");
@Test | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/test/java/org/springframework/beans/factory/config/ServiceLocatorFactoryBeanTests.java | @@ -32,15 +32,15 @@
/**
* Unit tests for {@link ServiceLocatorFactoryBean}.
- *
+ *
* @author Colin Sampaleanu
* @author Rick Evans
* @author Chris Beams
*/
public final class ServiceLocatorFactoryBeanTests {
private DefaultListableBeanFactory bf;
-
+
@Before
public void setUp() {
bf = new DefaultListableBeanFactory();
@@ -53,7 +53,7 @@ public void testNoArgGetter() {
genericBeanDefinition(ServiceLocatorFactoryBean.class)
.addPropertyValue("serviceLocatorInterface", TestServiceLocator.class)
.getBeanDefinition());
-
+
TestServiceLocator factory = (TestServiceLocator) bf.getBean("factory");
TestService testService = factory.getTestService();
assertNotNull(testService);
@@ -75,13 +75,13 @@ public void testErrorOnTooManyOrTooFew() throws Exception {
genericBeanDefinition(ServiceLocatorFactoryBean.class)
.addPropertyValue("serviceLocatorInterface", TestService2Locator.class)
.getBeanDefinition());
-
+
try {
TestServiceLocator factory = (TestServiceLocator) bf.getBean("factory");
factory.getTestService();
fail("Must fail on more than one matching type");
} catch (NoSuchBeanDefinitionException ex) { /* expected */ }
-
+
try {
TestServiceLocator2 factory = (TestServiceLocator2) bf.getBean("factory2");
factory.getTestService(null);
@@ -114,7 +114,7 @@ public void testErrorOnTooManyOrTooFewWithCustomServiceLocatorException() {
.addPropertyValue("serviceLocatorInterface", TestService2Locator.class)
.addPropertyValue("serviceLocatorExceptionClass", CustomServiceLocatorException3.class)
.getBeanDefinition());
-
+
try {
TestServiceLocator factory = (TestServiceLocator) bf.getBean("factory");
factory.getTestService();
@@ -123,7 +123,7 @@ public void testErrorOnTooManyOrTooFewWithCustomServiceLocatorException() {
catch (CustomServiceLocatorException1 expected) {
assertTrue(expected.getCause() instanceof NoSuchBeanDefinitionException);
}
-
+
try {
TestServiceLocator2 factory2 = (TestServiceLocator2) bf.getBean("factory2");
factory2.getTestService(null);
@@ -132,7 +132,7 @@ public void testErrorOnTooManyOrTooFewWithCustomServiceLocatorException() {
catch (CustomServiceLocatorException2 expected) {
assertTrue(expected.getCause() instanceof NoSuchBeanDefinitionException);
}
-
+
try {
TestService2Locator factory3 = (TestService2Locator) bf.getBean("factory3");
factory3.getTestService();
@@ -150,7 +150,7 @@ public void testStringArgGetter() throws Exception {
// test string-arg getter with null id
TestServiceLocator2 factory = (TestServiceLocator2) bf.getBean("factory");
-
+
@SuppressWarnings("unused")
TestService testBean = factory.getTestService(null);
// now test with explicit id
@@ -166,12 +166,12 @@ public void testStringArgGetter() throws Exception {
public void testCombinedLocatorInterface() {
bf.registerBeanDefinition("testService", genericBeanDefinition(TestService.class).getBeanDefinition());
bf.registerAlias("testService", "1");
-
+
bf.registerBeanDefinition("factory",
genericBeanDefinition(ServiceLocatorFactoryBean.class)
.addPropertyValue("serviceLocatorInterface", TestServiceLocator3.class)
.getBeanDefinition());
-
+
// StaticApplicationContext ctx = new StaticApplicationContext();
// ctx.registerPrototype("testService", TestService.class, new MutablePropertyValues());
// ctx.registerAlias("testService", "1");
@@ -204,7 +204,7 @@ public void testServiceMappings() {
.addPropertyValue("serviceLocatorInterface", TestServiceLocator3.class)
.addPropertyValue("serviceMappings", "=testService1\n1=testService1\n2=testService2")
.getBeanDefinition());
-
+
// StaticApplicationContext ctx = new StaticApplicationContext();
// ctx.registerPrototype("testService1", TestService.class, new MutablePropertyValues());
// ctx.registerPrototype("testService2", ExtendedTestService.class, new MutablePropertyValues()); | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/test/java/org/springframework/beans/factory/config/SimpleScopeTests.java | @@ -39,11 +39,11 @@
* @author Chris Beams
*/
public final class SimpleScopeTests {
-
+
private static final Resource CONTEXT = qualifiedResource(SimpleScopeTests.class, "context.xml");
private DefaultListableBeanFactory beanFactory;
-
+
@Before
public void setUp() {
beanFactory = new DefaultListableBeanFactory();
@@ -71,7 +71,7 @@ public Object get(String name, ObjectFactory<?> objectFactory) {
XmlBeanDefinitionReader xbdr = new XmlBeanDefinitionReader(beanFactory);
xbdr.loadBeanDefinitions(CONTEXT);
}
-
+
@Test
public void testCanGetScopedObject() {
TestBean tb1 = (TestBean) beanFactory.getBean("usesScope"); | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/test/java/org/springframework/beans/factory/config/TestTypes.java | @@ -20,7 +20,7 @@
/**
* Shared test types for this package.
- *
+ *
* @author Chris Beams
*/
final class TestTypes {} | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/test/java/org/springframework/beans/factory/parsing/CustomProblemReporterTests.java | @@ -36,7 +36,7 @@
* @since 2.0
*/
public final class CustomProblemReporterTests {
-
+
private static final Resource CONTEXT = qualifiedResource(CustomProblemReporterTests.class, "context.xml");
private CollatingProblemReporter problemReporter; | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/test/java/org/springframework/beans/factory/parsing/PassThroughSourceExtractorTests.java | @@ -22,7 +22,7 @@
/**
* Unit tests for {@link PassThroughSourceExtractor}.
- *
+ *
* @author Rick Evans
* @author Chris Beams
*/ | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/test/java/org/springframework/beans/factory/support/QualifierAnnotationAutowireBeanFactoryTests.java | @@ -53,9 +53,9 @@ public void testAutowireCandidateDefaultWithIrrelevantDescriptor() throws Except
RootBeanDefinition rbd = new RootBeanDefinition(Person.class, cavs, null);
lbf.registerBeanDefinition(JUERGEN, rbd);
assertTrue(lbf.isAutowireCandidate(JUERGEN, null));
- assertTrue(lbf.isAutowireCandidate(JUERGEN,
+ assertTrue(lbf.isAutowireCandidate(JUERGEN,
new DependencyDescriptor(Person.class.getDeclaredField("name"), false)));
- assertTrue(lbf.isAutowireCandidate(JUERGEN,
+ assertTrue(lbf.isAutowireCandidate(JUERGEN,
new DependencyDescriptor(Person.class.getDeclaredField("name"), true)));
}
@@ -68,16 +68,16 @@ public void testAutowireCandidateExplicitlyFalseWithIrrelevantDescriptor() throw
rbd.setAutowireCandidate(false);
lbf.registerBeanDefinition(JUERGEN, rbd);
assertFalse(lbf.isAutowireCandidate(JUERGEN, null));
- assertFalse(lbf.isAutowireCandidate(JUERGEN,
+ assertFalse(lbf.isAutowireCandidate(JUERGEN,
new DependencyDescriptor(Person.class.getDeclaredField("name"), false)));
- assertFalse(lbf.isAutowireCandidate(JUERGEN,
+ assertFalse(lbf.isAutowireCandidate(JUERGEN,
new DependencyDescriptor(Person.class.getDeclaredField("name"), true)));
}
@Ignore
@Test
public void testAutowireCandidateWithFieldDescriptor() throws Exception {
- DefaultListableBeanFactory lbf = new DefaultListableBeanFactory();
+ DefaultListableBeanFactory lbf = new DefaultListableBeanFactory();
ConstructorArgumentValues cavs1 = new ConstructorArgumentValues();
cavs1.addGenericArgumentValue(JUERGEN);
RootBeanDefinition person1 = new RootBeanDefinition(Person.class, cavs1, null);
@@ -101,7 +101,7 @@ public void testAutowireCandidateWithFieldDescriptor() throws Exception {
@Test
public void testAutowireCandidateExplicitlyFalseWithFieldDescriptor() throws Exception {
- DefaultListableBeanFactory lbf = new DefaultListableBeanFactory();
+ DefaultListableBeanFactory lbf = new DefaultListableBeanFactory();
ConstructorArgumentValues cavs = new ConstructorArgumentValues();
cavs.addGenericArgumentValue(JUERGEN);
RootBeanDefinition person = new RootBeanDefinition(Person.class, cavs, null);
@@ -119,7 +119,7 @@ public void testAutowireCandidateExplicitlyFalseWithFieldDescriptor() throws Exc
@Test
public void testAutowireCandidateWithShortClassName() throws Exception {
- DefaultListableBeanFactory lbf = new DefaultListableBeanFactory();
+ DefaultListableBeanFactory lbf = new DefaultListableBeanFactory();
ConstructorArgumentValues cavs = new ConstructorArgumentValues();
cavs.addGenericArgumentValue(JUERGEN);
RootBeanDefinition person = new RootBeanDefinition(Person.class, cavs, null);
@@ -137,7 +137,7 @@ public void testAutowireCandidateWithShortClassName() throws Exception {
@Ignore
@Test
public void testAutowireCandidateWithConstructorDescriptor() throws Exception {
- DefaultListableBeanFactory lbf = new DefaultListableBeanFactory();
+ DefaultListableBeanFactory lbf = new DefaultListableBeanFactory();
ConstructorArgumentValues cavs1 = new ConstructorArgumentValues();
cavs1.addGenericArgumentValue(JUERGEN);
RootBeanDefinition person1 = new RootBeanDefinition(Person.class, cavs1, null);
@@ -159,7 +159,7 @@ public void testAutowireCandidateWithConstructorDescriptor() throws Exception {
@Ignore
@Test
public void testAutowireCandidateWithMethodDescriptor() throws Exception {
- DefaultListableBeanFactory lbf = new DefaultListableBeanFactory();
+ DefaultListableBeanFactory lbf = new DefaultListableBeanFactory();
ConstructorArgumentValues cavs1 = new ConstructorArgumentValues();
cavs1.addGenericArgumentValue(JUERGEN);
RootBeanDefinition person1 = new RootBeanDefinition(Person.class, cavs1, null);
@@ -189,7 +189,7 @@ public void testAutowireCandidateWithMethodDescriptor() throws Exception {
@Test
public void testAutowireCandidateWithMultipleCandidatesDescriptor() throws Exception {
- DefaultListableBeanFactory lbf = new DefaultListableBeanFactory();
+ DefaultListableBeanFactory lbf = new DefaultListableBeanFactory();
ConstructorArgumentValues cavs1 = new ConstructorArgumentValues();
cavs1.addGenericArgumentValue(JUERGEN);
RootBeanDefinition person1 = new RootBeanDefinition(Person.class, cavs1, null); | true |
Other | spring-projects | spring-framework | 1762157ad1a89ff8778387a2c72a8e36ff341a40.json | Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127 | spring-beans/src/test/java/org/springframework/beans/factory/support/security/CallbacksSecurityTests.java | @@ -1,12 +1,12 @@
/*
* Copyright 2002-2012 the original author or authors.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -63,11 +63,11 @@
/**
* Security test case. Checks whether the container uses its privileges for its
* internal work but does not leak them when touching/calling user code.
- *
+ *
*t The first half of the test case checks that permissions are downgraded when
* calling user code while the second half that the caller code permission get
* through and Spring doesn't override the permission stack.
- *
+ *
* @author Costin Leau
*/
public class CallbacksSecurityTests {
@@ -97,7 +97,7 @@ public void destroy() {
public void setProperty(Object value) {
checkCurrentContext();
}
-
+
public Object getProperty() {
checkCurrentContext();
return null;
@@ -111,7 +111,7 @@ public Object getListProperty() {
checkCurrentContext();
return null;
}
-
+
private void checkCurrentContext() {
assertEquals(expectedName, getCurrentSubjectName());
}
@@ -352,7 +352,7 @@ public void testSpringInitBean() throws Exception {
assertTrue(ex.getCause() instanceof SecurityException);
}
}
-
+
@Test
public void testCustomInitBean() throws Exception {
try { | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.