Skip to content

Commit 4ccfb60

Browse files
committed
General code quality changes
1 parent 8e80a0b commit 4ccfb60

3 files changed

Lines changed: 4 additions & 8 deletions

File tree

src/main/java/me/konloch/kontainer/io/DiskReader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public synchronized static String loadAsString(String fileName) throws Exception
6464
try (FileReader fr = new FileReader(fileName);
6565
BufferedReader reader = new BufferedReader(fr)) {
6666
for (String add = reader.readLine(); add != null; add = reader.readLine()) {
67-
s.append(EncodeUtils.unicodeToString(add)).append(System.getProperty("line.separator"));
67+
s.append(EncodeUtils.unicodeToString(add)).append(System.lineSeparator());
6868
}
6969
}
7070

src/main/java/the/bytecode/club/bytecodeviewer/gui/components/RunOptions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public RunOptions()
7979
getContentPane().add(mainMethodFQN);
8080
mainMethodFQN.setColumns(10);
8181

82-
JLabel lblNewLabel = new JLabel("Debug Classes (Seperate with , ):");
82+
JLabel lblNewLabel = new JLabel("Debug Classes (Separated with , ):");
8383
lblNewLabel.setBounds(10, 89, 228, 14);
8484
getContentPane().add(lblNewLabel);
8585

src/main/java/the/bytecode/club/bytecodeviewer/plugin/strategies/JavaPluginLaunchStrategy.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package the.bytecode.club.bytecodeviewer.plugin.strategies;
22

33
import java.io.File;
4-
import me.konloch.kontainer.io.DiskReader;
54
import org.codehaus.janino.SimpleCompiler;
65
import the.bytecode.club.bytecodeviewer.api.Plugin;
76
import the.bytecode.club.bytecodeviewer.plugin.PluginLaunchStrategy;
@@ -35,13 +34,10 @@ public class JavaPluginLaunchStrategy implements PluginLaunchStrategy
3534
@Override
3635
public Plugin run(File file) throws Throwable
3736
{
38-
SimpleCompiler compiler = new SimpleCompiler();
39-
40-
//compile the Java source
41-
compiler.cook(DiskReader.loadAsString(file.getAbsolutePath()));
37+
SimpleCompiler compiler = new SimpleCompiler(file.getCanonicalPath());
4238

4339
//debug
44-
System.out.println(file.getName().substring(0, file.getName().length() - (".java".length())));
40+
//System.out.println(file.getName().substring(0, file.getName().length() - (".java".length())));
4541

4642
//get the class object from the compiler classloader
4743
Class<?> clazz = Class.forName(

0 commit comments

Comments
 (0)