Skip to content

Commit

Permalink
[SHRINKWRAP-441] FileStoreTestCase.usedSpace failed under windows due…
Browse files Browse the repository at this point in the history
… to wrong separator char
  • Loading branch information
mmatloka authored and ALRubinger committed Feb 14, 2013
1 parent ac382c0 commit 7e1dd1e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import java.nio.file.attribute.FileStoreAttributeView;
import java.util.logging.Logger;

import org.jboss.shrinkwrap.api.ArchivePath;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.asset.Asset;
import org.jboss.shrinkwrap.api.nio.file.ShrinkWrapFileSystems;
Expand Down Expand Up @@ -77,8 +78,7 @@ public void usedSpace() throws IOException {
archive.addClass(classToAdd);

// Get size of the class
final String pathToClass = new StringBuilder(classToAdd.getName().replace('.', File.separatorChar)).append(
".class").toString();
final String pathToClass = classToAdd.getName().replace('.', ArchivePath.SEPARATOR) + ".class";
final InputStream in = Thread.currentThread().getContextClassLoader().getResourceAsStream(pathToClass);
long thisClassFileSize = 0L;
final byte[] buffer = new byte[8 * 1024];
Expand Down

0 comments on commit 7e1dd1e

Please sign in to comment.