File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
main/java/org/apache/commons/compress/archivers/tar
test/java/org/apache/commons/compress/archivers/tar Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 53
53
import org .apache .commons .compress .utils .ParsingUtils ;
54
54
import org .apache .commons .compress .utils .TimeUtils ;
55
55
import org .apache .commons .io .file .attribute .FileTimes ;
56
+ import org .apache .commons .lang3 .SystemProperties ;
56
57
57
58
/**
58
59
* This class represents an entry in a Tar archive. It consists of the entry's header, as well as the entry's File. Entries can be instantiated in one of three
@@ -227,7 +228,7 @@ private static FileTime fileTimeFromOptionalSeconds(final long seconds) {
227
228
*/
228
229
private static String normalizeFileName (String fileName , final boolean preserveAbsolutePath ) {
229
230
if (!preserveAbsolutePath ) {
230
- final String property = System . getProperty ( "os.name" );
231
+ final String property = SystemProperties . getOsName ( );
231
232
if (property != null ) {
232
233
final String osName = property .toLowerCase (Locale .ROOT );
233
234
Original file line number Diff line number Diff line change 44
44
45
45
import org .apache .commons .compress .AbstractTest ;
46
46
import org .apache .commons .compress .archivers .zip .ZipEncodingHelper ;
47
+ import org .apache .commons .lang3 .SystemProperties ;
47
48
import org .junit .jupiter .api .Test ;
48
49
import org .junit .jupiter .api .condition .EnabledOnOs ;
49
50
50
51
public class TarArchiveEntryTest implements TarConstants {
51
52
52
- private static final String OS = System . getProperty ( "os.name" ).toLowerCase (Locale .ENGLISH );
53
+ private static final String OS = SystemProperties . getOsName ( ).toLowerCase (Locale .ROOT );
53
54
private static final String ROOT = OS .startsWith ("windows" ) || OS .startsWith ("netware" ) ? "C:\\ " : "/" ;
54
55
55
56
private void assertGnuMagic (final TarArchiveEntry t ) {
You can’t perform that action at this time.
0 commit comments