Replaces with more efficient way of file retrieval.
This commit is contained in:
parent
be812630ea
commit
7d62ce06df
10
pom.xml
10
pom.xml
@ -157,5 +157,15 @@
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>11</source>
|
||||
<target>11</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
@ -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<String> 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<String> 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)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user