Skip to content

Commit 3bfc37a

Browse files
committed
Cosmetic naming update; removing useless comments.
1 parent 5838fe3 commit 3bfc37a

File tree

8 files changed

+39
-31
lines changed

8 files changed

+39
-31
lines changed

src/main/java/nsusbloader/cli/CommandLineInterface.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,34 +55,34 @@ public CommandLineInterface(String[] args) {
5555
}
5656
if (cli.hasOption("n") || cli.hasOption("tfn")){
5757
final String[] arguments = cli.getOptionValues("tfn");
58-
new TinfoilNet(arguments);
58+
new TinfoilNetCli(arguments);
5959
return;
6060
}
6161
if (cli.hasOption("t") || cli.hasOption("tinfoil")){
6262
final String[] arguments = cli.getOptionValues("tinfoil");
63-
new TinfoilUsb(arguments);
63+
new TinfoilUsbCli(arguments);
6464
return;
6565
}
6666
if (cli.hasOption("g") || cli.hasOption("goldleaf")){
6767
final String[] arguments = cli.getOptionValues("goldleaf");
68-
new GoldLeaf(arguments);
68+
new GoldLeafCli(arguments);
6969
return;
7070
}
7171
/*
7272
if (cli.hasOption("x") || cli.hasOption("nxdt")){
7373
final String[] arguments = cli.getOptionValues("nxdt");
74-
new NXDT(arguments);
74+
new NxdtCli(arguments);
7575
return;
7676
}
7777
*/
7878
if (cli.hasOption("s") || cli.hasOption("split")){
7979
final String[] arguments = cli.getOptionValues("split");
80-
new Split(arguments);
80+
new SplitCli(arguments);
8181
return;
8282
}
8383
if (cli.hasOption("m") || cli.hasOption("merge")){
8484
final String[] arguments = cli.getOptionValues("merge");
85-
new Merge(arguments);
85+
new MergeCli(arguments);
8686
return;
8787
}
8888
}

src/main/java/nsusbloader/cli/GoldLeaf.java renamed to src/main/java/nsusbloader/cli/GoldLeafCli.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import java.util.ArrayList;
2626
import java.util.List;
2727

