Revision: 5702
          http://sourceforge.net/p/jump-pilot/code/5702
Author:   michaudm
Date:     2018-02-23 07:47:43 +0000 (Fri, 23 Feb 2018)
Log Message:
-----------
Small cleaning (test svn repository access)

Modified Paths:
--------------
    core/trunk/src/org/deegree/datatypes/QualifiedName.java
    core/trunk/src/org/deegree/model/spatialschema/GMLGeometryAdapter.java
    core/trunk/src/org/deegree/model/spatialschema/JTSAdapter.java

Modified: core/trunk/src/org/deegree/datatypes/QualifiedName.java
===================================================================
--- core/trunk/src/org/deegree/datatypes/QualifiedName.java     2018-01-31 
06:01:19 UTC (rev 5701)
+++ core/trunk/src/org/deegree/datatypes/QualifiedName.java     2018-02-23 
07:47:43 UTC (rev 5702)
@@ -44,8 +44,6 @@
 
 import javax.xml.namespace.QName;
 
-import org.deegree.framework.log.ILogger;
-import org.deegree.framework.log.LoggerFactory;
 import org.deegree.framework.util.StringTools;
 
 import com.vividsolutions.jump.workbench.Logger;
@@ -73,18 +71,12 @@
 
     private String s = null;
 
