diff --git a/pom.xml b/pom.xml index 7864e17..641ed59 100644 --- a/pom.xml +++ b/pom.xml @@ -157,5 +157,15 @@ + + + org.apache.maven.plugins + maven-compiler-plugin + + 11 + 11 + + + diff --git a/src/main/java/com/jamesquinley/DelegationServices/delegationServices.java b/src/main/java/com/jamesquinley/DelegationServices/delegationServices.java index e2faab6..c15f442 100644 --- a/src/main/java/com/jamesquinley/DelegationServices/delegationServices.java +++ b/src/main/java/com/jamesquinley/DelegationServices/delegationServices.java @@ -1414,16 +1414,7 @@ public class delegationServices { try { File homedir = new File(System.getProperty("user.home")); - String fileName = homedir + "/ocs/policy/launcher/legal/eula.txt"; - Path path = Paths.get(fileName); - byte[] bytes = Files.readAllBytes(path); - List allLines = Files.readAllLines(path, StandardCharsets.UTF_8); - String formattedString = allLines.toString() - .replace("[", "") //remove the right bracket - .replace("]", "") //remove the left bracket - .replace(",", "") - .trim(); //remove trailing spaces from partially initialized arrays - policyDocument = formattedString; + policyDocument = Files.readString(Path.of(homedir + "/ocs/policy/launcher/legal/eula.txt")); } catch (Exception EXR) { @@ -1454,16 +1445,7 @@ public class delegationServices { try { File homedir = new File(System.getProperty("user.home")); - String fileName = homedir + "/ocs/policy/launcher/legal/accountagreement.txt"; - Path path = Paths.get(fileName); - byte[] bytes = Files.readAllBytes(path); - List allLines = Files.readAllLines(path, StandardCharsets.UTF_8); - String formattedString = allLines.toString() - .replace("[", "") //remove the right bracket - .replace("]", "") //remove the left bracket - .replace(",", "") - .trim(); //remove trailing spaces from partially initialized arrays - policyDocument = formattedString; + policyDocument = Files.readString(Path.of(homedir + "/ocs/policy/launcher/legal/eula.txt")); } catch (Exception EXR) {