28-
public class GoldLeaf {
28+
public class GoldLeafCli {
2929

3030
private final String[] arguments;
3131
private List<File> filesList;
@@ -34,7 +34,7 @@ public class GoldLeaf {
3434

3535
private int parseFileSince = 1;
3636

37-
public GoldLeaf(String[] arguments) throws InterruptedException, IncorrectSetupException{
37+
public GoldLeafCli(String[] arguments) throws InterruptedException, IncorrectSetupException{
3838
this.arguments = arguments;
3939

4040
checkArguments();

src/main/java/nsusbloader/cli/Merge.java renamed to src/main/java/nsusbloader/cli/MergeCli.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@
2525
import java.util.ArrayList;
2626
import java.util.List;
2727

28-
public class Merge {
28+
public class MergeCli {
2929

3030
private String[] arguments;
3131
private String saveTo;
3232
private String[] splitFiles;
3333

34-
Merge(String[] arguments) throws InterruptedException, IncorrectSetupException{
34+
MergeCli(String[] arguments) throws InterruptedException, IncorrectSetupException{
3535
this.arguments = arguments;
3636
checkArguments();
3737
parseArguments();

src/main/java/nsusbloader/cli/NXDT.java renamed to src/main/java/nsusbloader/cli/NxdtCli.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@
2222

2323
import java.io.File;
2424

25-
public class NXDT {
25+
public class NxdtCli {
2626

2727
private final String[] arguments;
2828
private String saveTo;
2929

30-
public NXDT(String[] arguments) throws InterruptedException, IncorrectSetupException{
30+
public NxdtCli(String[] arguments) throws InterruptedException, IncorrectSetupException{
3131
this.arguments = arguments;
3232
parseArgument();
3333
runBackend();

src/main/java/nsusbloader/cli/RcmCli.java

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
1+
/*
2+
Copyright 2019-2020 Dmitry Isaenko
3+
4+
This file is part of NS-USBloader.
5+
6+
NS-USBloader is free software: you can redistribute it and/or modify
7+
it under the terms of the GNU General Public License as published by
8+
the Free Software Foundation, either version 3 of the License, or
9+
(at your option) any later version.
10+
11+
NS-USBloader is distributed in the hope that it will be useful,
12+
but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
GNU General Public License for more details.
15+
16+
You should have received a copy of the GNU General Public License
17+
along with NS-USBloader. If not, see <https://www.gnu.org/licenses/>.
18+
*/
119
package nsusbloader.cli;
220

21+
import nsusbloader.Utilities.Rcm;
22+
323
import java.io.File;
424

525
public class RcmCli {
@@ -8,19 +28,7 @@ public class RcmCli {
828
}
929

1030
private void runBackend(String payload) throws InterruptedException{
11-
/*
12-
boolean isWindows = System.getProperty("os.name").toLowerCase().replace(" ", "").contains("windows");
13-
14-
if (isWindows) {
15-
if (! payload.matches("^.:\\\\.*$"))
16-
payload = System.getProperty("user.dir") + File.separator + payload;
17-
}
18-
else {
19-
if (! payload.startsWith("/"))
20-
payload = System.getProperty("user.dir") + File.separator + payload;
21-
}
22-
*/
23-
nsusbloader.Utilities.Rcm rcm = new nsusbloader.Utilities.Rcm(payload);
31+
Rcm rcm = new nsusbloader.Utilities.Rcm(payload);
2432
Thread rcmThread = new Thread(rcm);
2533
rcmThread.start();
2634
rcmThread.join();

src/main/java/nsusbloader/cli/Split.java renamed to src/main/java/nsusbloader/cli/SplitCli.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@
2525
import java.util.ArrayList;
2626
import java.util.List;
2727

28-
public class Split {
28+
public class SplitCli {
2929

3030
private String[] arguments;
3131
private String saveTo;
3232
private String[] files;
3333

34-
Split(String[] arguments) throws InterruptedException, IncorrectSetupException{
34+
SplitCli(String[] arguments) throws InterruptedException, IncorrectSetupException{
3535
this.arguments = arguments;
3636
checkArguments();
3737
parseArguments();

src/main/java/nsusbloader/cli/TinfoilNet.java renamed to src/main/java/nsusbloader/cli/TinfoilNetCli.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import java.util.ArrayList;
2525
import java.util.List;
2626

27-
public class TinfoilNet {
27+
public class TinfoilNetCli {
2828

2929
private final String[] arguments;
3030

@@ -38,7 +38,7 @@ public class TinfoilNet {
3838

3939
private List<File> filesList;
4040

41-
TinfoilNet(String[] arguments) throws InterruptedException, IncorrectSetupException{
41+
TinfoilNetCli(String[] arguments) throws InterruptedException, IncorrectSetupException{
4242
this.arguments = arguments;
4343
checkArguments();
4444
parseNsIP();

src/main/java/nsusbloader/cli/TinfoilUsb.java renamed to src/main/java/nsusbloader/cli/TinfoilUsbCli.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@
2424
import java.util.ArrayList;
2525
import java.util.List;
2626

27-
public class TinfoilUsb {
27+
public class TinfoilUsbCli {
2828

2929
private final String[] arguments;
3030
private List<File> filesList;
3131

32-
public TinfoilUsb(String[] arguments) throws InterruptedException, IncorrectSetupException{
32+
public TinfoilUsbCli(String[] arguments) throws InterruptedException, IncorrectSetupException{
3333
this.arguments = arguments;
3434
checkArguments();
3535
parseFilesArguments();

0 commit comments

Comments
 (0)