You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sis.apache.org by Martin Desruisseaux <ma...@geomatys.fr> on 2015/01/14 16:33:19 UTC

Merge to trunk and aftermath

Hello all

Work of the last 6 weeks have been merged to trunk. Artefacts have been
deployed to Maven snapshot repository [1] and javadoc updated [2]. Since
this would would serve as the basis for a release candidate soon
(tentatively next week), tests and feedbacks are welcome.

Merges worked reasonably well. But there is 2 formatting details in the
Shapefile module that would help to make merges easier:

 1. Avoid star imports (e.g. "import java.util.*"), unless we import
    almost all the package content.
 2. Always put { } after "if", "else", "case", etc. statements, unless
    the following statement is one the same line (e.g. "else if").

The two above items are standard recommendations in Java books and
formatting conventions. Star imports sometime prevent the code to
compile on different versions of a JDK or library, and missing { } is an
easily avoidable source of bugs when a code is edited (when someone adds
a line inside a "if" block and didn't noticed the absence of brackets).

In the particular case of Apache SIS, those two recommendations would
also make the merges easier. For example when merging to the JDK6
branch, I search all occurrences of "import java.util.Objects" and
replace them by "import org.apache.sis.internal.jdk7.Objects". But such
search-and-replace does not work with star imports. Curly brackets { }
for every cases in switch statements would also make easier the
replacement of switch-on-strings by sequences of "if (string.equals(...))".


    Martin


[1] https://repository.apache.org/content/repositories/snapshots/
[2] https://builds.apache.org/job/sis-trunk/javadoc/