sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1723780 [11/12] - in /sis/branches/JDK7: ./ application/sis-console/src/main/artifact/bin/ application/sis-console/src/main/artifact/log/ application/sis-console/src/main/java/org/apache/sis/console/ core/sis-build-helper/src/main/java/org...
Date Fri, 08 Jan 2016 18:29:07 GMT
Modified: sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/util/CharSequencesTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/util/CharSequencesTest.java?rev=1723780&r1=1723779&r2=1723780&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/util/CharSequencesTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/util/CharSequencesTest.java [UTF-8] Fri Jan  8 18:29:04 2016
@@ -34,7 +34,7 @@ import static org.apache.sis.util.CharSe
  * @author  Martin Desruisseaux (Geomatys)
  * @author  Johann Sorel (Geomatys)
  * @since   0.3
- * @version 0.6
+ * @version 0.7
  * @module
  */
 @DependsOn({
@@ -315,6 +315,7 @@ public final strictfp class CharSequence
         assertEquals("OGC", camelCaseToAcronym("OGC").toString());
         assertEquals("OGC", camelCaseToAcronym("Open Geospatial Consortium").toString());
         assertEquals("E",   camelCaseToAcronym("East").toString());
+        assertEquals("E",   camelCaseToAcronym("east").toString());
         assertEquals("NE",  camelCaseToAcronym("North-East").toString());
         assertEquals("NE",  camelCaseToAcronym("NORTH_EAST").toString());
         assertEquals("NE",  camelCaseToAcronym("northEast").toString());
@@ -348,7 +349,7 @@ public final strictfp class CharSequence
         assertFalse(isAcronymForWords("ENE",    "NORTH_EAST"));
         /*
          * Following are mapping of EPSG table names from MS-Access to ANSI SQL.
-         * All those items must be recognized as acroynms - this is requred by DirectEpsgFactory.
+         * All those items must be recognized as acroynms - this is requred by EPSGDataAccess.
          */
         assertTrue(isAcronymForWords("alias",                     "[Alias]"));
         assertTrue(isAcronymForWords("area",                      "[Area]"));
@@ -374,7 +375,7 @@ public final strictfp class CharSequence
         assertFalse(isAcronymForWords(null,                       "[Deprecation]"));
         /*
          * It is important the following is not recognized as an acronym,
-         * otherwise it leads to a confusion in DirectEpsgFactory.
+         * otherwise it leads to a confusion in EPSGDataAccess.
          */
         assertFalse(isAcronymForWords("coordoperation", "[Coordinate_Operation Method]"));
     }
@@ -409,13 +410,19 @@ public final strictfp class CharSequence
     }
 
     /**
-     * Tests the {@link CharSequences#isUpperCase(CharSequence, int, int)} method.
+     * Tests the {@link CharSequences#isUpperCase(CharSequence)} method.
      */
     @Test
     public void testIsUpperCase() {
-        assertTrue ("ABC", isUpperCase("ABC", 0, 3));
-        assertFalse("AbC", isUpperCase("AbC", 0, 3));
-        assertFalse("A2C", isUpperCase("A2C", 0, 3));
+        assertFalse("null",  isUpperCase(null));
+        assertFalse("empty", isUpperCase(""));
+        assertTrue ("ABC",   isUpperCase("ABC"));
+        assertFalse("AbC",   isUpperCase("AbC"));
+        assertTrue ("A2C",   isUpperCase("A2C"));
+        assertFalse("A2c",   isUpperCase("A2c"));
+        assertTrue ("A.C",   isUpperCase("A.C"));
+        assertTrue ("A C",   isUpperCase("A C"));
+        assertFalse(".2-",   isUpperCase(".2-"));
     }
 
     /**

Modified: sis/branches/JDK7/ide-project/NetBeans/build.xml
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/ide-project/NetBeans/build.xml?rev=1723780&r1=1723779&r2=1723780&view=diff
==============================================================================
--- sis/branches/JDK7/ide-project/NetBeans/build.xml (original)
+++ sis/branches/JDK7/ide-project/NetBeans/build.xml Fri Jan  8 18:29:04 2016
@@ -164,6 +164,10 @@
       </fileset>
       <fileset dir="${project.root}/core/sis-referencing/src/test/resources">
         <include name="**/*.xml"/>
+        <include name="**/*.txt"/>
+        <include name="**/*.gsb"/>
+        <include name="**/*.laa"/>
+        <include name="**/*.loa"/>
       </fileset>
     </copy>
     <copy todir="${build.test.classes.dir}">

Modified: sis/branches/JDK7/ide-project/NetBeans/nbproject/project.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/ide-project/NetBeans/nbproject/project.properties?rev=1723780&r1=1723779&r2=1723780&view=diff
==============================================================================
--- sis/branches/JDK7/ide-project/NetBeans/nbproject/project.properties [ISO-8859-1] (original)
+++ sis/branches/JDK7/ide-project/NetBeans/nbproject/project.properties [ISO-8859-1] Fri Jan  8 18:29:04 2016
@@ -37,7 +37,7 @@ source.encoding      = UTF-8
 javac.source         = 1.7
 javac.target         = 1.7
 platform.active      = default_platform
-run.jvmargs          = -ea -Dorg.apache.sis.test.verbose=true
+run.jvmargs          = -ea -Dorg.apache.sis.test.verbose=true -Dorg.apache.sis.test.extensive=true
 junit.forkmode       = once
 
 #
@@ -147,6 +147,7 @@ debug.test.classpath=\
 #
 javac.compilerargs                       = -Xdoclint:syntax,html,missing/protected,accessibility/protected
 javac.deprecation                        = true
+javac.external.vm                        = false
 javadoc.windowtitle                      = Apache SIS
 javadoc.encoding                         = ${source.encoding}
 javadoc.author                           = true

Modified: sis/branches/JDK7/pom.xml
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/pom.xml?rev=1723780&r1=1723779&r2=1723780&view=diff
==============================================================================
--- sis/branches/JDK7/pom.xml (original)
+++ sis/branches/JDK7/pom.xml Fri Jan  8 18:29:04 2016
@@ -423,6 +423,7 @@ Apache SIS is a free software, Java lang
       <properties>
         <maven.compiler.debug>false</maven.compiler.debug> <!-- For smaller JAR files size. -->
         <maven.compiler.optimize>true</maven.compiler.optimize>
+        <org.apache.sis.test.extensive>true</org.apache.sis.test.extensive>
       </properties>
     </profile>
     <profile>
@@ -502,6 +503,12 @@ Apache SIS is a free software, Java lang
           <includes>
             <include>**/*TestSuite.java</include>
           </includes>
+          <systemProperties>
+            <property>
+              <name>derby.stream.error.file</name>
+              <value>${project.build.directory}/derby.log</value>
+            </property>
+          </systemProperties>
         </configuration>
       </plugin>
 

Modified: sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/MetadataReader.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/MetadataReader.java?rev=1723780&r1=1723779&r2=1723780&view=diff
==============================================================================
--- sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/MetadataReader.java [UTF-8] (original)
+++ sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/MetadataReader.java [UTF-8] Fri Jan  8 18:29:04 2016
@@ -810,7 +810,7 @@ final class MetadataReader {
                  */
                 if (processingLevel != null) {
                     content = new DefaultImageDescription();
-                    ((DefaultImageDescription) content).setProcessingLevelCode(new DefaultIdentifier(processingLevel));
+                    content.setProcessingLevelCode(new DefaultIdentifier(processingLevel));
                 } else {
                     content = new DefaultCoverageDescription();
                 }

Modified: sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/NetcdfStoreProvider.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/NetcdfStoreProvider.java?rev=1723780&r1=1723779&r2=1723780&view=diff
==============================================================================
--- sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/NetcdfStoreProvider.java [UTF-8] (original)
+++ sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/NetcdfStoreProvider.java [UTF-8] Fri Jan  8 18:29:04 2016
@@ -38,6 +38,9 @@ import org.apache.sis.util.logging.Warni
 import org.apache.sis.util.logging.Logging;
 import org.apache.sis.util.Version;
 
+// Branch-specific import
+import java.nio.file.NoSuchFileException;
+
 
 /**
  * The provider of {@link NetcdfStore} instances. Given a {@link StorageConnector} input,
@@ -162,7 +165,7 @@ public class NetcdfStoreProvider extends
                     if (cause instanceof DataStoreException) throw (DataStoreException) cause;
                     if (cause instanceof RuntimeException)   throw (RuntimeException)   cause;
                     if (cause instanceof Error)              throw (Error)              cause;
-                    if (cause instanceof FileNotFoundException) {
+                    if (cause instanceof FileNotFoundException || cause instanceof NoSuchFileException) {
                         /*
                          * Happen if the String argument uses any protocol not recognized by the UCAR library,
                          * in which case UCAR tries to open it as a file even if it is not a file. For example

Modified: sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/AutoChecker.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/AutoChecker.java?rev=1723780&r1=1723779&r2=1723780&view=diff
==============================================================================
--- sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/AutoChecker.java [UTF-8] (original)
+++ sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/AutoChecker.java [UTF-8] Fri Jan  8 18:29:04 2016
@@ -34,7 +34,7 @@ import org.apache.sis.util.logging.Loggi
  */
 public abstract class AutoChecker {
     /** Logger. */
-    private Logger logger = Logging.getLogger(getClass().getSimpleName());
+    private static Logger LOGGER = Logging.getLogger(AutoChecker.class.getSimpleName());
 
     /**
      * Format a resource bundle message.
@@ -95,7 +95,7 @@ public abstract class AutoChecker {
         Objects.requireNonNull(logLevel, "The log level cannot be null.");
 
         String message = format(key, args);
-        logger.log(logLevel, message);
+        LOGGER.log(logLevel, message);
         return(message);
     }
 
@@ -112,11 +112,20 @@ public abstract class AutoChecker {
         Objects.requireNonNull(logLevel, "The log level cannot be null.");
 
         String message = format(classForResourceBundleName, key, args);
-        logger.log(logLevel, message);
+        LOGGER.log(logLevel, message);
         return(message);
     }
 
     /**
+     * Tells if the logger of the base class will log this level of log.
+     * @param level Wished level of logging.
+     * @return true if it will log it.
+     */
+    protected boolean isLoggable(Level level) {
+        return LOGGER.isLoggable(level);
+    }
+    
+    /**
      * Logs (and take the time to format an entry log) only if the logger accepts the message.
      * @param logLevel Log level.
      * @param key Message key.
@@ -125,7 +134,7 @@ public abstract class AutoChecker {
     final protected void log(Level logLevel, String key, Object... args) {
         Objects.requireNonNull(logLevel, "The log level cannot be null.");
 
-        if (logger.isLoggable(logLevel))
+        if (LOGGER.isLoggable(logLevel))
             format(logLevel, key, args);
     }
 
@@ -171,6 +180,6 @@ public abstract class AutoChecker {
      * @return logger.
      */
     public Logger getLogger() {
-        return logger;
+        return LOGGER;
     }
 }

