In the root pom.xml:
Remove the @CompileStatic annotation from all Groovy implementations, e.g. change from:
import groovy.transform.CompileStatic
...
@CompileStatic
class MySchedTaskJobDelegate implements SchedTaskJobDelegate {
...
} |
to:
...
class MySchedTaskJobDelegate implements SchedTaskJobDelegate {
...
} |
Fix any Groovy script used for scripted REST or SQL connector following these best practices:
Change any multiple assignment like:
def (one, two) = compositeId.tokenize('_') |
into:
def tokenizedId = compositeId.tokenize('_')
def one = tokenizedId[0]
def two = tokenizedId[1] |
Move SQL queries like:
sql.eachRow("""SELECT * FROM mytable """
+ (where == null || where.isEmpty() ? '' : " WHERE " + where) + " ORDER BY codfis ASC LIMIT " + pageSize + " OFFSET " + offset,
{
result.add([
__UID__ : it.myid,
uid : it.myid
... |
into:
sql.eachRow("""SELECT * FROM mytable """
+ (where == null || where.isEmpty() ? '' : " WHERE " + where) + " ORDER BY codfis ASC LIMIT " + pageSize + " OFFSET " + offset,
{row ->
result.add([
__UID__ : row['myid'],
uid : row['myid'], |
Date formatting should ever be done using a date formatter like:
STD_SDF = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
STD_SDF.format(mydate) |