Skip to content

Commit

Permalink
fix compiler problem with Java 8
Browse files Browse the repository at this point in the history
  • Loading branch information
volker committed Jul 20, 2023
1 parent 3f6dcb1 commit 91291d1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/test/java/com/inet/sass/AbstractTestBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
package com.inet.sass;

import java.io.File;
import java.io.FileReader;
import java.io.FileInputStream;
import java.io.IOException;
import java.net.URISyntaxException;
import java.nio.charset.StandardCharsets;
Expand Down Expand Up @@ -69,7 +69,7 @@ public String getFileContent(String filename) throws IOException, URISyntaxExcep
* when file reading fails
*/
public String getFileContent(File file) throws IOException {
return IOUtils.toString( new FileReader( file, StandardCharsets.UTF_8 ) );
return IOUtils.toString( new FileInputStream( file ), "UTF-8" );
}

public ScssStylesheet testParser(String file) throws IOException, URISyntaxException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
package com.inet.sass.testcases.scss;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.net.URISyntaxException;
import java.net.URL;
Expand Down Expand Up @@ -96,7 +96,7 @@ public void compareScssWithCss(String scssResourceName) throws Exception {
String parsedCss = scssStylesheet.printState();

if (getCssFile(scssFile) != null) {
String referenceCss = IOUtils.toString( new FileReader( getCssFile( scssFile ), StandardCharsets.UTF_8 ) );
String referenceCss = IOUtils.toString( new FileInputStream( getCssFile( scssFile ) ), "UTF-8" );
String normalizedReference = normalize(referenceCss);
String normalizedParsed = normalize(parsedCss);

Expand Down

0 comments on commit 91291d1

Please sign in to comment.