Modified: sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/ShapefileByteReader.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/ShapefileByteReader.java?rev=1723780&r1=1723779&r2=1723780&view=diff
==============================================================================
--- sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/ShapefileByteReader.java [UTF-8] (original)
+++ sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/ShapefileByteReader.java [UTF-8] Fri Jan  8 18:29:04 2016
@@ -16,9 +16,10 @@
  */
 package org.apache.sis.internal.shapefile;
 
-import java.io.File;
-import java.io.IOException;
+import java.io.*;
 import java.nio.ByteOrder;
+import java.nio.MappedByteBuffer;
+import java.nio.channels.FileChannel;
 import java.text.MessageFormat;
 import java.util.*;
 import java.util.logging.Level;
@@ -54,22 +55,38 @@ public class ShapefileByteReader extends
 
     /** Type of the features contained in this shapefile. */
     private DefaultFeatureType featuresType;
-
+    
+    /** Shapefile index. */
+    private File shapeFileIndex;
+    
+    /** Shapefile indexes (loaded from .SHX file, if any found). */
+    private ArrayList<Integer> indexes;
+    
+    /** Shapefile records lengths (loaded from .SHX file, if any found). */
+    private ArrayList<Integer> recordsLengths;
+    
     /**
      * Construct a shapefile byte reader.
      * @param shapefile Shapefile.
      * @param dbaseFile underlying database file name.
+     * @param shapefileIndex Shapefile index, if any. Null else.
      * @throws InvalidShapefileFormatException if the shapefile format is invalid.
      * @throws SQLInvalidDbaseFileFormatException if the database file format is invalid.
      * @throws SQLShapefileNotFoundException if the shapefile has not been found.
      * @throws SQLDbaseFileNotFoundException if the database file has not been found.
      */
