Resolve IDE warnings.

master
Ivan Olexyn 6 years ago
parent d43e79babd
commit 25f4262816

@ -4,11 +4,11 @@ import java.io.File;
public class Artifacts { public class Artifacts {
Tools tools = new Tools(); private Tools tools = new Tools();
/** /**
* @param file * @param file <i>File</i>
* @return * @return file with md5 field
*/ */
public MFile getMFile(File file) { public MFile getMFile(File file) {
MFile mfile = new MFile(); MFile mfile = new MFile();

@ -1,10 +1,8 @@
package app; package app;
import javafx.beans.property.StringProperty;
import javafx.concurrent.Task; import javafx.concurrent.Task;
import javafx.fxml.FXML; import javafx.fxml.FXML;
import javafx.scene.control.*; import javafx.scene.control.*;
import javafx.scene.control.cell.PropertyValueFactory;
import javafx.scene.text.Text; import javafx.scene.text.Text;
@ -55,7 +53,7 @@ public class Controller {
Task<Void> loadDirTask = new Task<Void>() { Task<Void> loadDirTask = new Task<Void>() {
@Override @Override
public Void call() throws Exception { public Void call() {
loadDirState.setText(""); loadDirState.setText("");
calcMd5State.setText(""); calcMd5State.setText("");
@ -103,7 +101,7 @@ public class Controller {
Task<Void> delDoubleTask = new Task<Void>() { Task<Void> delDoubleTask = new Task<Void>() {
@Override @Override
public Void call() throws Exception { public Void call() {
for (int i = 0; i < doubles.size(); i++) { for (int i = 0; i < doubles.size(); i++) {
new Execute().execute(new String[]{"rm", doubles.get(i).file.getAbsolutePath()}); new Execute().execute(new String[]{"rm", doubles.get(i).file.getAbsolutePath()});

@ -2,12 +2,8 @@ package app;
import javafx.application.Application; import javafx.application.Application;
import javafx.fxml.FXMLLoader; import javafx.fxml.FXMLLoader;
import javafx.geometry.Insets;
import javafx.scene.Parent; import javafx.scene.Parent;
import javafx.scene.Scene; import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.TextField;
import javafx.scene.layout.GridPane;
import javafx.stage.Stage; import javafx.stage.Stage;

@ -4,7 +4,7 @@ import app.Artifacts.MFile;
import java.util.Map; import java.util.Map;
public class QuicksortMd5 { class QuicksortMd5 {
private Map<Integer, MFile> md5Pool; private Map<Integer, MFile> md5Pool;
private int i; private int i;
private int j; private int j;

@ -10,15 +10,13 @@ import java.util.Map;
import app.Artifacts.MFile; import app.Artifacts.MFile;
public class Routines { class Routines {
Execute x; private final Execute x;
Tools tools;
public Routines() { public Routines() {
this.x = new Execute(); this.x = new Execute();
this.tools = new Tools();
} }
@ -43,10 +41,10 @@ public class Routines {
e.printStackTrace(); e.printStackTrace();
} }
// [3] // [3]
Map<Integer, File> filepool = new HashMap<Integer, File>(); Map<Integer, File> filepool = new HashMap<>();
int j = 0; int j = 0;
for (int i = 0; i < lines.size(); i++) { for (String line : lines) {
File file = new File(lines.get(i)); File file = new File(line);
if (type == "dir" && file.isDirectory() || type == "file" && file.isFile()) { if (type == "dir" && file.isDirectory() || type == "file" && file.isFile()) {
filepool.put(j, file); filepool.put(j, file);
j++; j++;

@ -3,9 +3,9 @@ package app;
import java.io.BufferedReader; import java.io.BufferedReader;
import java.io.IOException; import java.io.IOException;
public class Tools { class Tools {
Execute x; private final Execute x;
public Tools() { public Tools() {
x = new Execute(); x = new Execute();

@ -7,7 +7,7 @@ import java.util.Map;
import app.Artifacts.MFile; import app.Artifacts.MFile;
public class Write { class Write {
/** /**
* Write <b>text</b> to file at <b>path</b> . * Write <b>text</b> to file at <b>path</b> .

@ -1,11 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<?import java.lang.*?>
<?import java.util.*?>
<?import javafx.scene.*?>
<?import javafx.scene.control.*?> <?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?> <?import javafx.scene.layout.*?>
<?import java.net.*?>
<?import javafx.geometry.*?> <?import javafx.geometry.*?>
<?import javafx.scene.control.*?> <?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?> <?import javafx.scene.layout.*?>
@ -38,7 +35,6 @@
/> />
<Text fx:id="loadDirState" <Text fx:id="loadDirState"
text=""
GridPane.rowIndex="1" GridPane.rowIndex="1"
GridPane.columnIndex="1" GridPane.columnIndex="1"
/> />
@ -50,7 +46,6 @@
/> />
<Text fx:id="calcMd5State" <Text fx:id="calcMd5State"
text=""
GridPane.rowIndex="2" GridPane.rowIndex="2"
GridPane.columnIndex="1" GridPane.columnIndex="1"
/> />
@ -62,7 +57,6 @@
/> />
<Text fx:id="sortFileState" <Text fx:id="sortFileState"
text=""
GridPane.rowIndex="3" GridPane.rowIndex="3"
GridPane.columnIndex="1" GridPane.columnIndex="1"
/> />
@ -74,7 +68,6 @@
/> />
<Text fx:id="findDoubleState" <Text fx:id="findDoubleState"
text=""
GridPane.rowIndex="4" GridPane.rowIndex="4"
GridPane.columnIndex="1" GridPane.columnIndex="1"
/> />
@ -86,7 +79,6 @@
/> />
<Text fx:id="delDoubleState" <Text fx:id="delDoubleState"
text=""
GridPane.rowIndex="5" GridPane.rowIndex="5"
GridPane.columnIndex="1" GridPane.columnIndex="1"
/> />

Loading…
Cancel
Save