mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-05-07 02:26:23 +02:00
Reduce code smells (#2089)
Reduce code smells found by deepsource.io. We focused on the low-hanging fruits and not breaking any api.
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
package sonia.scm.it.utils;
|
||||
|
||||
import com.google.common.base.Charsets;
|
||||
@@ -92,11 +92,11 @@ public class RepositoryUtil {
|
||||
* @throws IOException
|
||||
*/
|
||||
public static Changeset commitMultipleFileModifications(RepositoryClient repositoryClient, String username, Map<String, String> addedFiles, Map<String, String> modifiedFiles, List<String> removedFiles) throws IOException {
|
||||
for (String fileName : addedFiles.keySet()) {
|
||||
writeAndAddFile(repositoryClient, fileName, addedFiles.get(fileName));
|
||||
for (Map.Entry<String,String> entry : addedFiles.entrySet()) {
|
||||
writeAndAddFile(repositoryClient, entry.getKey(), entry.getValue());
|
||||
}
|
||||
for (String fileName : modifiedFiles.keySet()) {
|
||||
writeAndAddFile(repositoryClient, fileName, modifiedFiles.get(fileName));
|
||||
for (Map.Entry<String,String> entry : modifiedFiles.entrySet()) {
|
||||
writeAndAddFile(repositoryClient, entry.getKey(), entry.getValue());
|
||||
}
|
||||
for (String fileName : removedFiles) {
|
||||
deleteFileAndApplyRemoveCommand(repositoryClient, fileName);
|
||||
|
||||
Reference in New Issue
Block a user