Skip to content

Commit

Permalink
singular resource path
Browse files Browse the repository at this point in the history
  • Loading branch information
nkonev committed Mar 10, 2024
1 parent d2700b5 commit 1781e56
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ public void setResourcePath(String resourcePath) {
this.resourcesPaths = Collections.singletonList(resourcePath);
}

public String getResourcePath() {
return this.resourcesPaths.get(0);
}

public BunchOfResourcesType getType() {
return type;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ private static List<Tuple2<MigrateResource, FilenameParser.MigrationInfo>> proce
if (resourceEntry.getResourcesPaths().size() != 1) {
throw new IllegalArgumentException("For "+resourceEntry+" of type JUST_FILE you cannot provide != 1 resourcesPaths. Consider using several entries with JUST_FILES instead.");
}
var resourcePath = resourceEntry.getResourcesPaths().get(0);
var resourcePath = resourceEntry.getResourcePath();
var gotResources = resourceReader.getResources(resourcePath);
if (gotResources.size() != 1) {
throw new IllegalStateException("ResourceEntry " + resourceEntry + " should provide exactly one file. We got " + gotResources.size());
Expand Down

0 comments on commit 1781e56

Please sign in to comment.