-    public ShapefileByteReader(File shapefile, File dbaseFile) throws InvalidShapefileFormatException, SQLInvalidDbaseFileFormatException, SQLShapefileNotFoundException, SQLDbaseFileNotFoundException {
+    public ShapefileByteReader(File shapefile, File dbaseFile, File shapefileIndex) throws InvalidShapefileFormatException, SQLInvalidDbaseFileFormatException, SQLShapefileNotFoundException, SQLDbaseFileNotFoundException {
         super(shapefile, InvalidShapefileFormatException.class, SQLShapefileNotFoundException.class);
+        this.shapeFileIndex = shapefileIndex;
+        
         loadDatabaseFieldDescriptors(dbaseFile);
         loadDescriptor();
+        
+        if (this.shapeFileIndex != null) {
+            loadShapefileIndexes();
+        }
 
-        featuresType = getFeatureType(shapefile.getName());
+        this.featuresType = getFeatureType(shapefile.getName());
     }
 
     /**
@@ -77,7 +94,7 @@ public class ShapefileByteReader extends
      * @return Fields descriptors.
      */
     public List<DBase3FieldDescriptor> getFieldsDescriptors() {
-        return databaseFieldsDescriptors;
+        return this.databaseFieldsDescriptors;
     }
 
     /**
@@ -85,7 +102,7 @@ public class ShapefileByteReader extends
      * @return Shapefile descriptor.
      */
     public ShapefileDescriptor getShapefileDescriptor() {
-        return shapefileDescriptor;
+        return this.shapefileDescriptor;
     }
 
     /**
@@ -93,7 +110,7 @@ public class ShapefileByteReader extends
      * @return Features type.
      */
     public DefaultFeatureType getFeaturesType() {
-        return featuresType;
+        return this.featuresType;
     }
 
     /**
@@ -104,13 +121,13 @@ public class ShapefileByteReader extends
     private DefaultFeatureType getFeatureType(final String name) {
         Objects.requireNonNull(name, "The feature name cannot be null.");
 
-        final int n = databaseFieldsDescriptors.size();
+        final int n = this.databaseFieldsDescriptors.size();
         final DefaultAttributeType<?>[] attributes = new DefaultAttributeType<?>[n + 1];
         final Map<String, Object> properties = new HashMap<>(4);
 
         // Load data field.
         for (int i = 0; i < n; i++) {
-            properties.put(DefaultAttributeType.NAME_KEY, databaseFieldsDescriptors.get(i).getName());
+            properties.put(DefaultAttributeType.NAME_KEY, this.databaseFieldsDescriptors.get(i).getName());
             attributes[i] = new DefaultAttributeType<>(properties, String.class, 1, 1, null);
         }
 
@@ -127,7 +144,54 @@ public class ShapefileByteReader extends
      * Load shapefile descriptor.
      */
     private void loadDescriptor() {
-        shapefileDescriptor = new ShapefileDescriptor(getByteBuffer());
+        this.shapefileDescriptor = new ShapefileDescriptor(getByteBuffer());
+    }
+
+    /**
+     * Load shapefile indexes.
+     * @return true if shapefile indexes has been read,
+     * false if none where available or a problem occured.
+     */
+    private boolean loadShapefileIndexes() {
+        if (this.shapeFileIndex == null) {
+            return false;
+        }
+        
+        try(FileInputStream fis = new FileInputStream(this.shapeFileIndex); FileChannel fc = fis.getChannel()) {
+            try {
+                int fsize = (int)fc.size();
+                MappedByteBuffer indexesByteBuffer = fc.map(FileChannel.MapMode.READ_ONLY, 0, fsize);
+                
+                // Indexes entries follow.
+                this.indexes = new ArrayList<>();
+                this.recordsLengths = new ArrayList<>();
+                indexesByteBuffer.position(100);
+                indexesByteBuffer.order(ByteOrder.BIG_ENDIAN);
+                
+                while(indexesByteBuffer.hasRemaining()) {
+                    this.indexes.add(indexesByteBuffer.getInt());        // Data offset : the position of the record in the main shapefile, expressed in words (16 bits).
+                    this.recordsLengths.add(indexesByteBuffer.getInt()); // Length of this shapefile record.
+                }
+                
+                log(Level.INFO, "log.index_has_been_read", this.shapeFileIndex.getAbsolutePath(), this.indexes.size(), this.getFile().getAbsolutePath());
+                return true;
+            }
+            catch(IOException e) {
+                log(Level.WARNING, "log.invalid_file_content_for_shapefile_index", this.shapeFileIndex.getAbsolutePath(), e.getMessage());
+                this.shapeFileIndex = null;
+                return false;
+            }
+        }
+        catch(FileNotFoundException e) {
+            log(Level.WARNING, "log.no_shapefile_index_found_at_location", this.shapeFileIndex.getAbsolutePath(), this.getFile().getAbsolutePath());
+            this.shapeFileIndex = null;
+            return false;
+        }
+        catch(IOException e) {
+            log(Level.WARNING, "log.invalid_file_content_for_shapefile_index", this.shapeFileIndex.getAbsolutePath(), e.getMessage());
+            this.shapeFileIndex = null;
+            return false;
+        }
     }
 
     /**
@@ -141,7 +205,7 @@ public class ShapefileByteReader extends
 
         try {
             databaseReader = new MappedByteReader(dbaseFile, null);
-            databaseFieldsDescriptors = databaseReader.getFieldsDescriptors();
+            this.databaseFieldsDescriptors = databaseReader.getFieldsDescriptors();
         }
         finally {
             if (databaseReader != null) {
@@ -155,6 +219,42 @@ public class ShapefileByteReader extends
     }
 
     /**
+     * Direct access to a feature by its record number.
+     * @param recordNumber Record number.
+     * @throws SQLNoDirectAccessAvailableException if this shape file doesn't allow direct acces, because it has no index.
+     * @throws SQLInvalidRecordNumberForDirectAccessException if the record number asked for is invalid (below the start, after the end).
+     */
+    public void setRowNum(int recordNumber) throws SQLNoDirectAccessAvailableException, SQLInvalidRecordNumberForDirectAccessException {
+        // Check that the asked record number is not before the first.
+        if (recordNumber < 1) {
+            String message = format(Level.SEVERE, "excp.wrong_direct_access_before_start", recordNumber, getFile().getAbsolutePath());
+            throw new SQLInvalidRecordNumberForDirectAccessException(recordNumber, message);
+        }
+
+        // Check that the shapefile allows direct access : it won't if it has no index.
+        if (this.shapeFileIndex == null) {
+            String message = format(Level.SEVERE, "excp.no_direct_access", getFile().getAbsolutePath());
+            throw new SQLNoDirectAccessAvailableException(message);
+        }
+        
+        int position = this.indexes.get(recordNumber - 1) * 2; // Indexes unit are words (16 bits).
+        
+        // Check that the asked record number is not after the last.
+        if (position >= this.getByteBuffer().capacity()) {
+            String message = format(Level.SEVERE, "excp.wrong_direct_access_after_last", recordNumber, getFile().getAbsolutePath());
+            throw new SQLInvalidRecordNumberForDirectAccessException(recordNumber, message);
+        }
+        
+        try {
+            getByteBuffer().position(position);
+        }
+        catch(IllegalArgumentException e) {
+            String message = format(Level.SEVERE, "assert.wrong_position", recordNumber, position, getFile().getAbsolutePath(), e.getMessage());
+            throw new RuntimeException(message, e);
+        }
+    }
+    
+    /**
      * Complete a feature with shapefile content.
      * @param feature Feature to complete.
      * @throws InvalidShapefileFormatException if a validation problem occurs.
@@ -171,7 +271,7 @@ public class ShapefileByteReader extends
         ShapeTypeEnum type = ShapeTypeEnum.get(iShapeType);
 
         if (type == null)
-            throw new InvalidShapefileFormatException(MessageFormat.format("The shapefile feature type {0} doesn''t match to any known feature type.", featuresType));
+            throw new InvalidShapefileFormatException(MessageFormat.format("The shapefile feature type {0} doesn''t match to any known feature type.", this.featuresType));
 
         switch (type) {
             case Point:
@@ -245,7 +345,7 @@ public class ShapefileByteReader extends
      */
     @Deprecated // As soon as the readMultiplePolygonParts method proofs working well, this readUniquePolygonPart method can be removed and all calls be deferred to readMultiplePolygonParts.
     private Polygon readUniquePolygonPart(int numPoints) {
-        int part = getByteBuffer().getInt();
+        /*int part = */ getByteBuffer().getInt();
         
         Polygon poly = new Polygon();
 

Modified: sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/ShapefileDescriptor.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/ShapefileDescriptor.java?rev=1723780&r1=1723779&r2=1723780&view=diff
==============================================================================
--- sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/ShapefileDescriptor.java [UTF-8] (original)
+++ sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/ShapefileDescriptor.java [UTF-8] Fri Jan  8 18:29:04 2016
@@ -70,25 +70,25 @@ public class ShapefileDescriptor {
      * @param byteBuffer Source Bytebuffer.
      */
     public ShapefileDescriptor(MappedByteBuffer byteBuffer) {
-        fileCode = byteBuffer.getInt();
+        this.fileCode = byteBuffer.getInt();
         byteBuffer.getInt();
         byteBuffer.getInt();
         byteBuffer.getInt();
         byteBuffer.getInt();
         byteBuffer.getInt();
-        fileLength = byteBuffer.getInt() * 2;
+        this.fileLength = byteBuffer.getInt() * 2;
 
         byteBuffer.order(ByteOrder.LITTLE_ENDIAN);
-        version = byteBuffer.getInt();
-        shapeType = ShapeTypeEnum.get(byteBuffer.getInt());
-        xmin = byteBuffer.getDouble();
-        ymin = byteBuffer.getDouble();
-        xmax = byteBuffer.getDouble();
-        ymax = byteBuffer.getDouble();
-        zmin = byteBuffer.getDouble();
-        zmax = byteBuffer.getDouble();
-        mmin = byteBuffer.getDouble();
-        mmax = byteBuffer.getDouble();
+        this.version = byteBuffer.getInt();
+        this.shapeType = ShapeTypeEnum.get(byteBuffer.getInt());
+        this.xmin = byteBuffer.getDouble();
+        this.ymin = byteBuffer.getDouble();
+        this.xmax = byteBuffer.getDouble();
+        this.ymax = byteBuffer.getDouble();
+        this.zmin = byteBuffer.getDouble();
+        this.zmax = byteBuffer.getDouble();
+        this.mmin = byteBuffer.getDouble();
+        this.mmax = byteBuffer.getDouble();
         byteBuffer.order(ByteOrder.BIG_ENDIAN);
 
         //dbf.byteBuffer.get(); // should be 0d for field terminator
@@ -182,18 +182,18 @@ public class ShapefileDescriptor {
         StringBuilder s = new StringBuilder();
         String lineSeparator = System.getProperty("line.separator", "\n");
 
-        s.append("FileCode: ").append(fileCode).append(lineSeparator);
-        s.append("FileLength: ").append(fileLength).append(lineSeparator);
-        s.append("Version: ").append(version).append(lineSeparator);
-        s.append("ShapeType: ").append(shapeType).append(lineSeparator);
-        s.append("xmin: ").append(xmin).append(lineSeparator);
-        s.append("ymin: ").append(ymin).append(lineSeparator);
-        s.append("xmax: ").append(xmax).append(lineSeparator);
-        s.append("ymax: ").append(ymax).append(lineSeparator);
-        s.append("zmin: ").append(zmin).append(lineSeparator);
-        s.append("zmax: ").append(zmax).append(lineSeparator);
-        s.append("mmin: ").append(mmin).append(lineSeparator);
-        s.append("mmax: ").append(mmax).append(lineSeparator);
+        s.append("FileCode: ").append(this.fileCode).append(lineSeparator);
+        s.append("FileLength: ").append(this.fileLength).append(lineSeparator);
+        s.append("Version: ").append(this.version).append(lineSeparator);
+        s.append("ShapeType: ").append(this.shapeType).append(lineSeparator);
+        s.append("xmin: ").append(this.xmin).append(lineSeparator);
+        s.append("ymin: ").append(this.ymin).append(lineSeparator);
+        s.append("xmax: ").append(this.xmax).append(lineSeparator);
+        s.append("ymax: ").append(this.ymax).append(lineSeparator);
+        s.append("zmin: ").append(this.zmin).append(lineSeparator);
+        s.append("zmax: ").append(this.zmax).append(lineSeparator);
+        s.append("mmin: ").append(this.mmin).append(lineSeparator);
+        s.append("mmax: ").append(this.mmax).append(lineSeparator);
         s.append("------------------------").append(lineSeparator);
 
         return s.toString();

Modified: sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/AbstractDbase3ByteReader.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/AbstractDbase3ByteReader.java?rev=1723780&r1=1723779&r2=1723780&view=diff
==============================================================================
--- sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/AbstractDbase3ByteReader.java [UTF-8] (original)
+++ sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/AbstractDbase3ByteReader.java [UTF-8] Fri Jan  8 18:29:04 2016
@@ -33,11 +33,11 @@ import java.util.logging.Level;
  * @module
  */
 abstract class AbstractDbase3ByteReader extends CommonByteReader<SQLInvalidDbaseFileFormatException, SQLDbaseFileNotFoundException> implements Dbase3ByteReader {
-    /** Number of bytes in the header. */
-    protected short dbaseHeaderBytes;
+    /** First data record position, in bytes. */
+    protected short firstRecordPosition;
 
-    /** Number of bytes in the record. */
-    protected short dbaseRecordBytes;
+    /** Size of one record, in bytes. */
+    protected short recordLength;
 
     /** Reserved (dBASE IV) Filled with 00h. */
     protected byte[] reservedFiller1 = new byte[2];
@@ -86,9 +86,6 @@ abstract class AbstractDbase3ByteReader
     /** Date of last update; in YYMMDD format. */
     protected byte[] dbaseLastUpdate = new byte[3];
 
-    /** Current row rumber. */
-    protected int rowNum;
-
     /**
      * Map a dbf file.
      * @param file Database file.
@@ -104,7 +101,7 @@ abstract class AbstractDbase3ByteReader
      * @return Charset.
      */
     @Override public Charset getCharset() {
-        return charset;
+        return this.charset;
     }
 
     /**
@@ -112,23 +109,31 @@ abstract class AbstractDbase3ByteReader
      * @return Date of the last update.
      */
     @Override public Date getDateOfLastUpdate() {
-        return toDate(dbaseLastUpdate);
+        return toDate(this.dbaseLastUpdate);
     }
-
+    
     /**
-     * Returns the record count.
-     * @return Record count.
+     * Returns the first record position, in bytes, in the DBase file.
+     * @return First record position.
      */
-    @Override public int getRowCount() {
-        return rowCount;
+    @Override public short getFirstRecordPosition() {
+        return this.firstRecordPosition;
     }
 
     /**
-     * Returns the current record number.
-     * @return Current record number.
+     * Returns the length (in bytes) of one record in this DBase file, including the delete flag. 
+     * @return Record length.
      */
-    @Override public int getRowNum() {
-        return rowNum;
+    @Override public short getRecordLength() {
+        return this.recordLength;
+    }
+    
+    /**
+     * Returns the record count.
+     * @return Record count.
+     */
+    @Override public int getRowCount() {
+        return this.rowCount;
     }
 
     /**

Modified: sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/AbstractJDBC.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/AbstractJDBC.java?rev=1723780&r1=1723779&r2=1723780&view=diff
==============================================================================
--- sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/AbstractJDBC.java [UTF-8] (original)
+++ sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/AbstractJDBC.java [UTF-8] Fri Jan  8 18:29:04 2016
@@ -105,7 +105,7 @@ public abstract class AbstractJDBC exten
      * @param methodName The call the caller attempted.
      */
     public void logStep(final String methodName) {
-        format(Level.FINER, "log.step", methodName, getClass().getSimpleName());
+        log(Level.FINER, "log.step", methodName, getClass().getSimpleName());
     }
 
     /**
@@ -114,7 +114,9 @@ public abstract class AbstractJDBC exten
      * @param args Arguments that where sent to the unimplemented function.
      */
     public void logStep(final String methodName, Object... args) {
-        format(Level.FINER, "log.step_with_arguments", methodName, getClass().getSimpleName(), arguments(args));
+        if (isLoggable(Level.FINER)) { // Avoid resolution of arguments(...) if not needed.
+            log(Level.FINER, "log.step_with_arguments", methodName, getClass().getSimpleName(), arguments(args));
+        }
     }
 
     /**
@@ -122,7 +124,7 @@ public abstract class AbstractJDBC exten
      * @param methodName The call the caller attempted.
      */
     public void logUnsupportedOperation(final String methodName) {
-        format(Level.WARNING, "excp.unsupportedDriverFeature", getInterface(), methodName, getClass().getSimpleName());
+        log(Level.WARNING, "excp.unsupportedDriverFeature", getInterface(), methodName, getClass().getSimpleName());
     }
 
     /**
@@ -131,7 +133,7 @@ public abstract class AbstractJDBC exten
      * @param args Arguments that where sent to the unimplemented function.
      */
     public void logUnsupportedOperation(final String methodName, Object... args) {
-        format(Level.WARNING, "excp.unsupportedDriverFeature_with_arguments", getInterface(), methodName, getClass().getSimpleName(), arguments(args));
+        log(Level.WARNING, "excp.unsupportedDriverFeature_with_arguments", getInterface(), methodName, getClass().getSimpleName(), arguments(args));
     }
 
     /**

Modified: sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/CommonByteReader.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/CommonByteReader.java?rev=1723780&r1=1723779&r2=1723780&view=diff
==============================================================================
--- sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/CommonByteReader.java [UTF-8] (original)
+++ sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/CommonByteReader.java [UTF-8] Fri Jan  8 18:29:04 2016
@@ -33,7 +33,7 @@ import org.apache.sis.internal.shapefile
  * @since   0.5
  * @module
  */
-public abstract class CommonByteReader<InvalidFormatException extends Exception, FNFException extends Exception> extends AutoChecker  implements AutoCloseable  {
+public abstract class CommonByteReader<InvalidFormatException extends Exception, FNFException extends Exception> extends AutoChecker implements AutoCloseable  {
     /** The File. */
     private File file;
 
@@ -65,28 +65,28 @@ public abstract class CommonByteReader<I
      */
     public CommonByteReader(File f, Class<InvalidFormatException> invalidFormatException, Class<FNFException> fileNotFoundException) throws FNFException, InvalidFormatException {
         Objects.requireNonNull(f, "The file cannot be null.");
-        classInvalidFormatException = invalidFormatException;
-        classFNFException = fileNotFoundException;
+        this.classInvalidFormatException = invalidFormatException;
+        this.classFNFException = fileNotFoundException;
 
-        file = f;
+        this.file = f;
 
         try {
-            fis = new FileInputStream(file);
+            this.fis = new FileInputStream(this.file);
         }
         catch(FileNotFoundException e) {
-            throwException(classInvalidFormatException, e.getMessage(), e);
+            throwException(this.classInvalidFormatException, e.getMessage(), e);
             throw new RuntimeException("this place should not be reached.");
         }
 
-        fc = fis.getChannel();
+        this.fc = this.fis.getChannel();
 
         try {
-            int fsize = (int)fc.size();
-            byteBuffer = fc.map(FileChannel.MapMode.READ_ONLY, 0, fsize);
+            int fsize = (int)this.fc.size();
+            this.byteBuffer = this.fc.map(FileChannel.MapMode.READ_ONLY, 0, fsize);
         }
         catch(IOException e) {
-            String message = format(Level.WARNING, "excp.reader_cannot_be_created", file.getAbsolutePath(), e.getMessage());
-            throwException(classFNFException, message, e);
+            String message = format(Level.WARNING, "excp.reader_cannot_be_created", this.file.getAbsolutePath(), e.getMessage());
+            throwException(this.classFNFException, message, e);
             throw new RuntimeException("this place should not be reached.");
         }
    }
@@ -97,13 +97,13 @@ public abstract class CommonByteReader<I
      */
     @Override
     public void close() throws IOException {
-        if (fc != null)
-            fc.close();
+        if (this.fc != null)
+            this.fc.close();
 
-        if (fis != null)
-            fis.close();
+        if (this.fis != null)
+            this.fis.close();
 
-        isClosed = true;
+        this.isClosed = true;
     }
 
     /**
@@ -111,7 +111,7 @@ public abstract class CommonByteReader<I
      * @return true if it is closed.
      */
     public boolean isClosed() {
-        return isClosed;
+        return this.isClosed;
     }
 
     /**
@@ -119,7 +119,7 @@ public abstract class CommonByteReader<I
      * @return Byte Buffer.
      */
     public MappedByteBuffer getByteBuffer() {
-        return byteBuffer;
+        return this.byteBuffer;
     }
 
     /**
@@ -127,6 +127,6 @@ public abstract class CommonByteReader<I
      * @return File.
      */
     public File getFile() {
-        return file;
+        return this.file;
     }
 }

Modified: sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/DBase3FieldDescriptor.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/DBase3FieldDescriptor.java?rev=1723780&r1=1723779&r2=1723780&view=diff
==============================================================================
--- sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/DBase3FieldDescriptor.java [UTF-8] (original)
+++ sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/DBase3FieldDescriptor.java [UTF-8] Fri Jan  8 18:29:04 2016
@@ -20,6 +20,9 @@ import java.nio.MappedByteBuffer;
 
 import org.apache.sis.internal.shapefile.AutoChecker;
 
+// Branch-dependent imports
+import org.apache.sis.internal.jdk8.JDK8;
+
 
 /**
  * Field descriptor.
@@ -33,6 +36,9 @@ public class DBase3FieldDescriptor exten
     /** Field name. */
     private byte[] fieldName = new byte[11];
 
+    /** Field name as String, for performance issues. */
+    private String stringFieldName;
+
     /** Field type. */
     private DBaseDataType fieldType;
 
@@ -65,30 +71,30 @@ public class DBase3FieldDescriptor exten
      */
     public DBase3FieldDescriptor(MappedByteBuffer byteBuffer) {
         // Field name.
-        byteBuffer.get(fieldName);
+        byteBuffer.get(this.fieldName);
 
         // Field type.
         char dt = (char)byteBuffer.get();
-        fieldType = DBaseDataType.valueOfDataType(dt);
+        this.fieldType = DBaseDataType.valueOfDataType(dt);
 
         // Field address.
-        byteBuffer.get(fieldAddress);
+        byteBuffer.get(this.fieldAddress);
 
         // Length and scale.
-        fieldLength = byteBuffer.get();
-        fieldDecimalCount = byteBuffer.get();
+        this.fieldLength = byteBuffer.get();
+        this.fieldDecimalCount = byteBuffer.get();
 
         byteBuffer.getShort(); // reserved
 
-        byteBuffer.get(dbasePlusLanReserved2);
+        byteBuffer.get(this.dbasePlusLanReserved2);
 
         // Work area id.
-        workAreaID = byteBuffer.get();
+        this.workAreaID = byteBuffer.get();
 
-        byteBuffer.get(dbasePlusLanReserved3);
+        byteBuffer.get(this.dbasePlusLanReserved3);
 
         // Fields.
-        setFields = byteBuffer.get();
+        this.setFields = byteBuffer.get();
 
         byte[] data = new byte[6];
         byteBuffer.get(data); // reserved
@@ -115,11 +121,17 @@ public class DBase3FieldDescriptor exten
      * @return Field name.
      */
     public String getName() {
-        int length = fieldName.length;
-        while (length != 0 && fieldName[length - 1] <= ' ') {
-            length--;
+        // Converting bytes to String takes time. Only do that once.
+        if (this.stringFieldName == null) {
+            int length = this.fieldName.length;
+            while (length != 0 && JDK8.toUnsignedInt(this.fieldName[length - 1]) <= ' ') {
+                length--;
+            }
+
+            this.stringFieldName = new String(this.fieldName, 0, length);
         }
-        return new String(this.fieldName, 0, length);
+
+        return this.stringFieldName;
     }
 
     /**
@@ -127,7 +139,7 @@ public class DBase3FieldDescriptor exten
      * @return Data type.
      */
     public DBaseDataType getType() {
-        return(fieldType);
+        return(this.fieldType);
     }
 
     /**
@@ -135,7 +147,7 @@ public class DBase3FieldDescriptor exten
      */
     @Override
     public String toString() {
-        String text = format("toString", getName(), fieldType, fieldLength, fieldDecimalCount);
+        String text = format("toString", getName(), this.fieldType, JDK8.toUnsignedInt(this.fieldLength), JDK8.toUnsignedInt(this.fieldDecimalCount));
         return text;
     }
 }

Modified: sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/Dbase3ByteReader.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/Dbase3ByteReader.java?rev=1723780&r1=1723779&r2=1723780&view=diff
==============================================================================
--- sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/Dbase3ByteReader.java [UTF-8] (original)
+++ sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/Dbase3ByteReader.java [UTF-8] Fri Jan  8 18:29:04 2016
@@ -85,8 +85,20 @@ public interface Dbase3ByteReader {
      * @return Date of the last update.
      */
     public Date getDateOfLastUpdate();
+    
+    /**
+     * Returns the first record position, in bytes, in the DBase file.
+     * @return First record position.
+     */
+    public short getFirstRecordPosition();
 
     /**
+     * Returns the length (in bytes) of one record in this DBase file, including the delete flag. 
+     * @return Record length.
+     */
+    public short getRecordLength();
+    
+    /**
      * Returns the record count.
      * @return Record count.
      */

Modified: sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/MappedByteReader.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/MappedByteReader.java?rev=1723780&r1=1723779&r2=1723780&view=diff
==============================================================================
--- sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/MappedByteReader.java [UTF-8] (original)
+++ sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/MappedByteReader.java [UTF-8] Fri Jan  8 18:29:04 2016
@@ -28,6 +28,9 @@ import org.apache.sis.internal.shapefile
 import org.apache.sis.internal.shapefile.jdbc.resultset.SQLNoSuchFieldException;
 import org.opengis.feature.Feature;
 
+// Branch-dependent imports
+import org.apache.sis.internal.jdk8.JDK8;
+
 
 /**
  * Reader of a Database Binary content by the way of a {@link java.nio.MappedByteBuffer}
@@ -43,7 +46,7 @@ public class MappedByteReader extends Ab
 
     /** Connection properties. */
     private Properties info;
-    
+
     /**
      * Construct a mapped byte reader on a file.
      * @param dbase3File File.
@@ -54,18 +57,18 @@ public class MappedByteReader extends Ab
     public MappedByteReader(File dbase3File, Properties connectionInfos) throws SQLInvalidDbaseFileFormatException, SQLDbaseFileNotFoundException {
         super(dbase3File);
         this.info = connectionInfos;
-        
+
         // React to special features asked.
-        if (info != null) {
+        if (this.info != null) {
             // Sometimes, DBF files have a wrong charset, or more often : none, and you have to specify it.
-            String recordCharset = (String)info.get("record_charset");
-            
+            String recordCharset = (String)this.info.get("record_charset");
+
             if (recordCharset != null) {
                 Charset cs = Charset.forName(recordCharset);
                 setCharset(cs);
             }
         }
-        
+
         loadDescriptor();
     }
 
@@ -78,20 +81,18 @@ public class MappedByteReader extends Ab
         getByteBuffer().get(); // denotes whether deleted or current
         // read first part of record
 
-        for (DBase3FieldDescriptor fd : fieldsDescriptors) {
+        for (DBase3FieldDescriptor fd : this.fieldsDescriptors) {
             byte[] data = new byte[fd.getLength()];
             getByteBuffer().get(data);
 
             int length = data.length;
-            while (length != 0 && data[length - 1] <= ' ') {
+            while (length != 0 && JDK8.toUnsignedInt(data[length - 1]) <= ' ') {
                 length--;
             }
 
             String value = new String(data, 0, length);
             feature.setPropertyValue(fd.getName(), value);
         }
-
-        rowNum ++;
     }
 
     /**
@@ -104,13 +105,13 @@ public class MappedByteReader extends Ab
         if (getByteBuffer().hasRemaining() == false) {
             return false;
         }
-        
+
         // 2) Check that the immediate next byte read isn't the EOF signal.
         byte eofCheck = getByteBuffer().get();
-        
+
         boolean isEOF = (eofCheck == 0x1A);
-        this.log(Level.FINER, "log.delete_status", rowNum, eofCheck, isEOF ? "EOF" : "Active");
-        
+        this.log(Level.FINER, "log.delete_status", getRowNum(), eofCheck, isEOF ? "EOF" : "Active");
+
         if (eofCheck == 0x1A) {
             return false;
         }
@@ -123,6 +124,16 @@ public class MappedByteReader extends Ab
     }
 
     /**
+     * Returns the record number of the last record red.
+     * @return The record number.
+     */
+    @Override public int getRowNum() {
+        int position = getByteBuffer().position();
+        int recordNumber = (position - JDK8.toUnsignedInt(this.firstRecordPosition)) / JDK8.toUnsignedInt(this.recordLength);
+        return recordNumber;
+    }
+
+    /**
      * Read the next row as a set of objects.
      * @return Map of field name / object value.
      */
@@ -130,28 +141,28 @@ public class MappedByteReader extends Ab
     public Map<String, byte[]> readNextRowAsObjects() {
         // TODO: ignore deleted records
         /* byte isDeleted = */ getByteBuffer().get(); // denotes whether deleted or current
-        
+
         // read first part of record
         HashMap<String, byte[]> fieldsValues = new HashMap<>();
 
-        for (DBase3FieldDescriptor fd : fieldsDescriptors) {
+        for (DBase3FieldDescriptor fd : this.fieldsDescriptors) {
             byte[] data = new byte[fd.getLength()];
             getByteBuffer().get(data);
 
             // Trim the bytes right.
             int length = data.length;
-            
-            while (length != 0 && data[length - 1] <= ' ') {
+
+            while (length != 0 && JDK8.toUnsignedInt(data[length - 1]) <= ' ') {
                 length--;
             }
-            
+
             if (length != data.length) {
                 byte[] dataTrimmed = new byte[length];
-                
+
                 for(int index=0; index < length; index ++) {
                     dataTrimmed[index] = data[index];
                 }
-                
+
                 fieldsValues.put(fd.getName(), dataTrimmed);
             }
             else {
@@ -159,7 +170,6 @@ public class MappedByteReader extends Ab
             }
         }
 
-        rowNum ++;
         return fieldsValues;
     }
 
@@ -174,36 +184,36 @@ public class MappedByteReader extends Ab
 
             getByteBuffer().order(ByteOrder.LITTLE_ENDIAN);
             this.rowCount = getByteBuffer().getInt();
-            this.dbaseHeaderBytes = getByteBuffer().getShort();
-            this.dbaseRecordBytes = getByteBuffer().getShort();
+            this.firstRecordPosition = getByteBuffer().getShort();
+            this.recordLength = getByteBuffer().getShort();
             getByteBuffer().order(ByteOrder.BIG_ENDIAN);
 
-            getByteBuffer().get(reservedFiller1);
+            getByteBuffer().get(this.reservedFiller1);
             this.reservedIncompleteTransaction = getByteBuffer().get();
             this.reservedEncryptionFlag = getByteBuffer().get();
-            getByteBuffer().get(reservedFreeRecordThread);
-            getByteBuffer().get(reservedMultiUser);
-            reservedMDXFlag = getByteBuffer().get();
+            getByteBuffer().get(this.reservedFreeRecordThread);
+            getByteBuffer().get(this.reservedMultiUser);
+            this.reservedMDXFlag = getByteBuffer().get();
 
             // Translate code page value to a known charset.
             this.codePage = getByteBuffer().get();
-            
+
             if (this.charset == null) {
                 try {
                     this.charset = toCharset(this.codePage);
                 }
                 catch(UnsupportedCharsetException e) {
                     // Warn the caller that he will have to perform is own conversions.
-                    format(Level.WARNING, "log.no_valid_charset", getFile().getAbsolutePath(), e.getMessage());
+                    log(Level.WARNING, "log.no_valid_charset", getFile().getAbsolutePath(), e.getMessage());
                 }
             }
             else {
-                format(Level.INFO, "log.record_charset", this.charset.name());
+                log(Level.INFO, "log.record_charset", this.charset.name());
             }
 
-            getByteBuffer().get(reservedFiller2);
+            getByteBuffer().get(this.reservedFiller2);
 
-            while(getByteBuffer().position() < this.dbaseHeaderBytes - 1) {
+            while(getByteBuffer().position() < this.firstRecordPosition - 1) {
                 DBase3FieldDescriptor fd = new DBase3FieldDescriptor(getByteBuffer());
                 this.fieldsDescriptors.add(fd);
                 // loop until you hit the 0Dh field terminator
@@ -212,7 +222,7 @@ public class MappedByteReader extends Ab
             this.descriptorTerminator = getByteBuffer().get();
 
             // If the last character read after the field descriptor isn't 0x0D, the expected mark has not been found and the DBF is corrupted.
-            if (descriptorTerminator != 0x0D) {
+            if (this.descriptorTerminator != 0x0D) {
                 String message = format(Level.WARNING, "excp.filedescriptor_problem", getFile().getAbsolutePath(), "Character marking the end of the fields descriptors (0x0D) has not been found.");
                 throw new SQLInvalidDbaseFileFormatException(message);
             }
@@ -233,7 +243,7 @@ public class MappedByteReader extends Ab
      */
     @Override
     public List<DBase3FieldDescriptor> getFieldsDescriptors() {
-        return fieldsDescriptors;
+        return this.fieldsDescriptors;
     }
 
     /**
@@ -253,7 +263,7 @@ public class MappedByteReader extends Ab
      */
     @Override
     public int getColumnCount() {
-        return fieldsDescriptors.size();
+        return this.fieldsDescriptors.size();
     }
 
     /**
@@ -273,8 +283,8 @@ public class MappedByteReader extends Ab
         }
 
         // Search the field among the fields descriptors.
-        for(int index=0; index < fieldsDescriptors.size(); index ++) {
-            if (fieldsDescriptors.get(index).getName().equals(columnLabel)) {
+        for(int index=0; index < this.fieldsDescriptors.size(); index ++) {
+            if (this.fieldsDescriptors.get(index).getName().equals(columnLabel)) {
                 return index + 1;
             }
         }
@@ -297,6 +307,6 @@ public class MappedByteReader extends Ab
             throw new SQLIllegalColumnIndexException(message, sql, getFile(), columnIndex);
         }
 
-        return fieldsDescriptors.get(columnIndex-1);
+        return this.fieldsDescriptors.get(columnIndex-1);
     }
 }

Modified: sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/SQLConnectionClosedException.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/SQLConnectionClosedException.java?rev=1723780&r1=1723779&r2=1723780&view=diff
==============================================================================
--- sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/SQLConnectionClosedException.java [UTF-8] (original)
+++ sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/SQLConnectionClosedException.java [UTF-8] Fri Jan  8 18:29:04 2016
@@ -41,8 +41,8 @@ public class SQLConnectionClosedExceptio
      */
     public SQLConnectionClosedException(String message, String sqlStatement, File dbf) {
         super(message);
-        sql = sqlStatement;
-        database = dbf;
+        this.sql = sqlStatement;
+        this.database = dbf;
     }
 
     /**
@@ -50,7 +50,7 @@ public class SQLConnectionClosedExceptio
      * @return SQL statement or null.
      */
     public String getSQL() {
-        return sql;
+        return this.sql;
     }
 
     /**
@@ -58,6 +58,6 @@ public class SQLConnectionClosedExceptio
      * @return Database file.
      */
     public File getDatabase() {
-        return database;
+        return this.database;
     }
 }

Modified: sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/connection/AbstractConnection.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/connection/AbstractConnection.java?rev=1723780&r1=1723779&r2=1723780&view=diff
==============================================================================
--- sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/connection/AbstractConnection.java [UTF-8] (original)
+++ sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/connection/AbstractConnection.java [UTF-8] Fri Jan  8 18:29:04 2016
@@ -149,7 +149,7 @@ abstract class AbstractConnection extend
      */
     @Override
     public void setAutoCommit(boolean autoCommit) {
-        format(Level.FINE, "log.auto_commit_ignored", autoCommit);
+        log(Level.FINE, "log.auto_commit_ignored", autoCommit);
     }
 
     /**
@@ -157,7 +157,7 @@ abstract class AbstractConnection extend
      */
     @Override
     public void commit() {
-        format(Level.FINE, "log.commit_rollback_ignored");
+        log(Level.FINE, "log.commit_rollback_ignored");
     }
 
     /**
@@ -165,7 +165,7 @@ abstract class AbstractConnection extend
      */
     @Override
     public void rollback() {
-        format(Level.FINE, "log.commit_rollback_ignored");
+        log(Level.FINE, "log.commit_rollback_ignored");
     }
 
     /**

Modified: sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/connection/DBFConnection.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/connection/DBFConnection.java?rev=1723780&r1=1723779&r2=1723780&view=diff
==============================================================================
--- sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/connection/DBFConnection.java [UTF-8] (original)
+++ sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/connection/DBFConnection.java [UTF-8] Fri Jan  8 18:29:04 2016
@@ -63,9 +63,9 @@ public class DBFConnection extends Abstr
             throw new SQLDbaseFileNotFoundException(format(Level.WARNING, "excp.directory_not_expected", datafile.getAbsolutePath()));
         }
 
-       databaseFile = datafile;
-       byteReader = br;
-       format(Level.FINE, "log.database_connection_opened", databaseFile.getAbsolutePath(), "FIXME : column desc.");
+        this.databaseFile = datafile;
+        this.byteReader = br;
+        log(Level.FINE, "log.database_connection_opened", this.databaseFile.getAbsolutePath(), "FIXME : column desc.");
     }
 
     /**
@@ -79,13 +79,13 @@ public class DBFConnection extends Abstr
         try {
             // Check if all the underlying connections that has been opened with this connection has been closed.
             // If not, we log a warning to help the developper.
-            if (openedStatements.size() > 0) {
-                format(Level.WARNING, "log.statements_left_opened", openedStatements.size(), openedStatements.toString());
+            if (this.openedStatements.size() > 0) {
+                log(Level.WARNING, "log.statements_left_opened", this.openedStatements.size(), openedStatements.toString());
             }
 
-            byteReader.close();
+            this.byteReader.close();
         } catch (IOException e) {
-            format(Level.FINE, e.getMessage(), e);
+            log(Level.FINE, e.getMessage(), e);
         }
     }
 
@@ -98,7 +98,7 @@ public class DBFConnection extends Abstr
         assertNotClosed();
 
         DBFStatement stmt = new DBFStatement(this);
-        openedStatements.add(stmt);
+        this.openedStatements.add(stmt);
         return stmt;
     }
 
@@ -115,7 +115,7 @@ public class DBFConnection extends Abstr
      * @return Charset.
      */
     public Charset getCharset() {
-        return byteReader.getCharset();
+        return this.byteReader.getCharset();
     }
 
     /**
@@ -124,7 +124,7 @@ public class DBFConnection extends Abstr
      */
     @Override
     public File getFile() {
-        return databaseFile;
+        return this.databaseFile;
     }
 
     /**
@@ -149,7 +149,7 @@ public class DBFConnection extends Abstr
      */
     @Override
     public boolean isClosed() {
-        return byteReader.isClosed();
+        return this.byteReader.isClosed();
     }
 
     /**
@@ -187,7 +187,7 @@ public class DBFConnection extends Abstr
     public void notifyCloseStatement(DBFStatement stmt) {
         Objects.requireNonNull(stmt, "The statement notified being closed cannot be null.");
 
-        if (openedStatements.remove(stmt) == false) {
+        if (this.openedStatements.remove(stmt) == false) {
             throw new RuntimeException(format(Level.SEVERE, "assert.statement_not_opened_by_me", stmt, toString()));
         }
     }
@@ -201,7 +201,7 @@ public class DBFConnection extends Abstr
      * @throws SQLNoSuchFieldException if there is no field with this name in the query.
      */
     public int findColumn(String columnLabel, String sql) throws SQLNoSuchFieldException {
-        return byteReader.findColumn(columnLabel, sql);
+        return this.byteReader.findColumn(columnLabel, sql);
     }
 
     /**
@@ -209,7 +209,7 @@ public class DBFConnection extends Abstr
      * @return Column count.
      */
     public int getColumnCount() {
-        return byteReader.getColumnCount();
+        return this.byteReader.getColumnCount();
     }
 
     /**
@@ -287,7 +287,7 @@ public class DBFConnection extends Abstr
      * @return Fields descriptors.
      */
     public List<DBase3FieldDescriptor> getFieldsDescriptors() {
-        return byteReader.getFieldsDescriptors();
+        return this.byteReader.getFieldsDescriptors();
     }
 
     /**
@@ -298,7 +298,7 @@ public class DBFConnection extends Abstr
      * @throws SQLIllegalColumnIndexException if the index is out of bounds.
      */
     public String getFieldName(int columnIndex, String sql) throws SQLIllegalColumnIndexException {
-        return byteReader.getFieldName(columnIndex, sql);
+        return this.byteReader.getFieldName(columnIndex, sql);
     }
 
     /**
@@ -306,7 +306,7 @@ public class DBFConnection extends Abstr
      * @return true if a next row is available.
      */
     public boolean nextRowAvailable() {
-        return byteReader.nextRowAvailable();
+        return this.byteReader.nextRowAvailable();
     }
 
     /**
@@ -314,7 +314,15 @@ public class DBFConnection extends Abstr
      * @return Map of field name / object value, or null if EoF has been encountered.
      */
     public Map<String, byte[]> readNextRowAsObjects() {
-        return byteReader.readNextRowAsObjects();
+        return this.byteReader.readNextRowAsObjects();
+    }
+
+    /**
+     * Returns the record number of the last record red.
+     * @return The record number.
+     */
+    public int getRowNum() {
+        return this.byteReader.getRowNum();
     }
 
     /**
@@ -322,6 +330,6 @@ public class DBFConnection extends Abstr
      */
     @Override
     public String toString() {
-        return format("toString", databaseFile.getAbsolutePath(), isClosed() == false);
+        return format("toString", this.databaseFile.getAbsolutePath(), isClosed() == false);
     }
 }

Modified: sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/connection/SQLClosingIOFailureException.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/connection/SQLClosingIOFailureException.java?rev=1723780&r1=1723779&r2=1723780&view=diff
==============================================================================
--- sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/connection/SQLClosingIOFailureException.java [UTF-8] (original)
+++ sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/connection/SQLClosingIOFailureException.java [UTF-8] Fri Jan  8 18:29:04 2016
@@ -41,8 +41,8 @@ public class SQLClosingIOFailureExceptio
      */
     public SQLClosingIOFailureException(String message, String sqlStatement, File dbf) {
         super(message);
-        sql = sqlStatement;
-        database = dbf;
+        this.sql = sqlStatement;
+        this.database = dbf;
     }
 
     /**
@@ -50,7 +50,7 @@ public class SQLClosingIOFailureExceptio
      * @return SQL statement or null.
      */
     public String getSQL() {
-        return sql;
+        return this.sql;
     }
 
     /**
@@ -58,6 +58,6 @@ public class SQLClosingIOFailureExceptio
      * @return Database file.
      */
     public File getDatabase() {
-        return database;
+        return this.database;
     }
 }

Modified: sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/metadata/DBFDatabaseMetaData.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/metadata/DBFDatabaseMetaData.java?rev=1723780&r1=1723779&r2=1723780&view=diff
==============================================================================
--- sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/metadata/DBFDatabaseMetaData.java [UTF-8] (original)
+++ sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/metadata/DBFDatabaseMetaData.java [UTF-8] Fri Jan  8 18:29:04 2016
@@ -40,7 +40,7 @@ public class DBFDatabaseMetaData extends
      */
     public DBFDatabaseMetaData(DBFConnection cnt) {
         Objects.requireNonNull(cnt, "The database connection used to create Database metadata cannot be null.");
-        connection = cnt;
+        this.connection = cnt;
     }
 
     /**
@@ -73,8 +73,8 @@ public class DBFDatabaseMetaData extends
      */
     @Override
     public ResultSet getColumns(@SuppressWarnings("unused") String catalog, @SuppressWarnings("unused") String schemaPattern, @SuppressWarnings("unused") String tableNamePattern, @SuppressWarnings("unused") String columnNamePattern) throws SQLConnectionClosedException {
-        try(DBFStatement stmt = (DBFStatement)connection.createStatement()) {
-            return new DBFBuiltInMemoryResultSetForColumnsListing(stmt, connection.getFieldsDescriptors());
+        try(DBFStatement stmt = (DBFStatement)this.connection.createStatement()) {
+            return new DBFBuiltInMemoryResultSetForColumnsListing(stmt, this.connection.getFieldsDescriptors());
         }
     }
 
@@ -84,7 +84,7 @@ public class DBFDatabaseMetaData extends
      */
     @Override
     public File getFile() {
-        return connection.getFile();
+        return this.connection.getFile();
     }
 
     /**
@@ -1013,7 +1013,7 @@ public class DBFDatabaseMetaData extends
     @Override public ResultSet getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types) {
         logStep("getTables", catalog, schemaPattern, tableNamePattern, types != null ? Arrays.asList(types) : null);
 
-        DBFStatement stmt = new DBFStatement(connection);
+        DBFStatement stmt = new DBFStatement(this.connection);
         DBFBuiltInMemoryResultSetForTablesListing tables = new DBFBuiltInMemoryResultSetForTablesListing(stmt);
         stmt.registerResultSet(tables);
         return tables;
@@ -1026,7 +1026,7 @@ public class DBFDatabaseMetaData extends
     @Override public ResultSet getSchemas() {
         logStep("getSchemas");
 
-        DBFStatement stmt = new DBFStatement(connection);
+        DBFStatement stmt = new DBFStatement(this.connection);
         DBFBuiltInMemoryResultSetForSchemaListing schemas = new DBFBuiltInMemoryResultSetForSchemaListing(stmt);
         stmt.registerResultSet(schemas);
         return schemas;
@@ -1039,7 +1039,7 @@ public class DBFDatabaseMetaData extends
     @Override public ResultSet getCatalogs() {
         logStep("getCatalogs");
 
-        DBFStatement stmt = new DBFStatement(connection);
+        DBFStatement stmt = new DBFStatement(this.connection);
         DBFBuiltInMemoryResultSetForCatalogNamesListing catalogNames = new DBFBuiltInMemoryResultSetForCatalogNamesListing(stmt);
         stmt.registerResultSet(catalogNames);
         return catalogNames;
@@ -1052,7 +1052,7 @@ public class DBFDatabaseMetaData extends
     @Override public ResultSet getTableTypes() {
         logStep("getTableTypes");
 
-        DBFStatement stmt = new DBFStatement(connection);
+        DBFStatement stmt = new DBFStatement(this.connection);
         DBFBuiltInMemoryResultSetForTablesTypesListing tablesTypes = new DBFBuiltInMemoryResultSetForTablesTypesListing(stmt);
         stmt.registerResultSet(tablesTypes);
         return tablesTypes;
@@ -1168,7 +1168,7 @@ public class DBFDatabaseMetaData extends
      */
     @Override public Connection getConnection() {
         logStep("getConnection");
-        return connection;
+        return this.connection;
     }
 
     /**

Modified: sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/metadata/DBFResultSetMataData.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/metadata/DBFResultSetMataData.java?rev=1723780&r1=1723779&r2=1723780&view=diff
==============================================================================
--- sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/metadata/DBFResultSetMataData.java [UTF-8] (original)
+++ sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/metadata/DBFResultSetMataData.java [UTF-8] Fri Jan  8 18:29:04 2016
@@ -46,10 +46,10 @@ public class DBFResultSetMataData extend
      */
     public DBFResultSetMataData(DBFRecordBasedResultSet resultset) {
         Objects.requireNonNull(resultset, "A non null ResultSet is required.");
-        rs = resultset;
+        this.rs = resultset;
 
         try {
-            metadata = (DBFDatabaseMetaData)resultset.getStatement().getConnection().getMetaData();
+            this.metadata = (DBFDatabaseMetaData)resultset.getStatement().getConnection().getMetaData();
         }
         catch(SQLException e) {
             throw new RuntimeException(e.getMessage(), e);
@@ -79,7 +79,7 @@ public class DBFResultSetMataData extend
     @SuppressWarnings("resource") // The current connection is only used and has not to be closed.
     @Override public int getColumnCount() throws SQLConnectionClosedException {
         logStep("getColumnCount");
-        DBFConnection cnt = (DBFConnection)(((DBFStatement)rs.getStatement()).getConnection());
+        DBFConnection cnt = (DBFConnection)(((DBFStatement)this.rs.getStatement()).getConnection());
 
         return cnt.getColumnCount();
     }
@@ -282,7 +282,7 @@ public class DBFResultSetMataData extend
         logStep("getTableName", column);
 
         // The table default to the file name (without its extension .dbf).
-        String fileName = rs.getFile().getName();
+        String fileName = this.rs.getFile().getName();
         int indexDBF = fileName.lastIndexOf(".");
         String tableName = fileName.substring(0, indexDBF);
 
@@ -436,7 +436,7 @@ public class DBFResultSetMataData extend
      */
     @Override
     protected File getFile() {
-        return rs.getFile();
+        return this.rs.getFile();
     }
 
     /**
@@ -447,12 +447,12 @@ public class DBFResultSetMataData extend
      * @throws SQLConnectionClosedException if the underlying connection is closed.
      */
     private DBFBuiltInMemoryResultSetForColumnsListing desc(int column) throws SQLIllegalColumnIndexException, SQLConnectionClosedException {
-        DBFBuiltInMemoryResultSetForColumnsListing rsDatabase = (DBFBuiltInMemoryResultSetForColumnsListing)metadata.getColumns(null, null, null, null);
+        DBFBuiltInMemoryResultSetForColumnsListing rsDatabase = (DBFBuiltInMemoryResultSetForColumnsListing)this.metadata.getColumns(null, null, null, null);
 
         if (column > getColumnCount()) {
             rsDatabase.close();
             String message = format(Level.WARNING, "excp.illegal_column_index_metadata", column, getColumnCount());
-            throw new SQLIllegalColumnIndexException(message, rs.getSQL(), getFile(), column);
+            throw new SQLIllegalColumnIndexException(message, this.rs.getSQL(), getFile(), column);
         }
 
         // TODO Implements ResultSet:absolute(int) instead.

Modified: sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/resultset/BuiltInMemoryResultSet.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/resultset/BuiltInMemoryResultSet.java?rev=1723780&r1=1723779&r2=1723780&view=diff
==============================================================================
--- sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/resultset/BuiltInMemoryResultSet.java [UTF-8] (original)
+++ sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/resultset/BuiltInMemoryResultSet.java [UTF-8] Fri Jan  8 18:29:04 2016
@@ -55,7 +55,7 @@ public abstract class BuiltInMemoryResul
      */
     @Override
     public BigDecimal getBigDecimal(int columnIndex) throws SQLException {
-        return getBigDecimal(getFieldName(columnIndex, sql));
+        return getBigDecimal(getFieldName(columnIndex, this.sql));
     }
 
     /**
@@ -71,7 +71,7 @@ public abstract class BuiltInMemoryResul
      */
     @Override
     public Date getDate(int columnIndex) throws SQLException {
-        return getDate(getFieldName(columnIndex, sql));
+        return getDate(getFieldName(columnIndex, this.sql));
     }
 
     /**
@@ -95,7 +95,7 @@ public abstract class BuiltInMemoryResul
      */
     @Override
     public double getDouble(int columnIndex) throws SQLException {
-        return getDouble(getFieldName(columnIndex, sql));
+        return getDouble(getFieldName(columnIndex, this.sql));
     }
 
     /**
@@ -103,7 +103,7 @@ public abstract class BuiltInMemoryResul
      */
     @Override
     public float getFloat(int columnIndex) throws SQLException {
-        return getFloat(getFieldName(columnIndex, sql));
+        return getFloat(getFieldName(columnIndex, this.sql));
     }
 
     /**
@@ -127,7 +127,7 @@ public abstract class BuiltInMemoryResul
      */
     @Override
     public int getInt(int columnIndex) throws SQLException {
-        return getInt(getFieldName(columnIndex, sql));
+        return getInt(getFieldName(columnIndex, this.sql));
     }
 
     /**
@@ -141,7 +141,7 @@ public abstract class BuiltInMemoryResul
      * @see java.sql.ResultSet#getLong(int)
      */
     @Override public long getLong(int columnIndex) throws SQLException {
-        return getLong(getFieldName(columnIndex, sql));
+        return getLong(getFieldName(columnIndex, this.sql));
     }
 
     /**
@@ -156,7 +156,7 @@ public abstract class BuiltInMemoryResul
      */
     @Override
     public short getShort(int columnIndex) throws SQLException {
-        return getShort(getFieldName(columnIndex, sql));
+        return getShort(getFieldName(columnIndex, this.sql));
     }
 
     /**
@@ -171,7 +171,7 @@ public abstract class BuiltInMemoryResul
      */
     @Override
     public String getString(int columnIndex) throws SQLException {
-        return(getString(getFieldName(columnIndex, sql)));
+        return(getString(getFieldName(columnIndex, this.sql)));
     }
 
     /**

Modified: sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/resultset/DBFBuiltInMemoryResultSetForColumnsListing.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/resultset/DBFBuiltInMemoryResultSetForColumnsListing.java?rev=1723780&r1=1723779&r2=1723780&view=diff
==============================================================================
--- sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/resultset/DBFBuiltInMemoryResultSetForColumnsListing.java [UTF-8] (original)
+++ sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/resultset/DBFBuiltInMemoryResultSetForColumnsListing.java [UTF-8] Fri Jan  8 18:29:04 2016
@@ -50,7 +50,7 @@ public class DBFBuiltInMemoryResultSetFo
      */
     public DBFBuiltInMemoryResultSetForColumnsListing(DBFStatement stmt, List<DBase3FieldDescriptor> fieldsDescriptors) {
         super(stmt, "driver list columns in this DBase 3 file");
-        itDescriptor = fieldsDescriptors.iterator();
+        this.itDescriptor = fieldsDescriptors.iterator();
     }
 
     /**
@@ -64,21 +64,21 @@ public class DBFBuiltInMemoryResultSetFo
             // String => table name
             case "TABLE_NAME": {
                 String tableName = getTableName();
-                wasNull = (tableName == null);
+                this.wasNull = (tableName == null);
                 return tableName;
             }
 
             // String => column name
             case "COLUMN_NAME": {
-                String columnName = current.getName();
-                wasNull = (columnName == null);
+                String columnName = this.current.getName();
+                this.wasNull = (columnName == null);
                 return columnName;
             }
 
             // String => Data source dependent type name, for a UDT the type name is fully qualified
             case "TYPE_NAME": {
-                String typeName = current.getType() != null ? toColumnTypeName() : null;
-                wasNull = (typeName == null);
+                String typeName = this.current.getType() != null ? toColumnTypeName() : null;
+                this.wasNull = (typeName == null);
                 return typeName;
             }
 
@@ -89,42 +89,42 @@ public class DBFBuiltInMemoryResultSetFo
 
             // String => table catalog (may be null)
             case "TABLE_CAT": {
-                wasNull = true;
+                this.wasNull = true;
                 return null;
             }
 
             // String => table schema (may be null)
             case "TABLE_SCHEM": {
-                wasNull = true;
+                this.wasNull = true;
                 return null;
             }
 
             // String => comment describing column (may be null)
             case "REMARKS":
-                wasNull = true;
+                this.wasNull = true;
                 return null;
 
             // String => default value for the column, which should be interpreted as a string when the value is enclosed in single quotes (may be null)
             case "COLUMN_DEF": {
-                wasNull = true;
+                this.wasNull = true;
                 return null;
             }
 
             // String => catalog of table that is the scope of a reference attribute (null if DATA_TYPE isn't REF)
             case "SCOPE_CATALOG": {
-                wasNull = true;
+                this.wasNull = true;
                 return null;
             }
 
             // String => schema of table that is the scope of a reference attribute (null if the DATA_TYPE isn't REF)
             case "SCOPE_SCHEMA": {
-                wasNull = true;
+                this.wasNull = true;
                 return null;
             }
 
             // String => table name that this the scope of a reference attribute (null if the DATA_TYPE isn't REF)
             case "SCOPE_TABLE": {
-                wasNull = true;
+                this.wasNull = true;
                 return null;
             }
 
@@ -135,7 +135,7 @@ public class DBFBuiltInMemoryResultSetFo
              * empty string --- if it cannot be determined whether the column is auto incremented
              */
             case "IS_AUTOINCREMENT": {
-                wasNull = false;
+                this.wasNull = false;
                 return "NO";
             }
 
@@ -146,7 +146,7 @@ public class DBFBuiltInMemoryResultSetFo
              * empty string --- if it cannot be determined whether this is a generated column
              */
             case "IS_GENERATEDCOLUMN": {
-                wasNull = false;
+                this.wasNull = false;
                 return "NO";
             }
 
@@ -168,20 +168,20 @@ public class DBFBuiltInMemoryResultSetFo
         switch(columnLabel) {
             // int => SQL type from java.sql.Types
             case "DATA_TYPE": {
-                wasNull = false;
+                this.wasNull = false;
                 return toSQLDataType();
             }
 
             // int => column size.
             case "COLUMN_SIZE": {
-                wasNull = false;
+                this.wasNull = false;
                 return toPrecision();
             }
 
             // int => the number of fractional digits. Null is returned for data types where DECIMAL_DIGITS is not applicable.
             case "DECIMAL_DIGITS": {
                 int scale = toScale();
-                wasNull = toScale() == -1;
+                this.wasNull = toScale() == -1;
                 return scale == -1 ? 0 : scale;
             }
 
@@ -197,13 +197,13 @@ public class DBFBuiltInMemoryResultSetFo
              * columnNullableUnknown - nullability unknown
              */
             case "NULLABLE": {
-                wasNull = false;
+                this.wasNull = false;
                 return DatabaseMetaData.columnNullableUnknown;
             }
 
             // int => unused
             case "SQL_DATA_TYPE": {
-                wasNull = false;
+                this.wasNull = false;
                 return toSQLDataType();
             }
 
@@ -218,7 +218,7 @@ public class DBFBuiltInMemoryResultSetFo
 
             // int => index of column in table (starting at 1)
             case "ORDINAL_POSITION": {
-                return columnIndex;
+                return this.columnIndex;
             }
 
             /**
@@ -228,19 +228,19 @@ public class DBFBuiltInMemoryResultSetFo
 
             // short => source type of a distinct type or user-generated Ref type, SQL type from java.sql.Types (null if DATA_TYPE isn't DISTINCT or user-generated REF)
             case "SOURCE_DATA_TYPE": {
-                wasNull = true;
+                this.wasNull = true;
                 return 0;
             }
 
             // is not used.
             case "BUFFER_LENGTH": {
-                wasNull = false;
+                this.wasNull = false;
                 return 0;
             }
 
             // int => unused
             case "SQL_DATETIME_SUB": {
-                wasNull = false;
+                this.wasNull = false;
                 return 0;
             }
 
@@ -257,15 +257,15 @@ public class DBFBuiltInMemoryResultSetFo
      * @see java.sql.ResultSet#next()
      */
     @Override public boolean next() throws SQLNoResultException {
-        if (itDescriptor.hasNext()) {
-            current = itDescriptor.next();
-            columnIndex ++;
+        if (this.itDescriptor.hasNext()) {
+            this.current = this.itDescriptor.next();
+            this.columnIndex ++;
             return true;
         }
         else {
-            if (afterLast) {
+            if (this.afterLast) {
                 // The ResultSet has no more records and has been call one time too much.
-                afterLast = true;
+                this.afterLast = true;
 
                 String message = format(Level.WARNING, "excp.no_more_desc", getTableName());
                 throw new SQLNoResultException(message, "asking columns desc", getFile());
@@ -281,7 +281,7 @@ public class DBFBuiltInMemoryResultSetFo
      * @return SQL Datatype.
      */
     private int toSQLDataType() {
-        switch(current.getType()) {
+        switch(this.current.getType()) {
             case AutoIncrement:
                 return Types.INTEGER;
 
@@ -337,7 +337,7 @@ public class DBFBuiltInMemoryResultSetFo
      * @return Column type name.
      */
     private String toColumnTypeName() {
-        switch(current.getType()) {
+        switch(this.current.getType()) {
             case AutoIncrement:
                 return "AUTO_INCREMENT";
 
@@ -393,11 +393,11 @@ public class DBFBuiltInMemoryResultSetFo
      * @return Precision of the current field.
      */
     public int toPrecision() {
-        switch(current.getType()) {
+        switch(this.current.getType()) {
             case AutoIncrement:
             case Character:
             case Integer:
-               return current.getLength();
+               return this.current.getLength();
 
             case Date:
                 return 8;
@@ -405,7 +405,7 @@ public class DBFBuiltInMemoryResultSetFo
             case Double:
             case FloatingPoint:
             case Number:
-                return current.getLength();
+                return this.current.getLength();
 
             case Logical:
                 return 0;
@@ -413,7 +413,7 @@ public class DBFBuiltInMemoryResultSetFo
             case Currency:
             case DateTime:
             case TimeStamp:
-                return current.getLength();
+                return this.current.getLength();
 
             case Memo:
             case Picture:
@@ -422,7 +422,7 @@ public class DBFBuiltInMemoryResultSetFo
                 return 0;
 
             default:
-                return current.getLength();
+                return this.current.getLength();
         }
     }
 
@@ -431,7 +431,7 @@ public class DBFBuiltInMemoryResultSetFo
      * @return Scale of the current field, -1 means : this field is not numeric.
      */
     private int toScale() {
-        switch(current.getType()) {
+        switch(this.current.getType()) {
             case AutoIncrement:
             case Logical:
                 return 0;
@@ -441,7 +441,7 @@ public class DBFBuiltInMemoryResultSetFo
             case FloatingPoint:
             case Number:
             case Currency:
-                return current.getDecimalCount();
+                return this.current.getDecimalCount();
 
             case Character:
             case Date:

Modified: sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/resultset/DBFBuiltInMemoryResultSetForTablesListing.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/resultset/DBFBuiltInMemoryResultSetForTablesListing.java?rev=1723780&r1=1723779&r2=1723780&view=diff
==============================================================================
--- sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/resultset/DBFBuiltInMemoryResultSetForTablesListing.java [UTF-8] (original)
+++ sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/resultset/DBFBuiltInMemoryResultSetForTablesListing.java [UTF-8] Fri Jan  8 18:29:04 2016
@@ -46,12 +46,12 @@ public class DBFBuiltInMemoryResultSetFo
             case "TABLE_NAME":                // String => table name.
             {
                 String tableName = getTableName();
-                wasNull = (tableName == null);
+                this.wasNull = (tableName == null);
                 return tableName;
             }
 
             case "TABLE_TYPE":                // String => table type. Typical types are "TABLE", "VIEW", "SYSTEM TABLE", "GLOBAL TEMPORARY", "LOCAL TEMPORARY", "ALIAS", "SYNONYM".
-                wasNull = false;
+                this.wasNull = false;
                 return "TABLE";
 
             case "TYPE_NAME":                 // String => type name (may be null)
@@ -62,11 +62,11 @@ public class DBFBuiltInMemoryResultSetFo
             case "TYPE_SCHEM":                // String => the types schema (may be null)
             case "SELF_REFERENCING_COL_NAME": // String => name of the designated "identifier" column of a typed table (may be null)
             case "REF_GENERATION":            // String => specifies how values in SELF_REFERENCING_COL_NAME are created. Values are "SYSTEM", "USER", "DERIVED". (may be null)
-                wasNull = true;
+                this.wasNull = true;
                 return null;
 
             default:
-                wasNull = true;
+                this.wasNull = true;
                 return null;
         }
     }
@@ -78,11 +78,11 @@ public class DBFBuiltInMemoryResultSetFo
     {
         logStep("next");
 
-        if (index > 1) {
+        if (this.index > 1) {
             throw new SQLNoResultException(format(Level.WARNING, "excp.only_one_table_per_dbf"), "Driver manager asks for table listing", getFile());
         }
 
-        index ++;
-        return (index == 1) ? true : false;
+        this.index ++;
+        return (this.index == 1) ? true : false;
     }
 }

Modified: sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/resultset/DBFBuiltInMemoryResultSetForTablesTypesListing.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/resultset/DBFBuiltInMemoryResultSetForTablesTypesListing.java?rev=1723780&r1=1723779&r2=1723780&view=diff
==============================================================================
--- sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/resultset/DBFBuiltInMemoryResultSetForTablesTypesListing.java [UTF-8] (original)
+++ sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/resultset/DBFBuiltInMemoryResultSetForTablesTypesListing.java [UTF-8] Fri Jan  8 18:29:04 2016
@@ -44,15 +44,15 @@ public class DBFBuiltInMemoryResultSetFo
 
         switch(columnLabel) {
             case "OBJECTID":                  // FIXME Documentation of ObjectId for geTabletTypes() has not been found. What are the rules about this field ?
-                wasNull = false;
+                this.wasNull = false;
                 return "1";
 
             case "TABLE_TYPE":                // String => table type. Typical types are "TABLE", "VIEW", "SYSTEM TABLE", "GLOBAL TEMPORARY", "LOCAL TEMPORARY", "ALIAS", "SYNONYM".
-                wasNull = false;
+                this.wasNull = false;
                 return "TABLE";               // and DBase 3 only knows tables.
 
             default:
-                wasNull = true;
+                this.wasNull = true;
                 return null;
         }
     }
@@ -64,11 +64,11 @@ public class DBFBuiltInMemoryResultSetFo
     {
         logStep("next");
 
-        if (index > 1) {
+        if (this.index > 1) {
             throw new SQLNoResultException(format(Level.WARNING, "excp.only_one_table_type_handled"), "Driver manager asks for table types listing", getFile());
         }
 
-        index ++;
-        return (index == 1) ? true : false;
+        this.index ++;
+        return (this.index == 1) ? true : false;
     }
 }




Mime
View raw message