Skip to content

Commit

Permalink
Upgrade Groovy to 3.0.12
Browse files Browse the repository at this point in the history
  • Loading branch information
rainboyan committed Oct 14, 2022
1 parent cfe0196 commit 11b8ee6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ javaParserCoreVersion=3.15.14
junitJupiterVersion=5.8.2
junitJupiterPlatformVersion=1.8.2
javassistVersion=3.28.0-GA
groovyVersion=3.0.11
groovyVersion=3.0.12

org.gradle.caching=true
org.gradle.parallel=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class RxQueryUtils {
if (!toOne.isEmbedded()) {
if (!toOne.isForeignKeyInChild()) {
joinedProperties.add(propertyName)
observables.add datastoreClient.get(toOne.associatedEntity.javaClass, ((ObservableProxy) currentValue).getProxyKey(), queryState)
observables.add datastoreClient.get((Class<Observable>) toOne.associatedEntity.javaClass, ((ObservableProxy) currentValue).getProxyKey(), queryState)
}
else {
joinedProperties.add(propertyName)
Expand Down Expand Up @@ -97,7 +97,7 @@ class RxQueryUtils {
observables.add(rxQuery.findAll().toList())
}
else {
observables.add(Observable.just([]))
observables.add(Observable.just(Collections.<Observable>emptyList()))
}
}
}
Expand All @@ -112,8 +112,9 @@ class RxQueryUtils {
return Arrays.asList(args)
}
})
}.map { List<Object> result ->
}.map {
// first result is the entity
List<Object> result = it as List<Object>
def entityInstance = result.get(0)
if (result.size() > 1) {
int i = 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,8 @@ class GormEnhancer implements Closeable {
* @return The named query or null if it doesn't exist
*/
static GormQueryOperations createNamedQuery(Class entity, String queryName, Object... args) {
def className = entity.getName()
def namedQueries = NAMED_QUERIES.get(className)
String className = entity.getName()
Map<String, Closure> namedQueries = NAMED_QUERIES.get(className)
if (namedQueries == null) {
synchronized (NAMED_QUERIES) {
namedQueries = NAMED_QUERIES.get(className)
Expand All @@ -240,7 +240,7 @@ class GormEnhancer implements Closeable {
NAMED_QUERIES.put(className, namedQueries)
}
else {
NAMED_QUERIES.put(className, Collections.emptyMap())
NAMED_QUERIES.put(className, Collections.<String, Closure>emptyMap())
return null
}
}
Expand Down

0 comments on commit 11b8ee6

Please sign in to comment.