Skip to content

Commit f35f3ce

Browse files
committed
Merge branch '7.0.x' into 7.1.x
2 parents fd1c744 + 6a10193 commit f35f3ce

File tree

132 files changed

+786
-195
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+786
-195
lines changed

dependencies.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ ext {
2525
'ant.version' : '1.10.15',
2626
'asciidoctor-gradle-jvm.version': '4.0.5',
2727
'asciidoctorj.version' : '3.0.0',
28-
'asset-pipeline-gradle.version' : '5.0.20',
28+
'asset-pipeline-gradle.version' : '5.0.21',
2929
'byte-buddy.version' : '1.17.7',
3030
'commons-text.version' : '1.13.1',
3131
'directory-watcher.version' : '0.19.1',
@@ -68,11 +68,11 @@ ext {
6868
]
6969

7070
bomDependencyVersions = [
71-
'asset-pipeline-bom.version' : '5.0.20',
71+
'asset-pipeline-bom.version' : '5.0.21',
7272
'bootstrap-icons.version' : '1.13.1',
73-
'bootstrap.version' : '5.3.7',
73+
'bootstrap.version' : '5.3.8',
7474
'commons-codec.version' : '1.18.0',
75-
'geb-spock.version' : '8.0.0',
75+
'geb-spock.version' : '8.0.1',
7676
'groovy.version' : '4.0.29',
7777
'jackson.version' : '2.19.1',
7878
'jquery.version' : '3.7.1',
@@ -81,7 +81,7 @@ ext {
8181
'rxjava.version' : '1.3.8',
8282
'rxjava2.version' : '2.2.21',
8383
'rxjava3.version' : '3.1.11',
84-
'selenium.version' : '4.34.0',
84+
'selenium.version' : '4.38.0',
8585
'spock.version' : '2.3-groovy-4.0',
8686
'sitemesh.version' : '2.6.0',
8787
'starter-sitemesh.version' : '3.2.2',

grails-cache/build.gradle

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,15 @@
1818
*/
1919

2020
plugins {
21-
id 'groovy'
22-
id 'java-library'
2321
id 'project-report'
22+
id 'org.apache.grails.gradle.grails-plugin'
2423
id 'org.apache.grails.buildsrc.publish'
2524
id 'org.apache.grails.buildsrc.sbom'
2625
}
2726

2827
version = projectVersion
2928
group = 'org.apache.grails'
3029

31-
apply plugin: 'org.apache.grails.gradle.grails-plugin'
32-
3330
ext {
3431
pomTitle = 'Grails Cache Plugin'
3532
pomDescription = 'Provides AST transformations for caching method calls'

grails-converters/src/main/groovy/org/grails/web/converters/marshaller/json/GenericJavaBeanMarshaller.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ public void marshalObject(Object o, JSON json) throws ConverterException {
6161
if (!shouldInclude(includeExcludeSupport, includes, excludes, o, name)) continue;
6262

6363
if (readMethod != null && !(name.equals("metaClass")) && !(name.equals("class"))) {
64+
if (Modifier.isStatic(readMethod.getModifiers())) continue;
6465
if (readMethod.getAnnotation(PersistenceMethod.class) != null) continue;
6566
if (readMethod.getAnnotation(ControllerMethod.class) != null) continue;
6667
Object value = readMethod.invoke(o, (Object[]) null);

grails-converters/src/main/groovy/org/grails/web/converters/marshaller/json/GroovyBeanMarshaller.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ public void marshalObject(Object o, JSON json) throws ConverterException {
6363
if (!shouldInclude(includeExcludeSupport, includes, excludes, o, name)) continue;
6464

6565
if (readMethod != null && !(name.equals("metaClass")) && !(name.equals("class"))) {
66+
if (Modifier.isStatic(readMethod.getModifiers())) continue;
6667
if (readMethod.getAnnotation(PersistenceMethod.class) != null) continue;
6768
if (readMethod.getAnnotation(ControllerMethod.class) != null) continue;
6869
Object value = readMethod.invoke(o, (Object[]) null);

grails-converters/src/main/groovy/org/grails/web/converters/marshaller/xml/GenericJavaBeanMarshaller.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ public void marshalObject(Object o, XML xml) throws ConverterException {
4545
String name = property.getName();
4646
Method readMethod = property.getReadMethod();
4747
if (readMethod != null) {
48+
if (Modifier.isStatic(readMethod.getModifiers())) continue;
4849
Object value = readMethod.invoke(o, (Object[]) null);
4950
xml.startNode(name);
5051
xml.convertAnother(value);

grails-converters/src/main/groovy/org/grails/web/converters/marshaller/xml/GroovyBeanMarshaller.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ public void marshalObject(Object o, XML xml) throws ConverterException {
6363
if (isEntity && (name.equals(GormProperties.ATTACHED) || name.equals(GormProperties.ERRORS))) continue;
6464
Method readMethod = property.getReadMethod();
6565
if (readMethod != null && !(name.equals("metaClass")) && !(name.equals("class"))) {
66+
if (Modifier.isStatic(readMethod.getModifiers())) continue;
6667
if (readMethod.getAnnotation(PersistenceMethod.class) != null) continue;
6768
if (readMethod.getAnnotation(ControllerMethod.class) != null) continue;
6869
Object value = readMethod.invoke(o, (Object[]) null);
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* https://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
package org.grails.web.converters.marshaller.json
20+
21+
import spock.lang.Specification
22+
23+
import org.springframework.context.ApplicationContext
24+
25+
import grails.converters.JSON
26+
import grails.core.DefaultGrailsApplication
27+
import grails.validation.Constrained
28+
import org.grails.datastore.mapping.keyvalue.mapping.config.KeyValueMappingContext
29+
import org.grails.datastore.mapping.model.MappingContext
30+
import org.grails.web.converters.configuration.ConvertersConfigurationInitializer
31+
32+
class StaticPropertySpec extends Specification {
33+
void initJson() {
34+
final initializer = new ConvertersConfigurationInitializer()
35+
def grailsApplication = new DefaultGrailsApplication(MyGroovyBean)
36+
grailsApplication.initialise()
37+
def mappingContext = new KeyValueMappingContext("json")
38+
grailsApplication.setApplicationContext(Stub(ApplicationContext) {
39+
getBean('grailsDomainClassMappingContext', MappingContext) >> {
40+
mappingContext
41+
}
42+
})
43+
grailsApplication.setMappingContext(mappingContext)
44+
initializer.grailsApplication = grailsApplication
45+
initializer.initialize()
46+
47+
}
48+
49+
void "static property should be excluded"() {
50+
given:
51+
initJson()
52+
53+
when:
54+
MyGroovyBean bean = new MyGroovyBean(aProperty: 'testing')
55+
56+
then:
57+
def jsonString = new JSON(bean).toString()
58+
jsonString == '{"aProperty":"testing"}'
59+
}
60+
}
61+
62+
class MyGroovyBean {
63+
static Map<String, Constrained> getConstraintsMap() {
64+
[:]
65+
}
66+
67+
String aProperty
68+
}

grails-data-hibernate5/dbmigration/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
*/
1919

2020
plugins {
21-
id 'java-library'
2221
id 'org.apache.grails.gradle.grails-plugin'
2322
id 'org.apache.grails.buildsrc.publish'
2423
id 'org.apache.grails.buildsrc.sbom'

grails-data-hibernate5/grails-plugin/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
*/
1919

2020
plugins {
21-
id 'java-library'
2221
id 'org.apache.grails.gradle.grails-plugin'
2322
id 'org.apache.grails.buildsrc.publish'
2423
id 'org.apache.grails.buildsrc.sbom'

grails-data-mongodb/grails-plugin/build.gradle

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,15 @@
1818
*/
1919

2020
plugins {
21-
id 'groovy'
22-
id 'java-library'
2321
id 'java-test-fixtures'
22+
id 'org.apache.grails.gradle.grails-plugin'
2423
id 'org.apache.grails.buildsrc.publish'
2524
id 'org.apache.grails.buildsrc.sbom'
2625
}
2726

2827
version = projectVersion
2928
group = 'org.apache.grails'
3029

31-
apply plugin: 'org.apache.grails.gradle.grails-plugin'
32-
3330
ext {
3431
gormApiDocs = true
3532
pomTitle = 'GORM for MongoDB'

0 commit comments

Comments
 (0)