Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/main/java/the/bytecode/club/bytecodeviewer/Constants.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

/***************************************************************************
* Bytecode Viewer (BCV) - Java & Android Reverse Engineering Suite *
* Copyright (C) 2014 Konloch - Konloch.com / BytecodeViewer.com *
Expand All @@ -20,6 +21,7 @@

import java.io.File;
import java.io.PrintStream;
import java.nio.file.FileSystems;

import org.objectweb.asm.Opcodes;
import the.bytecode.club.bytecodeviewer.resources.ResourceType;
Expand Down Expand Up @@ -66,8 +68,8 @@ public class Constants
//if true the version checker will prompt and ask how you would like to proceed
public static final boolean FORCE_VERSION_CHECKER_PROMPT = false;

public static final String fs = System.getProperty("file.separator");
public static final String nl = System.getProperty("line.separator");
public static final String fs = FileSystems.getDefault().getSeparator();
public static final String nl = System.lineSeparator();

public static final File BCVDir = resolveBCVRoot();
public static final File RT_JAR = new File(System.getProperty("java.home") + fs + "lib" + fs + "rt.jar");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public byte[] compile(String contents, String fullyQualifiedName)
Configuration.javac,
"-d", fileStart2,
"-classpath",
cp.getAbsolutePath() + System.getProperty("path.separator") + Configuration.library,
cp.getAbsolutePath() + File.pathSeparator + Configuration.library,
java.getAbsolutePath()
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ public String readProcess(Process process) throws IOException

while ((line = reader.readLine()) != null) {
builder.append(line);
builder.append(System.getProperty("line.separator"));
builder.append(System.lineSeparator());
}

return builder.toString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class NewlineOutputStream extends FilterOutputStream {
public NewlineOutputStream(OutputStream os) {
super(os);
if (newline == null) {
String s = System.getProperty("line.separator");
String s = System.lineSeparator();
if (s == null || s.length() <= 0)
s = "\n";
newline = s.getBytes(StandardCharsets.ISO_8859_1); // really us-ascii
Expand Down