Author: desruisseaux
Date: Fri Nov 25 11:23:28 2016
New Revision: 1771289

URL: http://svn.apache.org/viewvc?rev=1771289&view=rev
Log:
Adjustment of Unicode character used in negative infinity formatting.
Javadoc and comment formatting.

Modified:
    
sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/sql/MetadataSource.java
    
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/geometry/GeneralEnvelope.java
    
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterFormat.java
    
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/Verifier.java
    
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/parameter/ParameterFormatTest.java
    
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/GeodeticObjectVerifier.java
    
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/ConformalProjectionTest.java
    
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/LambertConicConformalTest.java
    
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/MercatorTest.java
    
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/math/Fraction.java
    
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/ConventionalUnit.java
    
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/RangeFormat.java
    
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/SystemUnit.java
    
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/UnitFormat.java
    
sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/measure/RangeFormatTest.java

Modified: 
sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/sql/MetadataSource.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/sql/MetadataSource.java?rev=1771289&r1=1771288&r2=1771289&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/sql/MetadataSource.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/sql/MetadataSource.java
 [UTF-8] Fri Nov 25 11:23:28 2016
@@ -72,16 +72,17 @@ import org.apache.sis.util.iso.Types;
 
 
 /**
- * A connection to a metadata database in read-only mode. The database must 
have a schema of the given name
- * ({@code "metadata"} in the example below). Existing entries can be obtained 
as in the example below:
+ * A connection to a metadata database in read-only mode. It can be either the 
database
+ * {@linkplain #getProvided() provided by Apache SIS} with pre-defined ISO 
19115 metadata,
+ * or another database specified at construction time.
+ * Metadata instances can be obtained as in the example below:
  *
  * {@preformat java
- *   DataSource     source     = ... // This is database-specific.
- *   MetadataSource source     = new 
MetadataSource(MetadataStandard.ISO_19115, source, "metadata");
- *   Telephone      telephone  = source.lookup(Telephone.class, id);
+ *   MetadataSource metadata = MetadataSource.getProvided();
+ *   Format format = source.lookup(Format.class, "PNG");
  * }
  *
- * where {@code id} is the primary key value for the desired record in the 
{@code CI_Telephone} table.
+ * where {@code id} is the primary key value for the desired record in the 
{@code MD_Format} table.
  *
  * <div class="section">Concurrency</div>
  * {@code MetadataSource} is thread-safe but is not concurrent. If concurrency 
is desired,

Modified: 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/geometry/GeneralEnvelope.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/geometry/GeneralEnvelope.java?rev=1771289&r1=1771288&r2=1771289&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/geometry/GeneralEnvelope.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/geometry/GeneralEnvelope.java
 [UTF-8] Fri Nov 25 11:23:28 2016
@@ -576,7 +576,7 @@ public class GeneralEnvelope extends Arr
      * <div class="section">Spanning the anti-meridian of a Geographic 
CRS</div>
      * This method supports envelopes spanning the anti-meridian. If one or 
both envelopes span
      * the anti-meridian, then the result of the {@code add} operation may be 
an envelope expanding
-     * to infinities. In such case, the ordinate range will be either [-∞…∞] 
or [0…-0] depending on
+     * to infinities. In such case, the ordinate range will be either [−∞…∞] 
or [0…−0] depending on
      * whatever the original range span the anti-meridian or not.
      *
      * @param  envelope the {@code Envelope} to add to this envelope.

Modified: 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterFormat.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterFormat.java?rev=1771289&r1=1771288&r2=1771289&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterFormat.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterFormat.java
 [UTF-8] Fri Nov 25 11:23:28 2016
@@ -81,8 +81,8 @@ import static org.apache.sis.util.collec
  *   │ Latitude of natural origin     │ Double │ Mandatory  │  [-80 … 84]°  │  
       0.0°  │
  *   │ Longitude of natural origin    │ Double │ Mandatory  │ [-180 … 180]° │  
       0.0°  │
  *   │ Scale factor at natural origin │ Double │ Mandatory  │    (0 … ∞)    │  
       1.0   │
- *   │ False easting                  │ Double │ Mandatory  │   (-∞ … ∞) m  │  
       0.0 m │
- *   │ False northing                 │ Double │ Mandatory  │   (-∞ … ∞) m  │  
       0.0 m │
+ *   │ False easting                  │ Double │ Mandatory  │   (−∞ … ∞) m  │  
       0.0 m │
+ *   │ False northing                 │ Double │ Mandatory  │   (−∞ … ∞) m  │  
       0.0 m │
  *   
└────────────────────────────────┴────────┴────────────┴───────────────┴───────────────┘
  * }
  * </div>
@@ -161,10 +161,10 @@ public class ParameterFormat extends Tab
          *   ║ EPSG: Scale factor at natural origin │ Double │ Mandatory  │    
(0 … ∞)    │         1.0   ║
          *   ║ OGC:  scale_factor                   │        │            │    
           │               ║
          *   
╟──────────────────────────────────────┼────────┼────────────┼───────────────┼───────────────╢
-         *   ║ EPSG: False easting                  │ Double │ Mandatory  │   
(-∞ … ∞) m  │         0.0 m ║
+         *   ║ EPSG: False easting                  │ Double │ Mandatory  │   
(−∞ … ∞) m  │         0.0 m ║
          *   ║ OGC:  false_easting                  │        │            │    
           │               ║
          *   
╟──────────────────────────────────────┼────────┼────────────┼───────────────┼───────────────╢
-         *   ║ EPSG: False northing                 │ Double │ Mandatory  │   
(-∞ … ∞) m  │         0.0 m ║
+         *   ║ EPSG: False northing                 │ Double │ Mandatory  │   
(−∞ … ∞) m  │         0.0 m ║
          *   ║ OGC:  false_northing                 │        │            │    
           │               ║
          *   
╚══════════════════════════════════════╧════════╧════════════╧═══════════════╧═══════════════╝
          * }
@@ -190,8 +190,8 @@ public class ParameterFormat extends Tab
          *   │ Latitude of natural origin     │ Double │ Mandatory  │  [-80 … 
84]°  │         0.0°  │
          *   │ Longitude of natural origin    │ Double │ Mandatory  │ [-180 … 
180]° │         0.0°  │
          *   │ Scale factor at natural origin │ Double │ Mandatory  │    (0 … 
∞)    │         1.0   │
-         *   │ False easting                  │ Double │ Mandatory  │   (-∞ … 
∞) m  │         0.0 m │
-         *   │ False northing                 │ Double │ Mandatory  │   (-∞ … 
∞) m  │         0.0 m │
+         *   │ False easting                  │ Double │ Mandatory  │   (−∞ … 
∞) m  │         0.0 m │
+         *   │ False northing                 │ Double │ Mandatory  │   (−∞ … 
∞) m  │         0.0 m │
          *   
└────────────────────────────────┴────────┴────────────┴───────────────┴───────────────┘
          * }
          * </div>

Modified: 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/Verifier.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/Verifier.java?rev=1771289&r1=1771288&r2=1771289&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/Verifier.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/Verifier.java
 [UTF-8] Fri Nov 25 11:23:28 2016
@@ -101,10 +101,10 @@ final class Verifier {
      * @param  <T> The type of parameter value. The given {@code value} should 
typically be an instance of this class.
      *             This is not required by this method signature but is 
checked by this method implementation.
      *
-     * @param  descriptor The parameter descriptor to check against.
-     * @param  value      The value to check, or {@code null}.
-     * @param  unit       The unit of the value to check, or {@code null}.
-     * @return The given value converted to the descriptor unit if any,
+     * @param  descriptor  the parameter descriptor to check against.
+     * @param  value       the value to check, or {@code null}.
+     * @param  unit        the unit of the value to check, or {@code null}.
+     * @return the given value converted to the descriptor unit if any,
      *         then casted to the descriptor parameterized type.
      * @throws InvalidParameterValueException if the parameter value is 
invalid.
      */