-    private static Map<URI, String> nsp = null;
-    static {
-        if ( nsp == null ) {
-            nsp = Collections.synchronizedMap( new HashMap<URI, String>() );
-        }
-    }
+    private static Map<URI, String> nsp =
+            Collections.synchronizedMap( new HashMap<URI, String>() );
 
 
     /**
      * Creates a new <code>QualifiedName</code> instance from a 
<code>QName</code>
-     *
-     * @param name
      */
     public QualifiedName( QName name ) {
         try {
@@ -154,6 +146,7 @@
 
     /**
      * @param prefix
+     *            prefix to be used for this QualifiedName
      * @param localName
      *            local/simple name (e.g. deegree)
      * @param namespace
@@ -167,7 +160,7 @@
     }
 
     private void buildString() {
-        StringBuffer sb = new StringBuffer( 50 );
+        StringBuilder sb = new StringBuilder( 50 );
         if ( prefix != null && prefix.length() != 0 ) {
             sb.append( prefix ).append( ':' );
         }
@@ -236,10 +229,7 @@
      */
     public boolean isInNamespace( URI ns ) {
         if ( ns == null ) {
-            if ( this.namespace == null ) {
-                return true;
-            }
-            return false;
+            return this.namespace == null;
         }
         return ns.equals( this.namespace );
     }
@@ -246,7 +236,7 @@
 
     @Override
     public String toString() {
-        StringBuffer result = new StringBuffer( 150 );
+        StringBuilder result = new StringBuilder( 150 );
         result.append( this.s );
         if ( this.prefix != null && this.prefix.length() > 0 ) {
             result.append( " (" );

Modified: core/trunk/src/org/deegree/model/spatialschema/GMLGeometryAdapter.java
===================================================================
--- core/trunk/src/org/deegree/model/spatialschema/GMLGeometryAdapter.java      
2018-01-31 06:01:19 UTC (rev 5701)
+++ core/trunk/src/org/deegree/model/spatialschema/GMLGeometryAdapter.java      
2018-02-23 07:47:43 UTC (rev 5702)
@@ -160,7 +160,7 @@
      * </ul>
      * <p>
      * 
-     * @param element
+     * @param element XML element
      * @param srsName default SRS for the geometry
      * @return corresponding <code>Geometry</code> instance
      * @throws GeometryException if type unsupported or conversion failed
@@ -1438,7 +1438,7 @@
      * creates a GML expression of a point geometry
      * 
      * @param point point geometry
-     * @return
+     * @param pw the PrintWriter to print to
      */
     protected static void exportPoint( Point point, PrintWriter pw ) {
 
@@ -1477,7 +1477,7 @@
      * creates a GML expression of a curve geometry
      * 
      * @param o curve geometry
-     * @return
+     * @param pw the PrintWriter to print to
      * @throws GeometryException
      */
     protected static void exportCurve( Curve o, PrintWriter pw ) throws 
GeometryException {
@@ -1524,7 +1524,8 @@
     }
 
     /**
-     * @param sur
+     * @param surface surface to print
+     * @param pw the PrintWriter to print to
      * @throws RemoteException
      * @throws GeometryException
      */
@@ -1550,7 +1551,7 @@
             pw.println("</gml:Polygon>");
         } else {
 
-            String srs = null;
+            String srs;
             if (crs != null) {
                 srs = "<gml:Surface srsName='" + crs + "'>";
             } else {
@@ -1576,8 +1577,9 @@
     }
 
     /**
-     * @param surface
-     * @param pw
+     * Print the surface interior rings
+     * @param surface surface to print
+     * @param pw the PrintWriter to print to
      * @param patch
      */
     protected static void printInteriorRing( Surface surface, PrintWriter pw, 
SurfacePatch patch,
@@ -1608,8 +1610,9 @@
     }
 
     /**
-     * @param surface
-     * @param pw
+     * Print the surface exterior ring
+     * @param surface surface to print
+     * @param pw the PrintWriter to print to
      * @param patch
      */
     protected static void printExteriorRing( Surface surface, PrintWriter pw, 
SurfacePatch patch,
@@ -1642,9 +1645,9 @@
      * TODO using this method for exporting Surfaces will change to output, so 
it must be tested
      * carefully
      * 
-     * @param pw
-     * @param ring
-     * @param coordinateDimension
+     * @param pw the PrintWriter to print to
+     * @param ring the ring to print
+     * @param coordinateDimension coordinate dimension of the segment
      */
     protected static void printRing( PrintWriter pw, Ring ring, int 
coordinateDimension,
             String formatType ) {
@@ -1658,9 +1661,9 @@
     }
 
     /**
-     * @param pw
-     * @param segment
-     * @param coordinateDimension
+     * @param pw the PrintWriter to print to
+     * @param segment the segment to print
+     * @param coordinateDimension coordinate dimension of the segment
      */
     private static void printCurveSegment( PrintWriter pw, CurveSegment 
segment,
             int coordinateDimension, String formatType ) {
@@ -1670,9 +1673,9 @@
     }
 
     /**
-     * @param pw
-     * @param p
-     * @param coordinateDimension
+     * @param pw the PrintWriter to print to
+     * @param p positions to print
+     * @param coordinateDimension coordinate dimension of positions
      */
     private static void printPositions( PrintWriter pw, Position[] p, int 
coordinateDimension,
             String formatType ) {
@@ -1711,8 +1714,6 @@
     }
 
     /**
-     * @param mp
-     * @return
      * @throws RemoteException
      */
     protected static void exportMultiPoint( MultiPoint mp, PrintWriter pw ) {
@@ -1746,8 +1747,6 @@
     }
 
     /**
-     * @param multiCurve
-     * @return
      * @throws RemoteException
      * @throws GeometryException
      */
@@ -1802,8 +1801,6 @@
     }
 
     /**
-     * @param multiSurface
-     * @return
      * @throws RemoteException
      * @throws GeometryException
      */
@@ -1859,7 +1856,7 @@
      * <code>Geometry</code>. Notice that GML Boxes will be converted to 
Surfaces because in ISO
      * 19107 Envelopes are no geometries.
      * 
-     * @param gml
+     * @param gml gml string
      * @return corresponding geometry object
      * @throws GeometryException
      * @throws XMLParsingException
@@ -1891,7 +1888,7 @@
      * </ul>
      * <p>
      * 
-     * @param gml
+     * @param gml gml element
      * @return the corresponding <tt>Geometry</tt>
      * @throws GeometryException if type unsupported or conversion failed
      * @deprecated this method cannot provide default SRS information, please 
use
@@ -1920,10 +1917,10 @@
     }
 
     /**
-     * Corrects the rings if its necessary
+     * Corrects the ring if it is necessary
      * 
-     * @param createPositions
-     * @return
+     * @param ringPositions positions of the ring vertices
+     * @return a valid ring
      */
     private static Position[] correctRing( Position[] ringPositions ) {
 

Modified: core/trunk/src/org/deegree/model/spatialschema/JTSAdapter.java
===================================================================
--- core/trunk/src/org/deegree/model/spatialschema/JTSAdapter.java      
2018-01-31 06:01:19 UTC (rev 5701)
+++ core/trunk/src/org/deegree/model/spatialschema/JTSAdapter.java      
2018-02-23 07:47:43 UTC (rev 5702)
@@ -90,7 +90,7 @@
     public static com.vividsolutions.jts.geom.Geometry export( Geometry 
gmObject )
             throws GeometryException {
 
-        com.vividsolutions.jts.geom.Geometry geometry = null;
+        com.vividsolutions.jts.geom.Geometry geometry;
         if (gmObject instanceof Point) {
             geometry = export((Point) gmObject);
         } else if (gmObject instanceof MultiPoint) {
@@ -134,7 +134,7 @@
     public static Geometry wrap( com.vividsolutions.jts.geom.Geometry 
geometry, CoordinateSystem crs )
             throws GeometryException {
 
-        Geometry gmObject = null;
+        Geometry gmObject;
         if (geometry instanceof com.vividsolutions.jts.geom.Point) {
             gmObject = wrap((com.vividsolutions.jts.geom.Point) geometry, crs);
         } else if (geometry instanceof com.vividsolutions.jts.geom.MultiPoint) 
{


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to