no message
This commit is contained in:
@@ -6,9 +6,11 @@ import ProjectData.Files.FileState;
|
||||
import ProjectData.Files.FileType;
|
||||
import ProjectData.Files.ProjectFile;
|
||||
import com.google.gson.annotations.Expose;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.Serializable;
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Vector;
|
||||
@@ -68,11 +70,7 @@ public class SapforVersion_json implements Serializable {
|
||||
}
|
||||
}
|
||||
public boolean isMatch(SapforVersion_json version_json) {
|
||||
if (!version.equals(version_json.version)) {
|
||||
System.out.println("не совпадение имени версии");
|
||||
return false;
|
||||
}
|
||||
if (description.equals(version_json.description)) {
|
||||
if (!description.equals(version_json.description)) {
|
||||
System.out.println("не совпадение описания версии");
|
||||
return false;
|
||||
}
|
||||
@@ -80,6 +78,33 @@ public class SapforVersion_json implements Serializable {
|
||||
System.out.println("не совпадение количества файлов");
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
for (String name1 : files.keySet()) {
|
||||
if (!version_json.files.containsKey(name1)) {
|
||||
System.out.println("Файл " + Utils.Brackets(name1) + " не найден в версии " + version_json.Home);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
for (String name1 : files.keySet()) {
|
||||
ProjectFile file1 = files.get(name1);
|
||||
ProjectFile file2 = version_json.files.get(name1);
|
||||
//---
|
||||
String text1 = "";
|
||||
String text2 = "";
|
||||
try {
|
||||
text1 = FileUtils.readFileToString(file1.file, Charset.defaultCharset());
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
try {
|
||||
text2 = FileUtils.readFileToString(file2.file, Charset.defaultCharset());
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
if (!text1.equals(text2)) {
|
||||
System.out.println("различие текста файла " + Utils.Brackets(file1.file.getName()));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user