You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by tv...@apache.org on 2020/03/17 16:03:47 UTC
[commons-jcs] branch master updated: Fix NoSuchFileException
This is an automated email from the ASF dual-hosted git repository.
tv pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-jcs.git
The following commit(s) were added to refs/heads/master by this push:
new 366e4f0 Fix NoSuchFileException
366e4f0 is described below
commit 366e4f001aaa72cf489f25d642ff88648a81a3fe
Author: Thomas Vandahl <tv...@apache.org>
AuthorDate: Tue Mar 17 17:03:42 2020 +0100
Fix NoSuchFileException
---
.../auxiliary/disk/block/BlockDiskUnitTest.java | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/commons-jcs-core/src/test/java/org/apache/commons/jcs/auxiliary/disk/block/BlockDiskUnitTest.java b/commons-jcs-core/src/test/java/org/apache/commons/jcs/auxiliary/disk/block/BlockDiskUnitTest.java
index ceee8ca..cf95502 100644
--- a/commons-jcs-core/src/test/java/org/apache/commons/jcs/auxiliary/disk/block/BlockDiskUnitTest.java
+++ b/commons-jcs-core/src/test/java/org/apache/commons/jcs/auxiliary/disk/block/BlockDiskUnitTest.java
@@ -1,5 +1,11 @@
package org.apache.commons.jcs.auxiliary.disk.block;
+import java.io.File;
+import java.io.IOException;
+import java.util.Random;
+
+import org.apache.commons.jcs.utils.serialization.StandardSerializer;
+
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -20,12 +26,6 @@ package org.apache.commons.jcs.auxiliary.disk.block;
*/
import junit.framework.TestCase;
-import org.apache.commons.jcs.utils.serialization.StandardSerializer;
-
-import java.io.File;
-import java.io.IOException;
-import java.nio.file.Files;
-import java.util.Random;
/**
* Test for the disk access layer of the Block Disk Cache.
@@ -55,17 +55,17 @@ public class BlockDiskUnitTest
private void setUpBlockDisk(String fileName) throws IOException
{
File file = new File(rafDir, fileName + ".data");
- Files.delete(file.toPath());
+ file.delete();
this.disk = new BlockDisk(file, new StandardSerializer());
}
-
+
private void setUpBlockDisk(String fileName, int blockSize) throws IOException
{
File file = new File(rafDir, fileName + ".data");
- Files.delete(file.toPath());
+ file.delete();
this.disk = new BlockDisk(file, blockSize, new StandardSerializer());
}
-
+
/**
* @see junit.framework.TestCase#tearDown()
*/
@@ -357,7 +357,7 @@ public class BlockDiskUnitTest
assertEquals( "Wrong item retured.", string, result );
}
- public void testJCS156() throws Exception
+ public void testJCS156() throws Exception
{
// SETUP
setUpBlockDisk("testJCS156", 4096);