]> source.dussan.org Git - jackcess.git/commitdiff
merge trunk changes through r1241
authorJames Ahlborn <jtahlborn@yahoo.com>
Mon, 17 Dec 2018 23:21:35 +0000 (23:21 +0000)
committerJames Ahlborn <jtahlborn@yahoo.com>
Mon, 17 Dec 2018 23:21:35 +0000 (23:21 +0000)
git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/branches/jdk8@1242 f203690c-595d-4dc9-a70b-905162fa7fd2

1  2 
src/main/java/com/healthmarketscience/jackcess/expr/package-info.java
src/main/java/com/healthmarketscience/jackcess/impl/ColumnImpl.java
src/main/java/com/healthmarketscience/jackcess/impl/DatabaseImpl.java
src/main/java/com/healthmarketscience/jackcess/impl/expr/DefaultTextFunctions.java
src/main/java/com/healthmarketscience/jackcess/util/CustomLinkResolver.java
src/test/java/com/healthmarketscience/jackcess/util/CustomLinkResolverTest.java

index c5f54819a68a986586e1745e84444b008331fc69,bb74bba12edd468d5467d5562f5e8fabc23ce6cc..dcd4e1817d429f908d29d922327915b23802a18a
@@@ -259,9 -252,11 +259,11 @@@ public class DatabaseImpl implements Da
      Pattern.compile("[\\p{Cntrl}.!`\\]\\[]");
  
    /** the File of the database */
 -  private final File _file;
 +  private final Path _file;
    /** the simple name of the database */
    private final String _name;
+   /** whether or not this db is read-only */
+   private final boolean _readOnly;
    /** Buffer to hold database pages */
    private ByteBuffer _buffer;
    /** ID of the Tables system object */
     * @param charset Charset to use, if {@code null}, uses default
     * @param timeZone TimeZone to use, if {@code null}, uses default
     */
 -  protected DatabaseImpl(File file, FileChannel channel, boolean closeChannel,
 +  protected DatabaseImpl(Path file, FileChannel channel, boolean closeChannel,
                           boolean autoSync, FileFormat fileFormat, Charset charset,
-                          TimeZone timeZone, CodecProvider provider)
+                          TimeZone timeZone, CodecProvider provider,
+                          boolean readOnly)
      throws IOException
    {
      _file = file;
index 0463b2d999681370b91f1de417f5e79233d74b04,fce528945d26382e082d878651af04ce9e9c3141..1dc0b80d338bfd4c2686613c60ee997a992fdeb7
@@@ -159,10 -161,11 +162,11 @@@ public abstract class CustomLinkResolve
     * @return the temp db for holding the linked table info
     */
    protected Database createTempDb(Object customFile, FileFormat format,
-                                   boolean inMemory, Path tempDir)
 -                                  boolean inMemory, File tempDir,
++                                  boolean inMemory, Path tempDir,
+                                   boolean readOnly)
      throws IOException
    {
 -    File dbFile = null;
 +    Path dbFile = null;
      FileChannel channel = null;
      boolean success = false;
      try {
      private final Object _customFile;
  
      protected TempDatabaseImpl(CustomLinkResolver resolver, Object customFile,
 -                               File file, FileChannel channel,
 +                               Path file, FileChannel channel,
-                                FileFormat fileFormat)
+                                FileFormat fileFormat, boolean readOnly)
        throws IOException
      {
-       super(file, channel, true, false, fileFormat, null, null, null);
+       super(file, channel, true, false, fileFormat, null, null, null,
+             readOnly);
        _resolver = resolver;
        _customFile = customFile;
      }
index b2dfc06fd28bab6e587d893e9f71da3e490a78c0,87f8e6fcfa5142c7d8e986fcfa4db3a983ca2709..d0446b204f1531d84da7201fe57c01ab1dbbdcd6
@@@ -149,7 -149,8 +149,8 @@@ public class CustomLinkResolverTest ext
  
      @Override
      protected Database createTempDb(Object customFile, FileFormat format,
-                                     boolean inMemory, Path tempDir)
 -                                    boolean inMemory, File tempDir,
++                                    boolean inMemory, Path tempDir,
+                                     boolean readOnly)
        throws IOException
      {
        inMemory = "testFile1.txt".equals(customFile);