Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

whitespace

  • Loading branch information...
commit 96df8ccdce2b53304c0f176cef8a7a506278d1ad 1 parent 906dbdb
@burtbeckwith burtbeckwith authored
Showing with 51 additions and 54 deletions.
  1. +1 −1  grails-bootstrap/src/main/groovy/org/codehaus/groovy/grails/resolve/GrailsCoreDependencies.java
  2. +5 −5 grails-bootstrap/src/test/groovy/org/codehaus/groovy/grails/cli/parsing/CommandLineParserSpec.groovy
  3. +1 −1  grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/GrailsClassUtils.java
  4. +3 −3 grails-hibernate/src/main/groovy/grails/orm/PagedResultList.java
  5. +1 −1  ...bernate/src/main/groovy/org/codehaus/groovy/grails/orm/hibernate/metaclass/ListOrderByPersistentMethod.java
  6. +3 −3 ...ls-hibernate/src/main/groovy/org/codehaus/groovy/grails/plugins/orm/hibernate/HibernatePluginSupport.groovy
  7. +4 −5 ...src/test/groovy/org/codehaus/groovy/grails/compiler/web/ControllerActionTransformerCommandObjectSpec.groovy
  8. +3 −3 grails-plugin-gsp/src/main/groovy/org/codehaus/groovy/grails/plugins/web/taglib/JavascriptTagLib.groovy
  9. +1 −1  ...url-mappings/src/test/groovy/org/codehaus/groovy/grails/web/mapping/LinkGeneratorWithUrlMappingsSpec.groovy
  10. +1 −1  grails-plugin-validation/src/main/groovy/grails/validation/DefaultASTValidateableHelper.java
  11. +13 −13 grails-resources/src/grails/home/dsl-support/dsld/grails.dsld
  12. +5 −5 grails-test-suite-base/src/main/groovy/org/codehaus/groovy/grails/web/taglib/AbstractGrailsTagTests.groovy
  13. +2 −2 ...-test-suite-persistence/src/test/groovy/org/codehaus/groovy/grails/orm/hibernate/CreateCriteriaTests.groovy
  14. +1 −3 grails-test-suite-persistence/src/test/groovy/org/codehaus/groovy/grails/orm/hibernate/ListMethodTests.groovy
  15. +2 −2 grails-test-suite-web/src/test/groovy/org/codehaus/groovy/grails/web/pages/GroovyPageRenderingTests.groovy
  16. +3 −3 scripts/Upgrade.groovy
  17. +2 −2 scripts/_GrailsPluginDev.groovy
