@@ -140,10 +140,10 @@ public void testUseAttributesFromTarArchiveInputInTarArchiverOutput()
140140 PlexusIoResourceAttributes fileAttributes =
141141 PlexusIoResourceAttributeUtils .getFileAttributes ( new File ( tempTarDir , tempFile .getName () ) );
142142
143- final String expected = Java7Reflector .isAtLeastJava7 () ? "660" : "644" ;
143+ final int expected = Java7Reflector .isAtLeastJava7 () ? 0660 : 0644 ;
144144
145145 assertEquals ( "This test will fail if your umask is not X2X (or more)" ,
146- expected , fileAttributes .getOctalModeString () );
146+ expected , fileAttributes .getOctalMode () );
147147 }
148148
149149 public void testUseDetectedFileAttributes ()
@@ -203,10 +203,10 @@ public void testUseDetectedFileAttributes()
203203
204204 fileAttributes = PlexusIoResourceAttributeUtils .getFileAttributes ( new File ( tempTarDir , tempFile .getName () ) );
205205
206- final String expected = Java7Reflector .isAtLeastJava7 () ? "440" : "444" ;
206+ final int expected = Java7Reflector .isAtLeastJava7 () ? 0440 : 0444 ;
207207
208208 assertEquals ( "This test will fail if your umask is not X2X (or more)" ,
209- expected , fileAttributes .getOctalModeString () );
209+ expected , fileAttributes .getOctalMode () );
210210 }
211211
212212 private boolean checkForWindows ()
@@ -268,10 +268,10 @@ public void testOverrideDetectedFileAttributes()
268268 PlexusIoResourceAttributes fileAttributes =
269269 PlexusIoResourceAttributeUtils .getFileAttributes ( new File ( tempTarDir , tempFile .getName () ) );
270270
271- final String expected = Java7Reflector .isAtLeastJava7 () ? "660" : "644" ;
271+ final int expected = Java7Reflector .isAtLeastJava7 () ? 0660 : 0644 ;
272272
273273 assertEquals ( "This test will fail if your umask is not X2X (or more)" ,
274- expected , fileAttributes .getOctalModeString () );
274+ expected , fileAttributes .getOctalMode () );
275275 }
276276
277277 private TarArchiver getPosixCompliantTarArchiver () throws Exception {
@@ -334,9 +334,9 @@ public void testOverrideDetectedFileAttributesUsingFileMode()
334334 PlexusIoResourceAttributes fileAttributes =
335335 PlexusIoResourceAttributeUtils .getFileAttributes ( new File ( tempTarDir , tempFile .getName () ) );
336336
337- final String expected = Java7Reflector .isAtLeastJava7 () ? "660" : "644" ;
337+ final int expected = Java7Reflector .isAtLeastJava7 () ? 0660 : 0644 ;
338338 assertEquals ( "This test will fail if your umask is not X2X (or more)" ,
339- expected , fileAttributes .getOctalModeString () );
339+ expected , fileAttributes .getOctalMode () );
340340 }
341341
342342}
0 commit comments