@@ -232,7 +232,7 @@ final class Verifier {
      * Compares the given value against the given descriptor properties. If 
the value is valid, returns {@code null}.
      * Otherwise returns an object that can be used for formatting the error 
message.
      *
-     * @param convertedValue The value <em>converted to the units specified by 
the descriptor</em>.
+     * @param convertedValue  the value <em>converted to the units specified 
by the descriptor</em>.
      *        This is not necessarily the user-provided value.
      */
     @SuppressWarnings("unchecked")
@@ -279,7 +279,7 @@ final class Verifier {
      * because the type returned by {@link 
ParameterDescriptor#getMinimumValue()} and {@code getMaximumValue()}
      * methods (namely {@code Comparable<T>}) does not allow usage with 
arrays.</div>
      *
-     * @param convertedValue The value <em>converted to the units specified by 
the descriptor</em>.
+     * @param convertedValue  the value <em>converted to the units specified 
by the descriptor</em>.
      *        This is not necessarily the user-provided value.
      */
     @SuppressWarnings("unchecked")
@@ -305,15 +305,15 @@ final class Verifier {
      * Converts the information about an "value out of range" error. The range 
in the error message will be formatted
      * in the unit given by the user, which is not necessarily the same than 
the unit of the parameter descriptor.
      *
-     * @param converter The conversion from user unit to descriptor unit, or 
{@code null} if none. This method
-     *        uses the inverse of that conversion for converting the given 
minimum and maximum values.
+     * @param converter  the conversion from user unit to descriptor unit, or 
{@code null} if none.
+     *        This method uses the inverse of that conversion for converting 
the given minimum and maximum values.
      */
     private void convertRange(UnitConverter converter) {
         if (converter != null && !internal && errorKey == 
Errors.Keys.ValueOutOfRange_4) {
             converter = converter.inverse();
             Object minimumValue = arguments[1];
             Object maximumValue = arguments[2];
-            minimumValue = (minimumValue != null) ? 
converter.convert(((Number) minimumValue).doubleValue()) : "-∞";
+            minimumValue = (minimumValue != null) ? 
converter.convert(((Number) minimumValue).doubleValue()) : "−∞";
             maximumValue = (maximumValue != null) ? 
converter.convert(((Number) maximumValue).doubleValue()) :  "∞";
             arguments[1] = minimumValue;
             arguments[2] = maximumValue;
@@ -340,8 +340,8 @@ final class Verifier {
      * Returns an error message for the error detected by
      * {@link #ensureValidValue(Class, Set, Range, Object)}.
      *
-     * @param name  The parameter name.
-     * @param value The user-supplied value (not necessarily equals to the 
converted value).
+     * @param name   the parameter name.
+     * @param value  the user-supplied value (not necessarily equals to the 
converted value).
      */
     String message(final Map<?,?> properties, String name, Object value) {
         final Object index = arguments[0];

Modified: 
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/parameter/ParameterFormatTest.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/parameter/ParameterFormatTest.java?rev=1771289&r1=1771288&r2=1771289&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/parameter/ParameterFormatTest.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/parameter/ParameterFormatTest.java
 [UTF-8] Fri Nov 25 11:23:28 2016
@@ -130,8 +130,8 @@ public final strictfp class ParameterFor
                 "│ Latitude of natural origin¹    │ Double │ Mandatory  │  
[-80 … 84]°  │        40.0°  │\n" +
                 "│ Longitude of natural origin    │ Double │ Mandatory  │ 
[-180 … 180]° │       -60.0°  │\n" +
                 "│ Scale factor at natural origin │ Double │ Mandatory  │    
(0 … ∞)    │         1.0   │\n" +
-                "│ False easting                  │ Double │ Optional   │   
(-∞ … ∞) m  │      5000.0 m │\n" +
-                "│ False northing                 │ Double │ Optional   │   
(-∞ … ∞) m  │     10000.0 m │\n" +
+                "│ False easting                  │ Double │ Optional   │   
(−∞ … ∞) m  │      5000.0 m │\n" +
+                "│ False northing                 │ Double │ Optional   │   
(−∞ … ∞) m  │     10000.0 m │\n" +
                 
"└────────────────────────────────┴────────┴────────────┴───────────────┴───────────────┘\n"
 +
                 "¹ This parameter is shown for completeness, but should never 
have a value different than 0 for this projection.\n", text);
     }
@@ -162,7 +162,7 @@ public final strictfp class ParameterFor
                 "│ Latitude of natural origin¹    │ Double │  [-80 … 84]°  │  
20.0°   │\n" +
                 "│ Longitude of natural origin    │ Double │ [-180 … 180]° │ 
-60.0°   │\n" +
                 "│ Scale factor at natural origin │ Double │    (0 … ∞)    │ 
0.997    │\n" +
-                "│ False northing                 │ Double │   (-∞ … ∞) m  │  
20.0 km │\n" +
+                "│ False northing                 │ Double │   (−∞ … ∞) m  │  
20.0 km │\n" +
                 
"└────────────────────────────────┴────────┴───────────────┴──────────┘\n" +
                 "¹ This parameter is shown for completeness, but should never 
have a value different than 0 for this projection.\n", text);
     }
@@ -184,7 +184,7 @@ public final strictfp class ParameterFor
                 "│ Latitude of natural origin¹    │ Double │  [-80 … 84]°      
  │    20°   │\n" +
                 "│ Longitude of natural origin    │ Double │ [-180 … 180]°     
  │   -60°   │\n" +
                 "│ Scale factor at natural origin │ Double │    (0 … ∞)        
  │ 0,997    │\n" +
-                "│ False northing                 │ Double │   (-∞ … ∞) m      
  │    20 km │\n" +
+                "│ False northing                 │ Double │   (−∞ … ∞) m      
  │    20 km │\n" +
                 
"└────────────────────────────────┴────────┴─────────────────────┴──────────┘\n"
 +
                 "¹ This parameter is shown for completeness, but should never 
have a value different than 0 for this projection.\n", text);
     }
@@ -217,10 +217,10 @@ public final strictfp class ParameterFor
                 "║ EPSG: Scale factor at natural origin (8805) │ Double │ 
Mandatory  │    (0 … ∞)    │         1.0   ║\n" +
                 "║ OGC:  scale_factor                          │        │      
      │               │               ║\n" +
                 
"╟─────────────────────────────────────────────┼────────┼────────────┼───────────────┼───────────────╢\n"
 +
-                "║ EPSG: False easting (8806)                  │ Double │ 
Optional   │   (-∞ … ∞) m  │      5000.0 m ║\n" +
+                "║ EPSG: False easting (8806)                  │ Double │ 
Optional   │   (−∞ … ∞) m  │      5000.0 m ║\n" +
                 "║ OGC:  false_easting                         │        │      
      │               │               ║\n" +
                 
"╟─────────────────────────────────────────────┼────────┼────────────┼───────────────┼───────────────╢\n"
 +
-                "║ EPSG: False northing (8807)                 │ Double │ 
Optional   │   (-∞ … ∞) m  │     10000.0 m ║\n" +
+                "║ EPSG: False northing (8807)                 │ Double │ 
Optional   │   (−∞ … ∞) m  │     10000.0 m ║\n" +
                 "║ OGC:  false_northing                        │        │      
      │               │               ║\n" +
                 
"╚═════════════════════════════════════════════╧════════╧════════════╧═══════════════╧═══════════════╝\n"
 +
                 "¹ This parameter is shown for completeness, but should never 
have a value different than 0 for this projection.\n", text);
@@ -252,7 +252,7 @@ public final strictfp class ParameterFor
                 "║ EPSG: Scale factor at natural origin (8805) │ Double │ 
Mandatory  │    (0 … ∞)    │ 0.997    ║\n" +
                 "║ OGC:  scale_factor                          │        │      
      │               │          ║\n" +
                 
"╟─────────────────────────────────────────────┼────────┼────────────┼───────────────┼──────────╢\n"
 +
-                "║ EPSG: False northing (8807)                 │ Double │ 
Optional   │   (-∞ … ∞) m  │  20.0 km ║\n" +
+                "║ EPSG: False northing (8807)                 │ Double │ 
Optional   │   (−∞ … ∞) m  │  20.0 km ║\n" +
                 "║ OGC:  false_northing                        │        │      
      │               │          ║\n" +
                 
"╚═════════════════════════════════════════════╧════════╧════════════╧═══════════════╧══════════╝\n"
 +
                 "¹ This parameter is shown for completeness, but should never 
have a value different than 0 for this projection.\n", text);
@@ -326,7 +326,7 @@ public final strictfp class ParameterFor
                 "│ latitude_of_origin¹ │ Double │  [-80 … 84]°  │  20.0°   
│\n" +
                 "│ central_meridian    │ Double │ [-180 … 180]° │ -60.0°   
│\n" +
                 "│ scale_factor        │ Double │    (0 … ∞)    │ 0.997    
│\n" +
-                "│ false_northing      │ Double │   (-∞ … ∞) m  │  20.0 km 
│\n" +
+                "│ false_northing      │ Double │   (−∞ … ∞) m  │  20.0 km 
│\n" +
                 
"└─────────────────────┴────────┴───────────────┴──────────┘\n" +
                 "¹ This parameter is shown for completeness, but should never 
have a value different than 0 for this projection.\n", text);
     }

Modified: 
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/GeodeticObjectVerifier.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/GeodeticObjectVerifier.java?rev=1771289&r1=1771288&r2=1771289&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/GeodeticObjectVerifier.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/GeodeticObjectVerifier.java
 [UTF-8] Fri Nov 25 11:23:28 2016
@@ -293,8 +293,8 @@ public final strictfp class GeodeticObje
      *     <td>{@link Units#METRE}</td>
      *     <td>{@link Units#METRE}</td></tr>
      * <tr><td>Axes range</td>
-     *     <td>[-∞ … ∞]</td>
-     *     <td>[-∞ … ∞]</td></tr>
+     *     <td>[−∞ … ∞]</td>
+     *     <td>[−∞ … ∞]</td></tr>
      * <tr><td>Axes range meaning</td>
      *     <td>{@code null}</td>
      *     <td>{@code null}</td>

Modified: 
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/ConformalProjectionTest.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/ConformalProjectionTest.java?rev=1771289&r1=1771288&r2=1771289&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/ConformalProjectionTest.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/ConformalProjectionTest.java
 [UTF-8] Fri Nov 25 11:23:28 2016
@@ -65,8 +65,8 @@ public final strictfp class ConformalPro
         assertEquals("Inverse 0 m",      0, PI/2 - 2*atan(exp(0)),            
TOLERANCE);
         assertEquals("Forward 90°S",     NEGATIVE_INFINITY, log(tan(0)),      
TOLERANCE);
         assertEquals("Forward (90+ε)°S", NaN,  log(tan(-nextUp(0))),          
TOLERANCE);
-        assertEquals("Inverse -∞",       PI/2, atan(exp(-NEGATIVE_INFINITY)), 
TOLERANCE);
-        assertEquals("Inverse -∞ appr.", PI/2, atan(exp(LN_INFINITY + 1)),    
TOLERANCE);
+        assertEquals("Inverse −∞",       PI/2, atan(exp(-NEGATIVE_INFINITY)), 
TOLERANCE);
+        assertEquals("Inverse −∞ appr.", PI/2, atan(exp(LN_INFINITY + 1)),    
TOLERANCE);
         /*
          * tan(PI/2) do not produces positive infinity as we would expect, 
because there is no
          * exact representation of PI in base 2.  Experiments show that we get 
some high value
@@ -258,8 +258,8 @@ public final strictfp class ConformalPro
         assertEquals("φ( 0)  =  90°",  PI/2,   φ(0),                 
tolerance);
         assertEquals("φ(-ε)  →  90°",  PI/2,   φ(-MIN_VALUE),        
tolerance);
         assertEquals("φ(-1)  = 180°",  PI,     φ(-1),                
tolerance);
-        assertEquals("φ(-∞)  = 270°",  PI*1.5, φ(-MAX_VALUE),        
tolerance);
-        assertEquals("φ(-∞)  = 270°",  PI*1.5, φ(NEGATIVE_INFINITY), 
tolerance);
+        assertEquals("φ(−∞)  = 270°",  PI*1.5, φ(-MAX_VALUE),        
tolerance);
+        assertEquals("φ(−∞)  = 270°",  PI*1.5, φ(NEGATIVE_INFINITY), 
tolerance);
         /*
          * Using t(φ) as a reference.
          */

Modified: 
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/LambertConicConformalTest.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/LambertConicConformalTest.java?rev=1771289&r1=1771288&r2=1771289&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/LambertConicConformalTest.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/LambertConicConformalTest.java
 [UTF-8] Fri Nov 25 11:23:28 2016
@@ -135,7 +135,7 @@ public final strictfp class LambertConic
         assertEquals ("Inverse +1",     0, inverseTransform(+1),   
NORMALIZED_TOLERANCE);
         assertEquals ("Inverse -1",     0, inverseTransform(-1),   
NORMALIZED_TOLERANCE);
         assertEquals ("Inverse +∞", +PI/2, inverseTransform(INF),  
NORMALIZED_TOLERANCE);
-        assertEquals ("Inverse -∞", +PI/2, inverseTransform(-INF), 
NORMALIZED_TOLERANCE);
+        assertEquals ("Inverse −∞", +PI/2, inverseTransform(-INF), 
NORMALIZED_TOLERANCE);
 
         // Like the north case, but with sign inversed.
         createNormalizedProjection(((LambertConicConformal) 
transform).eccentricity != 0, -40);
@@ -154,7 +154,7 @@ public final strictfp class LambertConic
         assertEquals ("Not a number", NaN, inverseTransform(NaN),  
NORMALIZED_TOLERANCE);
         assertEquals ("Inverse 0",  -PI/2, inverseTransform( 0),   
NORMALIZED_TOLERANCE);
         assertEquals ("Inverse +∞", +PI/2, inverseTransform(INF),  
NORMALIZED_TOLERANCE);
-        assertEquals ("Inverse -∞", +PI/2, inverseTransform(-INF), 
NORMALIZED_TOLERANCE);
+        assertEquals ("Inverse −∞", +PI/2, inverseTransform(-INF), 
NORMALIZED_TOLERANCE);
     }
 
     /**

Modified: 
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/MercatorTest.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/MercatorTest.java?rev=1771289&r1=1771288&r2=1771289&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/MercatorTest.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/MercatorTest.java
 [UTF-8] Fri Nov 25 11:23:28 2016
@@ -150,8 +150,8 @@ public final strictfp class MercatorTest
         assertEquals ("Inverse 0 m",      0,     inverseTransform(0),          
        tolerance);
         assertEquals ("Inverse +∞",       +PI/2, 
inverseTransform(POSITIVE_INFINITY),  tolerance);
         assertEquals ("Inverse +∞ appr.", +PI/2, inverseTransform(LN_INFINITY 
+ 1),    tolerance);
-        assertEquals ("Inverse -∞",       -PI/2, 
inverseTransform(NEGATIVE_INFINITY),  tolerance);
-        assertEquals ("Inverse -∞ appr.", -PI/2, 
inverseTransform(-(LN_INFINITY + 1)), tolerance);
+        assertEquals ("Inverse −∞",       -PI/2, 
inverseTransform(NEGATIVE_INFINITY),  tolerance);
+        assertEquals ("Inverse −∞ appr.", -PI/2, 
inverseTransform(-(LN_INFINITY + 1)), tolerance);
     }
 
     /**

Modified: 
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/math/Fraction.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/math/Fraction.java?rev=1771289&r1=1771288&r2=1771289&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/math/Fraction.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/math/Fraction.java
 [UTF-8] Fri Nov 25 11:23:28 2016
@@ -208,7 +208,7 @@ public final class Fraction extends Numb
      * Returns the simplified result of dividing this fraction by the given 
fraction.
      *
      * @param  other  the fraction by which to divide this fraction.
-     * @return the simplified result of {@code this} ÷ {@code other}.
+     * @return the simplified result of {@code this} ∕ {@code other}.
      * @throws ArithmeticException if the result overflows.
      */
     public Fraction divide(final Fraction other) {

Modified: 
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/ConventionalUnit.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/ConventionalUnit.java?rev=1771289&r1=1771288&r2=1771289&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/ConventionalUnit.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/ConventionalUnit.java
 [UTF-8] Fri Nov 25 11:23:28 2016
@@ -391,7 +391,7 @@ final class ConventionalUnit<Q extends Q
      * Returns the quotient of this unit with the one specified.
      *
      * @param  divisor  the unit divisor.
-     * @return {@code this} ÷ {@code divisor}
+     * @return {@code this} ∕ {@code divisor}
      */
     @Override
     public Unit<?> divide(final Unit<?> divisor) {

Modified: 
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/RangeFormat.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/RangeFormat.java?rev=1771289&r1=1771288&r2=1771289&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/RangeFormat.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/RangeFormat.java
 [UTF-8] Fri Nov 25 11:23:28 2016
@@ -589,7 +589,7 @@ public class RangeFormat extends Format
             int startPosition = toAppendTo.length();
             if (value == null) {
                 switch (field) {
-                    case MIN_VALUE_FIELD: toAppendTo.append(minusSign);        
     // Fall through
+                    case MIN_VALUE_FIELD: toAppendTo.append(minusSign != '-' ? 
minusSign : '−');    // Fall through
                     case MAX_VALUE_FIELD: toAppendTo.append(infinity); break;
                 }
             } else {
@@ -770,9 +770,8 @@ public class RangeFormat extends Format
     {
         final int length = source.length();
         /*
-         * Skip leading whitespace and find the first non-blank character.  It 
is usually
-         * an opening bracket, except if minimal and maximal values are the 
same in which
-         * case the brackets may be omitted.
+         * Skip leading whitespace and find the first non-blank character. It 
is usually an opening bracket,
+         * except if minimal and maximal values are the same in which case the 
brackets may be omitted.
          */
         int index, c;
         for (index = pos.getIndex(); ; index += Character.charCount(c)) {
@@ -787,9 +786,8 @@ public class RangeFormat extends Format
         final boolean isMinIncluded, isMaxIncluded;
         if (!isOpen(c)) {
             /*
-             * No bracket, or curly bracket. We have eigher an empty range (as 
in "{}")
-             * or a single value for the range. The braces are optional for 
single value.
-             * In other words, this block parses all of the following cases:
+             * No bracket, or curly bracket. We have eigher an empty range (as 
in "{}") or a single value for the range.
+             * The braces are optional for single value. In other words, this 
block parses all of the following cases:
              *
              *  - {}
              *  - {value}
@@ -838,13 +836,12 @@ public class RangeFormat extends Format
             }
         } else {
             /*
-             * We found an opening bracket. Skip the whitespaces. If the next
-             * character is a closing bracket, then we have an empty range.
-             * The later case is an extension to the standard format, since
-             * empty ranges are usually represented by {} instead than [].
+             * We found an opening bracket. Skip the whitespaces. If the next 
character is a closing bracket,
+             * then we have an empty range. The later case is an extension to 
the standard format since empty
+             * ranges are usually represented by {} instead than [].
              */
             isMinIncluded = (c == openInclusive);
-            do { // Skip whitespaces.
+            do {                                            // Skip 
whitespaces.
                 index += Character.charCount(c);
                 if (index >= length) {
                     pos.setErrorIndex(length);
@@ -859,16 +856,16 @@ public class RangeFormat extends Format
                 index += Character.charCount(c);
             } else {
                 /*
-                 * At this point, we have determined that the range is 
non-empty and there
-                 * is at least one value to parse. First, parse the minimal 
value. If we
-                 * fail to parse, check if it was the infinity value (note 
that infinity
-                 * should have been parsed successfully if the format is 
DecimalFormat).
+                 * At this point, we have determined that the range is 
non-empty and there is at least one value to parse.
+                 * First, parse the minimal value. If we fail to parse, check 
if it was the infinity value. Note that "-∞"
+                 * and "∞" should have been parsed successfully if the format 
is DecimalFormat, but not necessarily "−∞".
+                 * The difference is in the character used for the minus sign 
(ASCII hyphen versus Unicode minus sign).
                  */
                 pos.setIndex(index);
                 int savedIndex = index;
                 Object value = elementFormat.parseObject(source, pos);
                 if (value == null) {
-                    if (c == minusSign) {
+                    if (c == minusSign || c == '−') {
                         index += Character.charCount(c);
                     }
                     if (!source.regionMatches(index, infinity, 0, 
infinity.length())) {
@@ -879,11 +876,10 @@ public class RangeFormat extends Format
                 pos.setErrorIndex(savedIndex);              // In case of 
failure during the conversion.
                 minValue = convert(value);
                 /*
-                 * Parsing of minimal value succeed and its type is valid. Now 
look for the
-                 * separator. If it is not present, then assume that we have a 
single value
-                 * for the range. The default RangeFormat implementation does 
not format
-                 * brackets in such case (see the "No bracket" case above), 
but we make the
-                 * parser tolerant to the case where the brackets are present.
+                 * Parsing of 'minValue' succeed and its type is valid. Now 
look for the separator. If it is not present,
+                 * then assume that we have a single value for the range. The 
default RangeFormat implementation does not
+                 * format brackets in such case (see the "No bracket" case 
above), but we make the parser tolerant to the
+                 * case where the brackets are present.
                  */
                 for (index = pos.getIndex(); ; index += 
Character.charCount(c)) {
                     if (index >= length) {
@@ -904,6 +900,10 @@ public class RangeFormat extends Format
                         c = source.codePointAt(index);
                         if (!Character.isWhitespace(c)) break;
                     }
+                    /*
+                     * Now parse the maximum value. A special case is applied 
for infinity value
+                     * in a similar way than we did for the minimal value.
+                     */
                     pos.setIndex(index);
                     value = elementFormat.parseObject(source, pos);
                     if (value == null) {
@@ -915,9 +915,8 @@ public class RangeFormat extends Format
                     pos.setErrorIndex(index);               // In case of 
failure during the conversion.
                     maxValue = convert(value);
                     /*
-                     * Skip one last time the whitespaces. The check for the 
closing bracket
-                     * (which is mandatory) is performed outside the "if" 
block since it is
-                     * common to the two "if ... else" cases.
+                     * Skip one last time the whitespaces. The check for the 
closing bracket (which is mandatory)
+                     * is performed outside the "if" block since it is common 
to the two "if ... else" cases.
                      */
                     for (index = pos.getIndex(); ; index += 
Character.charCount(c)) {
                         if (index >= length) {
@@ -972,8 +971,8 @@ public class RangeFormat extends Format
                 min  = Numbers.cast(min, type);
                 max  = Numbers.cast(max, type);
             }
-            if (min.doubleValue() == Double.NEGATIVE_INFINITY) min = null;
-            if (max.doubleValue() == Double.POSITIVE_INFINITY) max = null;
+            if (min != null && min.doubleValue() == Double.NEGATIVE_INFINITY) 
min = null;
+            if (max != null && max.doubleValue() == Double.POSITIVE_INFINITY) 
max = null;
             if (unit != null) {
                 final MeasurementRange<?> range = new MeasurementRange(type, 
min, isMinIncluded, max, isMaxIncluded, unit);
                 return range;

Modified: 
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/SystemUnit.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/SystemUnit.java?rev=1771289&r1=1771288&r2=1771289&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/SystemUnit.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/SystemUnit.java
 [UTF-8] Fri Nov 25 11:23:28 2016
@@ -398,7 +398,7 @@ final class SystemUnit<Q extends Quantit
      * Returns the quotient of this unit with the one specified.
      *
      * @param  divisor  the unit divisor.
-     * @return {@code this} ÷ {@code divisor}
+     * @return {@code this} ∕ {@code divisor}
      */
     @Override
     public Unit<?> divide(final Unit<?> divisor) {

Modified: 
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/UnitFormat.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/UnitFormat.java?rev=1771289&r1=1771288&r2=1771289&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/UnitFormat.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/UnitFormat.java
 [UTF-8] Fri Nov 25 11:23:28 2016
@@ -857,6 +857,7 @@ public class UnitFormat extends Format i
                 case '⋅': // Fallthrough
                 case '×': next = MULTIPLY; break;
                 case '÷':
+                case '⁄': // Fraction slash
                 case '/':
                 case '∕': next = DIVIDE; break;
                 default:  continue;

Modified: 
sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/measure/RangeFormatTest.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/measure/RangeFormatTest.java?rev=1771289&r1=1771288&r2=1771289&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/measure/RangeFormatTest.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/measure/RangeFormatTest.java
 [UTF-8] Fri Nov 25 11:23:28 2016
@@ -144,7 +144,7 @@ public final strictfp class RangeFormatT
         assertEquals("maxPos.endIndex",   1, maxPos.getEndIndex());
 
         // Negative infinity
-        assertEquals("(-∞ … 30]", 
format(NumberRange.create(Double.NEGATIVE_INFINITY, true, 30, true)));
+        assertEquals("(−∞ … 30]", 
format(NumberRange.create(Double.NEGATIVE_INFINITY, true, 30, true)));
         assertEquals("minPos.beginIndex", 1, minPos.getBeginIndex());
         assertEquals("minPos.endIndex",   3, minPos.getEndIndex());
         assertEquals("maxPos.beginIndex", 6, maxPos.getBeginIndex());
@@ -158,7 +158,7 @@ public final strictfp class RangeFormatT
         assertEquals("maxPos.endIndex",   7, maxPos.getEndIndex());
 
         // Positive infinities
-        assertEquals("(-∞ … ∞)", 
format(NumberRange.create(Double.NEGATIVE_INFINITY, true, 
Double.POSITIVE_INFINITY, true)));
+        assertEquals("(−∞ … ∞)", 
format(NumberRange.create(Double.NEGATIVE_INFINITY, true, 
Double.POSITIVE_INFINITY, true)));
         assertEquals("minPos.beginIndex", 1, minPos.getBeginIndex());
         assertEquals("minPos.endIndex",   3, minPos.getEndIndex());
         assertEquals("maxPos.beginIndex", 6, maxPos.getBeginIndex());
@@ -172,7 +172,7 @@ public final strictfp class RangeFormatT
         assertEquals("maxPos.endIndex",   7, maxPos.getEndIndex());
 
         // Negative infinity with integers
-        assertEquals("(-∞ … 40]", format(new NumberRange<>(Integer.class, 
null, true, 40, true)));
+        assertEquals("(−∞ … 40]", format(new NumberRange<>(Integer.class, 
null, true, 40, true)));
         assertEquals("minPos.beginIndex", 1, minPos.getBeginIndex());
         assertEquals("minPos.endIndex",   3, minPos.getEndIndex());
         assertEquals("maxPos.beginIndex", 6, maxPos.getBeginIndex());
@@ -247,6 +247,7 @@ public final strictfp class RangeFormatT
 
         assertEquals(NumberRange.create(-10.0, true,             20.0, true), 
parse("[-10 … 20]" ));
         assertEquals(NumberRange.create(NEGATIVE_INFINITY, true, 30.0, true), 
parse("[-∞ … 30]"));
+        assertEquals(NumberRange.create(NEGATIVE_INFINITY, true, 30.0, true), 
parse("[−∞ … 30]"));
         assertEquals(NumberRange.create(50.0, true, POSITIVE_INFINITY, true), 
parse("[50 … ∞]"));
     }
 
@@ -334,7 +335,7 @@ public final strictfp class RangeFormatT
         it    = format.formatToCharacterIterator(range);
         text  = it.toString();
         findYears(it, RangeFormat.Field.MAX_VALUE, maxPos);
-        assertEquals("(-∞ … 01/01/90 00:00]", text);
+        assertEquals("(−∞ … 01/01/90 00:00]", text);
         assertEquals(12, maxPos.getBeginIndex());
         assertEquals(14, maxPos.getEndIndex());
         assertEquals(range, parse(text));



Reply via email to