DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
...
Remove the @CompileStatic annotation from all Groovy implementations, e.g. change from:
| Code Block | ||
|---|---|---|
| ||
import groovy.transform.CompileStatic
...
@CompileStatic
class MySchedTaskJobDelegate implements SchedTaskJobDelegate {
...
} |
...
| Code Block | ||
|---|---|---|
| ||
...
class MySchedTaskJobDelegate implements SchedTaskJobDelegate {
...
} |
Fix any Groovy script used for scripted REST or SQL connector following these best practices:
Change any multiple assignment like:
Code Block language groovy def (one, two) = compositeId.tokenize('_')into:
Code Block language groovy def tokenizedId = compositeId.tokenize('_') def one = tokenizedId[0] def two = tokenizedId[1]Move SQL queries like:
Code Block language groovy 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:
Code Block language groovy 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:
Code Block language groovy STD_SDF = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); STD_SDF.format(mydate)