You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Source changes

POM

In the root pom.xml:

  • change parent/version from 3.0.13 to 3.0.14
  • change properties/syncope.version from 3.013 to 3.0.14

Code

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)
  • No labels