Permalink
Browse files

Removing anoying new backup file generated after each update

  • Loading branch information...
1 parent 0d89d39 commit 8491315630896aee11e66a74885ff3f4e5d8ca42 @uaihebert committed Dec 19, 2016
Showing with 2 additions and 6 deletions.
  1. +1 −1 pom.xml
  2. +1 −5 src/main/java/com/uaihebert/uaimockserver/util/FileUtil.java
View
@@ -4,7 +4,7 @@
<groupId>uaihebert.com</groupId>
<artifactId>uaiMockServer</artifactId>
- <version>1.2.5</version>
+ <version>1.3.0-SNAPSHOT</version>
<name>uaiMockServer</name>
<description>uaiMockServer project that helps with http tests, mocking the services using only a config file
@@ -12,8 +12,6 @@
import java.io.InputStream;
import java.net.URL;
import java.nio.ByteBuffer;
-import java.text.SimpleDateFormat;
-import java.util.Date;
public final class FileUtil {
private static final String FILE_NOT_FOUND_EXCEPTION_MESSAGE = "We could not find the file: [%s]." +
@@ -80,9 +78,7 @@ private static void writeInFile(final UaiMockServerConfig configFile, final Stri
}
private static void createFileBackUp(final String fullPath) throws IOException {
- final String formattedDate = new SimpleDateFormat("yyyy_MM_dd_hh_mm_ss_sss").format(new Date());
-
- FileUtils.copyFile(new File(fullPath), new File(fullPath.replace(".json", "_" + formattedDate + ".back.json")));
+ FileUtils.copyFile(new File(fullPath), new File(fullPath.replace(".json", ".back.json")));
}
public static ByteBuffer getFileAsByteBuffer(String bodyPath) {

0 comments on commit 8491315

Please sign in to comment.