View
2  ...-bootstrap/src/main/groovy/org/codehaus/groovy/grails/resolve/GrailsCoreDependencies.java
@@ -139,7 +139,7 @@ public Object doCall() {
ModuleRevisionId.newInstance("junit", "junit", junitVersion),
};
registerDependencies(dependencyManager, "build", buildDependencies);
-
+
ModuleRevisionId[] antDependencies = {
ModuleRevisionId.newInstance("org.apache.ant", "ant", antVersion),
ModuleRevisionId.newInstance("org.apache.ant", "ant-launcher", antVersion),
View
10 ...strap/src/test/groovy/org/codehaus/groovy/grails/cli/parsing/CommandLineParserSpec.groovy
@@ -12,18 +12,18 @@ class CommandLineParserSpec extends Specification {
String originalGrailsEnv
@Shared
String originalGrailsEnvDefault
-
+
def setup() {
- // set grails.env=development before each test
+ // set grails.env=development before each test
System.setProperty(Environment.KEY, "development");
}
-
+
def setupSpec() {
// save grails.env and grails.env.default keys before running this spec
originalGrailsEnv = System.getProperty(Environment.KEY)
originalGrailsEnvDefault = System.getProperty(Environment.DEFAULT)
}
-
+
def cleanupSpec() {
// reset grails.env and grails.env.default keys after running this spec
if(originalGrailsEnv != null) {
@@ -37,7 +37,7 @@ class CommandLineParserSpec extends Specification {
System.clearProperty(Environment.DEFAULT)
}
}
-
+
void "Test parse string with command and args"() {
when:
def parser = new CommandLineParser()
View
2  grails-core/src/main/groovy/org/codehaus/groovy/grails/commons/GrailsClassUtils.java
@@ -715,7 +715,7 @@ public static Object getStaticPropertyValue(Class<?> clazz, String name) {
}
return null;
}
-
+
/**
* <p>Looks for a property of the reference instance with a given name.</p>
* <p>If found its value is returned. We follow the Java bean conventions with augmentation for groovy support
View
6 grails-hibernate/src/main/groovy/grails/orm/PagedResultList.java
@@ -44,10 +44,10 @@
protected List list;
protected int totalCount = Integer.MIN_VALUE;
-
+
private final GrailsHibernateTemplate hibernateTemplate;
private final Criteria criteria;
-
+
public PagedResultList(GrailsHibernateTemplate template, Criteria crit) {
this.list = crit.list();
this.criteria = crit;
@@ -165,7 +165,7 @@ public Object doInHibernate(Session session) throws HibernateException, SQLExcep
criteria.setProjection(Projections.rowCount());
return ((Number)criteria.uniqueResult()).intValue();
}
- });
+ });
}
return totalCount;
}
View
2  ...roovy/org/codehaus/groovy/grails/orm/hibernate/metaclass/ListOrderByPersistentMethod.java
@@ -46,7 +46,7 @@
private static final String METHOD_PATTERN = "(listOrderBy)(\\w+)";
private final HibernateDatastore datastore;
-
+
public ListOrderByPersistentMethod(HibernateDatastore datastore, GrailsApplication grailsApplication, SessionFactory sessionFactory, ClassLoader classLoader) {
super(sessionFactory, classLoader, Pattern.compile(METHOD_PATTERN), grailsApplication);
this.datastore = datastore;
View
6 ...ain/groovy/org/codehaus/groovy/grails/plugins/orm/hibernate/HibernatePluginSupport.groovy
@@ -194,7 +194,7 @@ class HibernatePluginSupport {
}
}
}
-
+
def namingStrategy = hibConfig.naming_strategy ?: ImprovedNamingStrategy
try {
GrailsDomainBinder.configureNamingStrategy datasourceName, namingStrategy
@@ -203,7 +203,7 @@ class HibernatePluginSupport {
log.error """WARNING: You've configured a custom Hibernate naming strategy '$namingStrategy' in DataSource.groovy, however the class cannot be found.
Using Grails' default naming strategy: '${ImprovedNamingStrategy.name}'"""
}
-
+
// allow adding hibernate properties that don't start with "hibernate."
if(hibConfig.get('properties') instanceof ConfigObject) {
def hibernateProperties = hibConfig.remove('properties')
@@ -212,7 +212,7 @@ Using Grails' default naming strategy: '${ImprovedNamingStrategy.name}'"""
hibProps.putAll(hibConfig.flatten().toProperties('hibernate'))
- // move net.sf.ehcache.configurationResourceName to "top level" if it exists
+ // move net.sf.ehcache.configurationResourceName to "top level" if it exists
if(hibProps.'hibernate.net.sf.ehcache.configurationResourceName') {
hibProps.'net.sf.ehcache.configurationResourceName' = hibProps.remove('hibernate.net.sf.ehcache.configurationResourceName')
}
View
9 ...g/codehaus/groovy/grails/compiler/web/ControllerActionTransformerCommandObjectSpec.groovy
@@ -119,7 +119,7 @@ class ControllerActionTransformerCommandObjectSpec extends Specification {
}
}
''')
-
+
// Make sure this parent controller is compiled before the subclass. This is relevant to GRAILS-8268
gcl.parseClass('''
abstract class MyAbstractController {
@@ -422,14 +422,14 @@ class ControllerActionTransformerCommandObjectSpec extends Specification {
birthday
expectedDate == birthday
}
-
+
void 'Test overriding closure actions in subclass'() {
given:
def subclassController = subclassControllerClass.newInstance()
-
+
when:
def model = subclassController.index()
-
+
then:
'Subclass Controller' == model.name
}
@@ -438,4 +438,3 @@ class ControllerActionTransformerCommandObjectSpec extends Specification {
RequestContextHolder.setRequestAttributes(null)
}
}
-
View
6 ...gsp/src/main/groovy/org/codehaus/groovy/grails/plugins/web/taglib/JavascriptTagLib.groovy
@@ -52,12 +52,12 @@ class JavascriptTagLib {
}
}
}
-
+
private boolean hasResourcesProcessor() {
grailsApplication.mainContext.containsBean('grailsResourceProcessor')
}
-
-/**
+
+ /**
* Includes a javascript src file, library or inline script
* if the tag has no 'src' or 'library' attributes its assumed to be an inline script:<br/>
*
View
2  ...est/groovy/org/codehaus/groovy/grails/web/mapping/LinkGeneratorWithUrlMappingsSpec.groovy
@@ -6,7 +6,7 @@ import spock.lang.Specification
/**
* More tests for {@link LinkGenerator }. See Also LinkGeneratorSpec.
- *
+ *
* These test focus on testing integration with the URL mappings to ensure they are respected.
*/
class LinkGeneratorWithUrlMappingsSpec extends Specification{
View
2  grails-plugin-validation/src/main/groovy/grails/validation/DefaultASTValidateableHelper.java
@@ -82,7 +82,7 @@ protected void addGetConstraintsMethod(final ClassNode classNode) {
final String applicationContextVariableName = "$ctx";
final String constraintsEvaluatorVariableName = "$evaluator";
final String evaluateMethodName = "evaluate";
-
+
final BlockStatement ifConstraintsPropertyIsNullBlockStatement = new BlockStatement();
final Expression declareServletContextExpression = new DeclarationExpression(new VariableExpression(servletContextHolderVariableName, ClassHelper.OBJECT_TYPE), Token.newSymbol(Types.EQUALS, 0, 0), new StaticMethodCallExpression(new ClassNode(ServletContextHolder.class), "getServletContext", new ArgumentListExpression()));
final Expression declareApplicationContextExpression = new DeclarationExpression(new VariableExpression(applicationContextVariableName, ClassHelper.OBJECT_TYPE), Token.newSymbol(Types.EQUALS, 0, 0), new StaticMethodCallExpression(new ClassNode(WebApplicationContextUtils.class), "getWebApplicationContext", new ArgumentListExpression(new VariableExpression(servletContextHolderVariableName))));
View
26 grails-resources/src/grails/home/dsl-support/dsld/grails.dsld
@@ -122,9 +122,9 @@ def toPropertyName(String typeName) {
}
return typeName[0].toLowerCase(Locale.ENGLISH) + typeName.substring(1);
}
-
- void addSyntheticFieldToWormhole(String name, ClassNode type, Map wormhole) {
- def synth = wormhole["syntheticFields"]
+
+void addSyntheticFieldToWormhole(String name, ClassNode type, Map wormhole) {
+ def synth = wormhole["syntheticFields"]
if (!synth) {
synth = [:]
wormhole["syntheticFields"] = synth
@@ -177,7 +177,7 @@ def toPropertyName(String typeName) {
}
}
-// -----------------------------------------------------
+// -----------------------------------------------------
// GormStaticAPI
// GormInstanceAPI
// GormValidationAPI
@@ -203,7 +203,7 @@ def toPropertyName(String typeName) {
declaringType:"grails.orm.HibernateCriteriaBuilder", isStatic:true
method name:"withCriteria", type:"java.util.List<${currentTypeName}>", params: [query : Closure],
declaringType:"grails.orm.HibernateCriteriaBuilder", isStatic:true
-
+
method name:"findWhere", type:currentType, optionalParams:convertToParams(props), isStatic:true, declaringType:"org.grails.datastore.gorm.GormStaticApi<${currentTypeName}>"
provider = "Where query DSL"
@@ -306,7 +306,7 @@ whereQuery.accept {
if (prop) {
maybe = prop.type
} else {
- // grab synthetic properties (hadOne, belongsTo, and hasMany) from the wormhole
+ // grab synthetic properties (hadOne, belongsTo, and hasMany) from the wormhole
Map<String,ClassNode> synth = wormhole["syntheticFields"]
if (synth) {
maybe = synth[it]
@@ -318,17 +318,17 @@ whereQuery.accept {
property(name:innerProp.name, type:innerProp.type, declaringType: maybe, provider: "Inner query", )
}
}
- }
-}
+ }
+}
// the 'of' method
-currentType("grails.gorm.DetachedCriteria").accept {
+currentType("grails.gorm.DetachedCriteria").accept {
provider = "Where query DSL"
method name:"of", params:[subquery:Closure], declaringType:extractGeneric(currentType), doc:"You can apply additional criteria to any subquery by using the of method and passing in a closure containing the criteria."
}
-// Criteria builder ---
+// Criteria builder ---
currentType("grails.orm.HibernateCriteriaBuilder").accept {
provider = "Criteria builder DSL"
method name : "and", type : "grails.orm.HibernateCriteriaBuilder", params : [components : Closure]
@@ -339,7 +339,7 @@ currentType("grails.orm.HibernateCriteriaBuilder").accept {
}
// namedQueries field
-// not exactly right since HibernateCriteriaBuilder methods should only be available
+// not exactly right since HibernateCriteriaBuilder methods should only be available
// inside of nested closures in the namedQueries field, but this formulation will
// allow methods directly inside of the top-level namedQueries closure.
contribute(enclosingField("namedQueries") & domainClass) {
@@ -409,7 +409,7 @@ contribute(enclosingField("namedQueries") & domainClass) {
params: [template: String, view:String, model:"java.util.Map<java.lang.String,java.lang.Object>", action: String]
method name:"defineBeans", params:[beans:Closure]
-
+
delegatesTo "grails.test.mixin.web.ControllerUnitTestMixin"
} else if (className.endsWith("TagLib")) {
delegatesTo "grails.test.mixin.web.GroovyPageUnitTestMixin"
@@ -422,7 +422,7 @@ contribute(enclosingField("namedQueries") & domainClass) {
delegatesTo "grails.test.mixin.web.ControllerUnitTestMixin"
delegatesTo "grails.test.mixin.web.UrlMappingsUnitTestMixin"
}
-
+
// must explicitly delegate to Assert since the junit classes are not in the type hierarchy until
// after the AST transform is completed.
delegatesTo "junit.framework.Assert"
View
10 ...-base/src/main/groovy/org/codehaus/groovy/grails/web/taglib/AbstractGrailsTagTests.groovy
@@ -170,7 +170,7 @@ abstract class AbstractGrailsTagTests extends GroovyTestCase {
grailsApplication.setApplicationContext(ctx)
ctx.registerMockBean(GrailsApplication.APPLICATION_ID, grailsApplication)
- ctx.registerMockBean("pluginManager", mockManager)
+ ctx.registerMockBean("pluginManager", mockManager)
grailsApplication.addArtefact(ControllerArtefactHandler.TYPE, mockControllerClass)
@@ -181,7 +181,7 @@ abstract class AbstractGrailsTagTests extends GroovyTestCase {
ctx.registerMockBean(GroovyPagesUriService.BEAN_ID, new DefaultGroovyPagesUriService())
onInitMockBeans()
-
+
def dependantPluginClasses = []
dependantPluginClasses << gcl.loadClass("org.codehaus.groovy.grails.plugins.CoreGrailsPlugin")
dependantPluginClasses << gcl.loadClass("org.codehaus.groovy.grails.plugins.CodecsGrailsPlugin")
@@ -221,10 +221,10 @@ abstract class AbstractGrailsTagTests extends GroovyTestCase {
GroovySystem.metaClassRegistry.removeMetaClass(String)
GroovySystem.metaClassRegistry.removeMetaClass(Object)
-
+
// Why are the TagLibClasses removed?
//grailsApplication.tagLibClasses.each { tc -> GroovySystem.metaClassRegistry.removeMetaClass(tc.clazz)}
-
+
mockManager.doDynamicMethods()
request = webRequest.currentRequest
initThemeSource(request, messageSource)
@@ -252,7 +252,7 @@ abstract class AbstractGrailsTagTests extends GroovyTestCase {
protected void onInit() {}
protected void onDestroy() {}
- protected void onInitMockBeans() {}
+ protected void onInitMockBeans() {}
protected MockServletContext createMockServletContext() { new MockServletContext() }
View
4 ...tence/src/test/groovy/org/codehaus/groovy/grails/orm/hibernate/CreateCriteriaTests.groovy
@@ -46,10 +46,10 @@ class CreateCriteriaTests extends AbstractGrailsHibernateTests {
assertTrue 'results should have been a PagedResultList', results instanceof PagedResultList
assertEquals 1, stats.queryExecutionCount
- assertEquals 3, results.size()
+ assertEquals 3, results.size()
assertEquals 8, results.totalCount
assertEquals 2, stats.queryExecutionCount
-
+
// refer to totalCount again and make sure another query was not sent to the database
assertEquals 8, results.totalCount
assertEquals 2, stats.queryExecutionCount
View
4 ...rsistence/src/test/groovy/org/codehaus/groovy/grails/orm/hibernate/ListMethodTests.groovy
@@ -5,8 +5,6 @@ import grails.orm.PagedResultList
/**
* @author Graeme Rocher
* @since 1.0
- *
- * Created: Nov 22, 2007
*/
class ListMethodTests extends AbstractGrailsHibernateTests {
@@ -39,7 +37,7 @@ class ListableBook {
def results = bookClass.list(max: 2, offset: 0)
assertTrue 'results should have been a PagedResultList', results instanceof PagedResultList
assertEquals 1, stats.queryExecutionCount
-
+
assertEquals 2, results.size()
assertEquals 6, results.totalCount
assertEquals 2, stats.queryExecutionCount
View
4 ...-web/src/test/groovy/org/codehaus/groovy/grails/web/pages/GroovyPageRenderingTests.groovy
@@ -55,7 +55,7 @@ class GroovyPageRenderingTests extends AbstractGrailsTagTests {
def result=applyTemplate(template, [mockGrailsApplication: [domainClasses: [[fullName: 'MyClass2', clazz:'we'], [fullName: 'MyClass1', clazz:'we'], [fullName: 'MyClass3', clazz:'no']] ]])
assertEquals '<option value="MyClass1">content.item.name.MyClass1</option><option value="MyClass2">content.item.name.MyClass2</option>', result
}
-
+
void testMultilineAttributeGRAILS8253() {
def template='''<html>
<head>
@@ -85,7 +85,7 @@ is a test action description" class="buttons" onclick="if (testForm.testField.va
</body>
</html>''', result
}
-
+
void testNestedExpression() {
def template='''<g:set var="a" value="hello"/><g:set var="b" value='${[test: "${a} ${a}"]}'/>${b.test}'''
def result = applyTemplate(template, [:])
View
6 scripts/Upgrade.groovy
@@ -193,12 +193,12 @@ move it to the new location of '${basedir}/test/integration'. Please move the di
// Add the app name and Grails version to the metadata.
def newMetadata = ["app.name": "$grailsAppName", "app.grails.version": "$grailsVersion"]
- for(pluginEntry in grailsSettings.defaultPluginMap) {
+ for (pluginEntry in grailsSettings.defaultPluginMap) {
def pluginName = pluginEntry.key
def pluginKey = "plugins.$pluginName".toString()
- if(metadata.containsKey(pluginKey)) {
+ if (metadata.containsKey(pluginKey)) {
newMetadata[pluginKey] = pluginEntry.value
- }
+ }
}
updateMetadata(metadata, newMetadata)
View
4 scripts/_GrailsPluginDev.groovy
@@ -67,14 +67,14 @@ target(packagePlugin: "Implementation target") {
if (plugin?.hasProperty('pluginExcludes')) {
pluginInfo.pluginExcludes = plugin.pluginExcludes
}
-
+
if (argsMap.binary) {
pluginInfo.packaging = "binary"
plugin?.packaging = "binary"
}
else if (argsMap.source) {
pluginInfo.packaging = "source"
- plugin?.packaging = "source"
+ plugin?.packaging = "source"
}
else if (plugin?.hasProperty('packaging')) {
pluginInfo.packaging = plugin.packaging
Please sign in to comment.
Something went wrong with that request. Please try again.