-
Bug
-
Resolution: Fixed
-
Neutral
-
2.2.2
Hey guys,
I've found a bug in the resources module concerning the install task. Please take a closer look to the constructor of InstallTextResourcesTask:
public class InstallTextResourcesTask extends AbstractRepositoryTask { ... public InstallTextResourcesTask(String pattern, String template, boolean processed, String modelClass, boolean preserveResourcesParameters) { this("Install text resources", "Installs all resources matching the " + pattern + " pattern.", InstallTextResourceTask.DEFAULT_ENCODING, pattern, template, processed, modelClass, preserveResourcesParameters); } public InstallTextResourcesTask(String pattern, String template, String encoding, boolean processed, String modelClass, boolean preserveResourcesParameters) { this("Install text resources", "Installs all resources matching the " + pattern + " pattern.", encoding, pattern, template, processed, modelClass, preserveResourcesParameters); } public InstallTextResourcesTask(String taskName, String taskDescription, String pattern, String encoding, String template, boolean processed, String modelClass, boolean preserveResourcesParameters) { super(taskName, taskDescription); this.pattern = pattern; this.template = template; this.modelClass = modelClass; this.processed = processed; this.preserveResourcesParameters = preserveResourcesParameters; } ... }
Notice the order of the parameters the first two constructors call the last big constructor:
taskName, taskDescription, encoding, pattern, ...
But in the last constructor the parameters "encoding" and "pattern" are swapped:
taskName, taskDescription, pattern, encoding
This leads to every task having a pattern of "UTF-8" which is definetly not what we want.
Acceptance criteria
- caused by
-
MGNLRES-42 Issues with InstallResourcesTask and InstallResourceTask
- Closed