Skip to content

Commit

Permalink
Use path instead of string in ExtraStudentFileAwareFileMovingPolicy
Browse files Browse the repository at this point in the history
  • Loading branch information
Mession committed Jun 24, 2015
1 parent 4deb010 commit ce2492c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/
public abstract class ExtraStudentFileAwareFileMovingPolicy implements FileMovingPolicy {

private static final String TMC_PROJECT_YML = ".tmcproject.yml";
private static final Path TMC_PROJECT_YML = Paths.get(".tmcproject.yml");

private List<Path> extraStudentFiles;
private Path rootPath;
Expand All @@ -44,7 +44,7 @@ public boolean shouldMove(Path path, Path rootPath, Path target) {
return false;
}

if (path.endsWith(TMC_PROJECT_YML)) {
if (path.getFileName().equals(TMC_PROJECT_YML)) {
return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import static org.junit.Assert.assertEquals;

import fi.helsinki.cs.tmc.langs.TestCase;
import fi.helsinki.cs.tmc.langs.TestCase.Status;

import org.junit.Test;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import static org.junit.Assert.assertTrue;

import org.apache.commons.io.FileUtils;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;
Expand Down

0 comments on commit ce2492c

Please sign in to comment.