svn: Fix "redundant array creation" warnings in "TreeConflictData"

This commit is contained in:
Konstantin Kolosovsky
2018-07-04 16:43:28 +03:00
parent 5fccd7bd2e
commit 427cce5bbf
@@ -1,18 +1,4 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.idea.svn;
import org.jetbrains.idea.svn.status.StatusType;
@@ -45,9 +31,9 @@ public interface TreeConflictData {
"@@ -0,0 +1,1 @@\n" +
"+added text\n" +
"\\ No newline at end of file\n",
"added.txt", new FileData[]{new FileData("added.txt", "unversioned text", StatusType.STATUS_UNVERSIONED,
StatusType.STATUS_UNVERSIONED, StatusType.STATUS_UNVERSIONED,
false)});
"added.txt", new FileData("added.txt", "unversioned text", StatusType.STATUS_UNVERSIONED,
StatusType.STATUS_UNVERSIONED, StatusType.STATUS_UNVERSIONED,
false));
Data MINE_EDIT_THEIRS_DELETE = new Data("Index: root/source/s1.txt\n" +
"===================================================================\n" +
@@ -56,8 +42,8 @@ public interface TreeConflictData {
"@@ -1,1 +0,0 @@\n" +
"-123\n" +
"\\ No newline at end of file\n", "root/source/s1.txt",
new FileData[] {new FileData("root/source/s1.txt", "1*2*3", StatusType.STATUS_NORMAL,
StatusType.STATUS_MODIFIED, StatusType.STATUS_NORMAL, false)});
new FileData("root/source/s1.txt", "1*2*3", StatusType.STATUS_NORMAL,
StatusType.STATUS_MODIFIED, StatusType.STATUS_NORMAL, false));
Data MINE_DELETE_THEIRS_EDIT = new Data("Index: root/source/s1.txt\n" +
"===================================================================\n" +
"--- root/source/s1.txt\t(revision 358)\n" +
@@ -67,25 +53,25 @@ public interface TreeConflictData {
"\\ No newline at end of file\n" +
"+1*2*3\n" +
"\\ No newline at end of file\n", "root/source/s1.txt",
new FileData[] {new FileData("root/source/s1.txt", null, StatusType.STATUS_DELETED,
StatusType.STATUS_DELETED, StatusType.STATUS_DELETED, false)});
new FileData("root/source/s1.txt", null, StatusType.STATUS_DELETED,
StatusType.STATUS_DELETED, StatusType.STATUS_DELETED, false));
Data MINE_EDIT_THEIRS_MOVE = new Data("Index: root/source/s1.txt\n" +
"===================================================================\n" +
"--- root/source/s1.txt\t(revision 358)\n" +
"+++ root/source/s1renamed.txt\t(revision )\n" +
"@@ -1,0 +1,0 @@\n", "root/source/s1.txt",
new FileData[] {new FileData("root/source/s1.txt", "1*2*3", StatusType.STATUS_NORMAL,
StatusType.STATUS_MODIFIED, StatusType.STATUS_NORMAL, false)});
new FileData("root/source/s1.txt", "1*2*3", StatusType.STATUS_NORMAL,
StatusType.STATUS_MODIFIED, StatusType.STATUS_NORMAL, false));
Data MINE_UNV_THEIRS_MOVE = new Data("Index: root/source/s1.txt\n" +
"===================================================================\n" +
"--- root/source/s1.txt\t(revision 358)\n" +
"+++ root/source/s1renamed.txt\t(revision )\n" +
"@@ -1,0 +1,0 @@\n", "root/source/s1renamed.txt",
new FileData[] {new FileData("root/source/s1renamed.txt", "1*2*3", StatusType.STATUS_UNVERSIONED,
StatusType.STATUS_UNVERSIONED, StatusType.STATUS_UNVERSIONED,
false)});
new FileData("root/source/s1renamed.txt", "1*2*3", StatusType.STATUS_UNVERSIONED,
StatusType.STATUS_UNVERSIONED, StatusType.STATUS_UNVERSIONED,
false));
Data MINE_MOVE_THEIRS_EDIT = new Data("Index: root/source/s1.txt\n" +
"===================================================================\n" +
"--- root/source/s1.txt\t(revision 358)\n" +
@@ -96,10 +82,10 @@ public interface TreeConflictData {
"+1*2*3\n" +
// conflict would be marked by svn on s1.txt, but here we put s1moved.txt, for change list manager to find the change
"\\ No newline at end of file\n", "root/source/s1moved.txt",
new FileData[] {new FileData("root/source/s1moved.txt", null, StatusType.STATUS_ADDED,
StatusType.STATUS_ADDED, StatusType.STATUS_ADDED, false, "root/source/s1.txt"),
new FileData("root/source/s1.txt", null, StatusType.STATUS_DELETED,
StatusType.STATUS_DELETED, StatusType.STATUS_DELETED, false)});
new FileData("root/source/s1moved.txt", null, StatusType.STATUS_ADDED,
StatusType.STATUS_ADDED, StatusType.STATUS_ADDED, false, "root/source/s1.txt"),
new FileData("root/source/s1.txt", null, StatusType.STATUS_DELETED,
StatusType.STATUS_DELETED, StatusType.STATUS_DELETED, false));
Data MINE_MOVE_THEIRS_ADD = new Data("Index: root/source/s1moved.txt\n" +
"===================================================================\n" +
"--- root/source/s1moved.txt\t(revision )\n" +
@@ -108,10 +94,10 @@ public interface TreeConflictData {
"+added text\n" +
"\\ No newline at end of file\n",
"root/source/s1moved.txt",
new FileData[] {new FileData("root/source/s1moved.txt", null, StatusType.STATUS_ADDED,
StatusType.STATUS_ADDED, StatusType.STATUS_ADDED, false, "root/source/s1.txt"),
new FileData("root/source/s1.txt", null, StatusType.STATUS_DELETED,
StatusType.STATUS_DELETED, StatusType.STATUS_DELETED, false)}) {
new FileData("root/source/s1moved.txt", null, StatusType.STATUS_ADDED,
StatusType.STATUS_ADDED, StatusType.STATUS_ADDED, false, "root/source/s1.txt"),
new FileData("root/source/s1.txt", null, StatusType.STATUS_DELETED,
StatusType.STATUS_DELETED, StatusType.STATUS_DELETED, false)) {
@Override
protected void afterInit() {
setExcludeFromToTheirsCheck("root\\source\\s1.txt");
@@ -127,12 +113,12 @@ public interface TreeConflictData {
"@@ -0,0 +1,1 @@\n" +
"+added text\n" +
"\\ No newline at end of file\n",
"addedDir", new FileData[]{new FileData("addedDir", null, StatusType.STATUS_UNVERSIONED,
StatusType.STATUS_UNVERSIONED, StatusType.STATUS_UNVERSIONED,
true),
new FileData("addedDir/unv.txt", "unversioned", StatusType.STATUS_UNVERSIONED,
StatusType.STATUS_UNVERSIONED, StatusType.STATUS_UNVERSIONED,
false)});
"addedDir", new FileData("addedDir", null, StatusType.STATUS_UNVERSIONED,
StatusType.STATUS_UNVERSIONED, StatusType.STATUS_UNVERSIONED,
true),
new FileData("addedDir/unv.txt", "unversioned", StatusType.STATUS_UNVERSIONED,
StatusType.STATUS_UNVERSIONED, StatusType.STATUS_UNVERSIONED,
false));
Data MINE_EDIT_THEIRS_DELETE = new Data("Index: root/source/s1.txt\n" +
"===================================================================\n" +
@@ -148,8 +134,8 @@ public interface TreeConflictData {
"@@ -1,1 +0,0 @@\n" +
"-abc\n" +
"\\ No newline at end of file\n", "root/source",
new FileData[] {new FileData("root/source/s1.txt", "1*2*3", StatusType.STATUS_NORMAL,
StatusType.STATUS_MODIFIED, StatusType.STATUS_NORMAL, false)});
new FileData("root/source/s1.txt", "1*2*3", StatusType.STATUS_NORMAL,
StatusType.STATUS_MODIFIED, StatusType.STATUS_NORMAL, false));
Data MINE_DELETE_THEIRS_EDIT = new Data("Index: root/source/s1.txt\n" +
"===================================================================\n" +
"--- root/source/s1.txt\t(revision 358)\n" +
@@ -159,8 +145,8 @@ public interface TreeConflictData {
"\\ No newline at end of file\n" +
"+1*2*3\n" +
"\\ No newline at end of file\n", "root/source",
new FileData[] {new FileData("root/source", null, StatusType.STATUS_DELETED,
StatusType.STATUS_DELETED, StatusType.STATUS_DELETED, true)});
new FileData("root/source", null, StatusType.STATUS_DELETED,
StatusType.STATUS_DELETED, StatusType.STATUS_DELETED, true));
Data MINE_EDIT_THEIRS_MOVE = new Data(
"Index: root/source/s1.txt\n" +
@@ -174,8 +160,8 @@ public interface TreeConflictData {
"+++ root/source1/s2.txt\t(revision )\n" +
"@@ -1,0 +1,0 @@\n",
"root/source",
new FileData[] {new FileData("root/source/s1.txt", "1*2*3", StatusType.STATUS_NORMAL,
StatusType.STATUS_MODIFIED, StatusType.STATUS_NORMAL, false)});
new FileData("root/source/s1.txt", "1*2*3", StatusType.STATUS_NORMAL,
StatusType.STATUS_MODIFIED, StatusType.STATUS_NORMAL, false));
Data MINE_UNV_THEIRS_MOVE = new Data(
"Index: root/source/s1.txt\n" +
@@ -188,12 +174,12 @@ public interface TreeConflictData {
"--- root/source/s2.txt\t(revision 358)\n" +
"+++ root/source1/s2.txt\t(revision )\n" +
"@@ -1,0 +1,0 @@\n", "root/source1",
new FileData[] {new FileData("root/source1", null, StatusType.STATUS_UNVERSIONED,
StatusType.STATUS_UNVERSIONED, StatusType.STATUS_UNVERSIONED,
true),
new FileData("root/source1/unv.txt", "unversioned", StatusType.STATUS_UNVERSIONED,
StatusType.STATUS_UNVERSIONED, StatusType.STATUS_UNVERSIONED,
false)});
new FileData("root/source1", null, StatusType.STATUS_UNVERSIONED,
StatusType.STATUS_UNVERSIONED, StatusType.STATUS_UNVERSIONED,
true),
new FileData("root/source1/unv.txt", "unversioned", StatusType.STATUS_UNVERSIONED,
StatusType.STATUS_UNVERSIONED, StatusType.STATUS_UNVERSIONED,
false));
Data MINE_MOVE_THEIRS_EDIT = new Data("Index: root/source/s1.txt\n" +
"===================================================================\n" +
@@ -204,11 +190,10 @@ public interface TreeConflictData {
"\\ No newline at end of file\n" +
"+1*2*3\n" +
"\\ No newline at end of file\n", "root/source",
new FileData[] {
new FileData("root/sourceNew", null, StatusType.STATUS_ADDED,
StatusType.STATUS_ADDED, StatusType.STATUS_ADDED, true, "root/source"),
new FileData("root/source", null, StatusType.STATUS_DELETED,
StatusType.STATUS_DELETED, StatusType.STATUS_DELETED, true)});
new FileData("root/sourceNew", null, StatusType.STATUS_ADDED,
StatusType.STATUS_ADDED, StatusType.STATUS_ADDED, true, "root/source"),
new FileData("root/source", null, StatusType.STATUS_DELETED,
StatusType.STATUS_DELETED, StatusType.STATUS_DELETED, true));
Data MINE_MOVE_THEIRS_ADD = new Data("Index: root/sourceNew/added.txt\n" +
"===================================================================\n" +
"--- root/sourceNew/added.txt\t(revision )\n" +
@@ -216,11 +201,10 @@ public interface TreeConflictData {
"@@ -0,0 +1,1 @@\n" +
"+added text\n" +
"\\ No newline at end of file\n", "root/sourceNew",
new FileData[] {
new FileData("root/sourceNew", null, StatusType.STATUS_ADDED,
StatusType.STATUS_ADDED, StatusType.STATUS_ADDED, true, "root/source"),
new FileData("root/source", null, StatusType.STATUS_DELETED,
StatusType.STATUS_DELETED, StatusType.STATUS_DELETED, true)}) {
new FileData("root/sourceNew", null, StatusType.STATUS_ADDED,
StatusType.STATUS_ADDED, StatusType.STATUS_ADDED, true, "root/source"),
new FileData("root/source", null, StatusType.STATUS_DELETED,
StatusType.STATUS_DELETED, StatusType.STATUS_DELETED, true)) {
@Override
protected void afterInit() {
setExcludeFromToTheirsCheck("root\\source", "root\\source\\s1.txt", "root\\source\\s2.txt");
@@ -237,9 +221,9 @@ public interface TreeConflictData {
"@@ -0,0 +1,1 @@\n" +
"+added text\n" +
"\\ No newline at end of file\n",
"addedDir", new FileData[]{new FileData("addedDir", "unversioned", StatusType.STATUS_UNVERSIONED,
StatusType.STATUS_UNVERSIONED, StatusType.STATUS_UNVERSIONED,
false)});
"addedDir", new FileData("addedDir", "unversioned", StatusType.STATUS_UNVERSIONED,
StatusType.STATUS_UNVERSIONED, StatusType.STATUS_UNVERSIONED,
false));
Data MINE_ADD_THEIRS_ADD = new Data("Index: addedDir/added.txt\n" +
"===================================================================\n" +
@@ -248,9 +232,9 @@ public interface TreeConflictData {
"@@ -0,0 +1,1 @@\n" +
"+added text\n" +
"\\ No newline at end of file\n",
"addedDir", new FileData[]{new FileData("addedDir", "unversioned", StatusType.STATUS_ADDED,
StatusType.STATUS_UNVERSIONED, StatusType.STATUS_UNVERSIONED,
false)});
"addedDir", new FileData("addedDir", "unversioned", StatusType.STATUS_ADDED,
StatusType.STATUS_UNVERSIONED, StatusType.STATUS_UNVERSIONED,
false));
Data MINE_UNV_THEIRS_MOVE = new Data( "Index: root/source/s1.txt\n" +
"===================================================================\n" +
@@ -262,9 +246,9 @@ public interface TreeConflictData {
"--- root/source/s2.txt\t(revision 358)\n" +
"+++ root/source1/s2.txt\t(revision )\n" +
"@@ -1,0 +1,0 @@\n",
"root/source1", new FileData[]{new FileData("root/source1", "unversioned", StatusType.STATUS_UNVERSIONED,
StatusType.STATUS_UNVERSIONED, StatusType.STATUS_UNVERSIONED,
false)});
"root/source1", new FileData("root/source1", "unversioned", StatusType.STATUS_UNVERSIONED,
StatusType.STATUS_UNVERSIONED, StatusType.STATUS_UNVERSIONED,
false));
Data MINE_ADD_THEIRS_MOVE = new Data( "Index: root/source/s1.txt\n" +
"===================================================================\n" +
@@ -276,9 +260,9 @@ public interface TreeConflictData {
"--- root/source/s2.txt\t(revision 358)\n" +
"+++ root/source1/s2.txt\t(revision )\n" +
"@@ -1,0 +1,0 @@\n",
"root/source1", new FileData[]{new FileData("root/source1", "unversioned", StatusType.STATUS_ADDED,
StatusType.STATUS_UNVERSIONED, StatusType.STATUS_UNVERSIONED,
false)});
"root/source1", new FileData("root/source1", "unversioned", StatusType.STATUS_ADDED,
StatusType.STATUS_UNVERSIONED, StatusType.STATUS_UNVERSIONED,
false));
Data MINE_MOVE_THEIRS_ADD = new Data("Index: addedDir/added.txt\n" +
"===================================================================\n" +
"--- addedDir/added.txt\t(revision )\n" +
@@ -286,12 +270,12 @@ public interface TreeConflictData {
"@@ -0,0 +1,1 @@\n" +
"+added text\n" +
"\\ No newline at end of file\n",
"addedDir", new FileData[]{new FileData("addedDir", null, StatusType.STATUS_ADDED,
StatusType.STATUS_ADDED, StatusType.STATUS_ADDED,
false, "root/source/s1.txt"),
new FileData("root/source/s1.txt", null, StatusType.STATUS_DELETED,
StatusType.STATUS_DELETED, StatusType.STATUS_DELETED,
false, null)}) {
"addedDir", new FileData("addedDir", null, StatusType.STATUS_ADDED,
StatusType.STATUS_ADDED, StatusType.STATUS_ADDED,
false, "root/source/s1.txt"),
new FileData("root/source/s1.txt", null, StatusType.STATUS_DELETED,
StatusType.STATUS_DELETED, StatusType.STATUS_DELETED,
false, null)) {
@Override
protected void afterInit() {
setExcludeFromToTheirsCheck("root\\source\\s1.txt");
@@ -308,12 +292,12 @@ public interface TreeConflictData {
"@@ -0,0 +1,1 @@\n" +
"+added text\n" +
"\\ No newline at end of file\n",
"addedDir.txt", new FileData[]{new FileData("addedDir.txt", null, StatusType.STATUS_UNVERSIONED,
StatusType.STATUS_UNVERSIONED, StatusType.STATUS_UNVERSIONED,
true),
new FileData("addedDir.txt/unv.txt", "unversioned", StatusType.STATUS_UNVERSIONED,
StatusType.STATUS_UNVERSIONED, StatusType.STATUS_UNVERSIONED,
false)});
"addedDir.txt", new FileData("addedDir.txt", null, StatusType.STATUS_UNVERSIONED,
StatusType.STATUS_UNVERSIONED, StatusType.STATUS_UNVERSIONED,
true),
new FileData("addedDir.txt/unv.txt", "unversioned", StatusType.STATUS_UNVERSIONED,
StatusType.STATUS_UNVERSIONED, StatusType.STATUS_UNVERSIONED,
false));
Data MINE_ADD_THEIRS_ADD = new Data("Index: addedDir.txt\n" +
"===================================================================\n" +
@@ -322,12 +306,12 @@ public interface TreeConflictData {
"@@ -0,0 +1,1 @@\n" +
"+added text\n" +
"\\ No newline at end of file\n",
"addedDir.txt", new FileData[]{new FileData("addedDir.txt", null, StatusType.STATUS_ADDED,
StatusType.STATUS_UNVERSIONED, StatusType.STATUS_UNVERSIONED,
true),
new FileData("addedDir.txt/unv.txt", "unversioned", StatusType.STATUS_ADDED,
StatusType.STATUS_UNVERSIONED, StatusType.STATUS_UNVERSIONED,
false)});
"addedDir.txt", new FileData("addedDir.txt", null, StatusType.STATUS_ADDED,
StatusType.STATUS_UNVERSIONED, StatusType.STATUS_UNVERSIONED,
true),
new FileData("addedDir.txt/unv.txt", "unversioned", StatusType.STATUS_ADDED,
StatusType.STATUS_UNVERSIONED, StatusType.STATUS_UNVERSIONED,
false));
Data MINE_UNV_THEIRS_MOVE = new Data( "Index: root/source/s1.txt\n" +
"===================================================================\n" +
@@ -335,14 +319,15 @@ public interface TreeConflictData {
"+++ root/source/s1renamed.txt\t(revision )\n" +
"@@ -1,0 +1,0 @@\n" +
"\\ No newline at end of file\n",
"root/source/s1renamed.txt", new FileData[]{new FileData("root/source/s1renamed.txt", null,
StatusType.STATUS_UNVERSIONED,
StatusType.STATUS_UNVERSIONED, StatusType.STATUS_UNVERSIONED,
true),
new FileData("root/source/s1renamed.txt/file.txt", "unversioned",
StatusType.STATUS_UNVERSIONED,
StatusType.STATUS_UNVERSIONED, StatusType.STATUS_UNVERSIONED,
false)});
"root/source/s1renamed.txt", new FileData("root/source/s1renamed.txt", null,
StatusType.STATUS_UNVERSIONED,
StatusType.STATUS_UNVERSIONED,
StatusType.STATUS_UNVERSIONED,
true),
new FileData("root/source/s1renamed.txt/file.txt", "unversioned",
StatusType.STATUS_UNVERSIONED,
StatusType.STATUS_UNVERSIONED, StatusType.STATUS_UNVERSIONED,
false));
Data MINE_ADD_THEIRS_MOVE = new Data( "Index: root/source/s1.txt\n" +
"===================================================================\n" +
@@ -350,14 +335,15 @@ public interface TreeConflictData {
"+++ root/source/s1renamed.txt\t(revision )\n" +
"@@ -1,0 +1,0 @@\n" +
"\\ No newline at end of file\n",
"root/source/s1renamed.txt", new FileData[]{new FileData("root/source/s1renamed.txt", null,
StatusType.STATUS_ADDED,
StatusType.STATUS_UNVERSIONED, StatusType.STATUS_UNVERSIONED,
true),
new FileData("root/source/s1renamed.txt/file.txt", "unversioned",
StatusType.STATUS_ADDED,
StatusType.STATUS_UNVERSIONED, StatusType.STATUS_UNVERSIONED,
false)});
"root/source/s1renamed.txt", new FileData("root/source/s1renamed.txt", null,
StatusType.STATUS_ADDED,
StatusType.STATUS_UNVERSIONED,
StatusType.STATUS_UNVERSIONED,
true),
new FileData("root/source/s1renamed.txt/file.txt", "unversioned",
StatusType.STATUS_ADDED,
StatusType.STATUS_UNVERSIONED, StatusType.STATUS_UNVERSIONED,
false));
Data MINE_MOVE_THEIRS_ADD = new Data("Index: addedDir.txt\n" +
"===================================================================\n" +
@@ -366,10 +352,11 @@ public interface TreeConflictData {
"@@ -0,0 +1,1 @@\n" +
"+added text\n" +
"\\ No newline at end of file\n",
"addedDir.txt", new FileData[]{new FileData("addedDir.txt", null, StatusType.STATUS_ADDED,
StatusType.STATUS_ADDED, StatusType.STATUS_ADDED, true, "root/source"),
new FileData("root/source", null, StatusType.STATUS_DELETED,
StatusType.STATUS_DELETED, StatusType.STATUS_DELETED, true)}) {
"addedDir.txt", new FileData("addedDir.txt", null, StatusType.STATUS_ADDED,
StatusType.STATUS_ADDED, StatusType.STATUS_ADDED, true,
"root/source"),
new FileData("root/source", null, StatusType.STATUS_DELETED,
StatusType.STATUS_DELETED, StatusType.STATUS_DELETED, true)) {
@Override
protected void afterInit() {
setExcludeFromToTheirsCheck("root\\source", "root\\source\\s1.txt", "root\\source\\s2.txt");