Merge pull request 64756 from users/jpricket/bugfixes into master

small changes to fix the jar names and remove some build warnings
This commit is contained in:
Jason Prickett 2015-11-19 19:03:25 +00:00
Родитель 94b0949390 80d4d8bb26
Коммит 0bcdf3d80d
6 изменённых файлов: 28 добавлений и 22 удалений

Просмотреть файл

@ -43,12 +43,19 @@ subprojects {
* specific settings for each project
*/
project(":common") {
jar {
baseName 'com.microsoft.alm.common'
}
}
project(":plugin") {
dependencies {
compile project(':common')
}
jar {
baseName 'com.microsoft.alm.plugin'
}
}
project(":plugin.idea") {
@ -58,7 +65,7 @@ project(":plugin.idea") {
}
jar {
baseName 'com.microsoft.alm'
baseName 'com.microsoft.alm.plugin.idea'
from('.') {
include 'META-INF/plugin.xml'
}

Просмотреть файл

@ -62,11 +62,6 @@ class TfsCheckoutPageModel extends CheckoutPageModelImpl {
authenticationProvider.clearAuthenticationDetails();
}
@Override
protected void setServerNameInternal(String serverName) {
super.setServerNameInternal(serverName);
}
@Override
public void loadRepositories() {
clearErrors();

Просмотреть файл

@ -126,9 +126,13 @@ public class CreatePullRequestForm {
return this.descriptionTextArea.getText();
}
@SuppressWarnings("unchecked")
public GitRemoteBranch getSelectedRemoteBranch() {
return (GitRemoteBranch) this.targetBranchDropdown.getSelectedItem();
Object o = this.targetBranchDropdown.getSelectedItem();
if (o instanceof GitRemoteBranch) {
return (GitRemoteBranch) this.targetBranchDropdown.getSelectedItem();
}
return null;
}
public void setSelectedTargetBranch(final GitRemoteBranch targetBranch) {

Просмотреть файл

@ -67,8 +67,6 @@ public class ServerContextSettings implements PersistentStateComponent<ServerCon
* <p/>
* Shortly thereafter, ServerContextManager will initialize and will take ownership of this data with actively
* managed ServerContexts, and this state data should not be used again.
*
* @param state
*/
public void loadState(final ServerContextItemsStore state) {
this.restoreState = state;
@ -162,7 +160,7 @@ public class ServerContextSettings implements PersistentStateComponent<ServerCon
public List<ServerContext> getServerContextsToRestore() {
if (restoreState == null || restoreState.serverContextItemStores == null) {
return Collections.EMPTY_LIST;
return Collections.emptyList();
}
final List<ServerContext> serverContexts = new ArrayList<ServerContext>();

Просмотреть файл

@ -16,8 +16,8 @@ import org.junit.Before;
import org.junit.Test;
import org.mockito.Mockito;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
@ -76,7 +76,6 @@ public class DiffCompareInfoProviderTest extends IdeaAbstractTest {
assertCompareInfoEmptiness(underTest.getBranchCompareInfo(projectMock, gitRepositoryMock, "test1", "test2"));
}
@SuppressWarnings("unchecked")
@Test
public void testBranchCompare() throws VcsException {
when(gitUtilWrapperMock.getMergeBase(any(Project.class), any(VirtualFile.class), eq("test2"), eq("test1")))
@ -84,15 +83,15 @@ public class DiffCompareInfoProviderTest extends IdeaAbstractTest {
GitCommit commitMock1 = PRGitObjectMockHelper.getCommit(projectMock, fileMock);
when(gitUtilWrapperMock.history(any(Project.class), any(VirtualFile.class), eq("myparent..")))
.thenReturn(Arrays.asList(commitMock1));
.thenReturn(Collections.singletonList(commitMock1));
GitCommit commitMock2 = PRGitObjectMockHelper.getCommit(projectMock, fileMock);
when(gitUtilWrapperMock.history(any(Project.class), any(VirtualFile.class), eq("..myparent")))
.thenReturn(Arrays.asList(commitMock2));
.thenReturn(Collections.singletonList(commitMock2));
Change diff = Mockito.mock(Change.class);
when(gitUtilWrapperMock.getDiff(any(Project.class), any(VirtualFile.class), eq("myparent"), eq("test1")))
.thenReturn(Arrays.asList(diff));
.thenReturn(Collections.singletonList(diff));
final GitCommitCompareInfo compareInfo
= underTest.getBranchCompareInfo(projectMock, gitRepositoryMock, "test1", "test2");
@ -107,7 +106,7 @@ public class DiffCompareInfoProviderTest extends IdeaAbstractTest {
Collection<Change> diffs = compareInfo.getTotalDiff();
assertEquals(1, diffs.size());
assertEquals(diff, new LinkedList(diffs).get(0));
assertEquals(diff, new LinkedList<Change>(diffs).get(0));
}

Просмотреть файл

@ -62,6 +62,7 @@ public class CatalogServiceImpl implements CatalogService {
}
public CatalogServiceImpl(final ServerContext context) {
assert context != null;
this.context = context;
final URI baseURI = context.getUri();
@ -73,7 +74,7 @@ public class CatalogServiceImpl implements CatalogService {
final QueryData queryForOrganizationRoot = new QueryData(SINGLE_RECURSE_STAR, QUERY_OPTIONS_NONE, ORGANIZATIONAL_ROOT);
final CatalogData catalogDataOrganizationRoot = getCatalogDataFromServer(queryForOrganizationRoot);
//If auth fails, you can get here and catalogDataOrganizationRoot is null
//TODO: can we get to null from our UI workflows, should we bubble up exception?
//TODO: can we get to null from our UI work flows, should we bubble up exception?
if (catalogDataOrganizationRoot != null) {
final CatalogResource organizationRoot = catalogDataOrganizationRoot.catalogResources.get(0);
@ -127,14 +128,14 @@ public class CatalogServiceImpl implements CatalogService {
httpPost.addHeader(new BasicHeader("Content-Type", "application/soap+xml; charset=utf-8")); //$NON-NLS-1$ //$NON-NLS-2$
try {
if (context == null || context.getHttpClient() == null) {
if (context.getHttpClient() == null) {
logger.warn("getCatalogDataFromServer context.getHttpClient() is null");
return null;
}
final HttpResponse httpResponse = context.getHttpClient().execute(httpPost);
final int responseStatusCode = httpResponse.getStatusLine().getStatusCode();
CatalogData catalogData = null;
CatalogData catalogData;
if (responseStatusCode == HttpStatus.SC_OK) {
catalogData = new CatalogData(queryData.filterOnResourceType);
readResponse(httpResponse, catalogData);
@ -213,6 +214,7 @@ public class CatalogServiceImpl implements CatalogService {
try {
reader.close();
} catch (final XMLStreamException e) {
// Ignore and continue
}
}
}
@ -224,6 +226,7 @@ public class CatalogServiceImpl implements CatalogService {
try {
responseStream.close();
} catch (IOException e) {
// Ignore and continue
}
}
}
@ -361,7 +364,7 @@ public class CatalogServiceImpl implements CatalogService {
* The element type is an array.
*/
int event0;
final List list0 = new ArrayList();
final List<String> list0 = new ArrayList<String>();
do {
event0 = reader.nextTag();
@ -372,7 +375,7 @@ public class CatalogServiceImpl implements CatalogService {
}
while (event0 != XMLStreamConstants.END_ELEMENT);
this.nodeReferencePaths = (String[]) list0.toArray(new String[list0.size()]);
this.nodeReferencePaths = list0.toArray(new String[list0.size()]);
} else {
// Read the unknown child element until its end
readUntilElementEnd(reader);