Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue #29780: reintroduce fix for GVT failure #29785

Open
wants to merge 1 commit into
base: integration
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
import java.io.BufferedInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
Expand Down Expand Up @@ -267,7 +269,14 @@ static LogSearchResult findStringsInFileCommon(List<String> regexpList,
totalSkipped += skipped;
}

UnbufferedInputStreamReader rawReader = new UnbufferedInputStreamReader(input, fileToSearch.getEncoding());
// UTF-8 by default so that GVT tests doesn't fail in non English locale
OperatingSystem os = fileToSearch.getMachine().getOperatingSystem();
Charset fileEncoding = StandardCharsets.UTF_8;
if (os == OperatingSystem.ZOS) {
fileEncoding = fileToSearch.getEncoding();
}

UnbufferedInputStreamReader rawReader = new UnbufferedInputStreamReader(input, fileEncoding);
reader = new LineReader(rawReader);

Log.finer(CLASS, method, "Now looking for strings " + regexpList
Expand Down