Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey Prigogin2016-08-08 04:51:33 +0000
committerSergey Prigogin2016-08-08 04:55:42 +0000
commitc14079638f082f3bcd2062f07fddcfd6391beaf8 (patch)
tree934fc4c3ba32c30d5b5f4a6f7fecad18005c2ff8 /bundles/org.eclipse.team.cvs.core
parent007c431c1f36a68654d238fc68f7912c9530b228 (diff)
downloadeclipse.platform.team-c14079638f082f3bcd2062f07fddcfd6391beaf8.tar.gz
eclipse.platform.team-c14079638f082f3bcd2062f07fddcfd6391beaf8.tar.xz
eclipse.platform.team-c14079638f082f3bcd2062f07fddcfd6391beaf8.zip
Fixed compiler warnings.
Diffstat (limited to 'bundles/org.eclipse.team.cvs.core')
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IUserAuthenticator.java4
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSRepositoryLocation.java20
2 files changed, 11 insertions, 13 deletions
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IUserAuthenticator.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IUserAuthenticator.java
index 4415d2184..42bfda169 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IUserAuthenticator.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IUserAuthenticator.java
@@ -11,6 +11,7 @@
*******************************************************************************/
package org.eclipse.team.internal.ccvs.core;
+import java.util.List;
import java.util.Map;
/**
@@ -20,7 +21,6 @@ import java.util.Map;
* appropriate for the given repository type.
*/
public interface IUserAuthenticator {
-
/**
* Button id for an "Ok" button (value 0).
*/
@@ -148,5 +148,5 @@ public interface IUserAuthenticator {
* (as values) or <code>null</code> if the operation is to be
* canceled
*/
- public abstract Map promptToConfigureRepositoryLocations(Map alternativeMap);
+ public abstract Map<ICVSRepositoryLocation, List<String>> promptToConfigureRepositoryLocations(Map<ICVSRepositoryLocation, List<String>> alternativeMap);
}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSRepositoryLocation.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSRepositoryLocation.java
index 59aee7086..f32fb4499 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSRepositoryLocation.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSRepositoryLocation.java
@@ -46,10 +46,8 @@ import org.osgi.service.prefs.Preferences;
*
* Instances must be disposed of when no longer needed in order to
* notify the authenticator so cached properties can be cleared
- *
*/
public class CVSRepositoryLocation extends PlatformObject implements ICVSRepositoryLocation, IUserInfo {
-
/**
* Top secure preferences node to cache CVS information
*/
@@ -90,7 +88,7 @@ public class CVSRepositoryLocation extends PlatformObject implements ICVSReposit
// Locks for ensuring that authentication to a host is serialized
// so that invalid passwords do not result in account lockout
- private static Map hostLocks = new HashMap();
+ private static Map<String, ILock> hostLocks = new HashMap<String, ILock>();
private IConnectionMethod method;
private String user;
@@ -277,7 +275,7 @@ public class CVSRepositoryLocation extends PlatformObject implements ICVSReposit
int end;
// For parsing alternative location format
int optionStart = location.indexOf(SEMICOLON);
- HashMap hmOptions = new HashMap();
+ HashMap<String, String> hmOptions = new HashMap<>();
if (start == 0) {
end = location.indexOf(COLON, start + 1);
@@ -422,7 +420,7 @@ public class CVSRepositoryLocation extends PlatformObject implements ICVSReposit
*/
public static IConnectionMethod[] getPluggedInConnectionMethods() {
if(pluggedInConnectionMethods==null) {
- List connectionMethods = new ArrayList();
+ List<Object> connectionMethods = new ArrayList<Object>();
if (STANDALONE_MODE) {
connectionMethods.add(new PServerConnectionMethod());
@@ -443,7 +441,7 @@ public class CVSRepositoryLocation extends PlatformObject implements ICVSReposit
}
}
}
- IConnectionMethod[] methods = (IConnectionMethod[]) connectionMethods.toArray(new IConnectionMethod[0]);
+ IConnectionMethod[] methods = connectionMethods.toArray(new IConnectionMethod[0]);
Arrays.sort(methods, new Comparator(){
public int compare(Object o1, Object o2) {
if (o1 instanceof IConnectionMethod && o2 instanceof IConnectionMethod) {
@@ -660,14 +658,14 @@ public class CVSRepositoryLocation extends PlatformObject implements ICVSReposit
ICVSRemoteResource[] resources = root.members(progress);
// There is the off chance that there is a file in the root of the repository.
// This is not supported by cvs so we need to make sure there are no files
- List folders = new ArrayList(resources.length);
+ List<ICVSRemoteResource> folders = new ArrayList<ICVSRemoteResource>(resources.length);
for (int i = 0; i < resources.length; i++) {
ICVSRemoteResource remoteResource = resources[i];
if (remoteResource.isContainer()) {
folders.add(remoteResource);
}
}
- return (ICVSRemoteResource[]) folders.toArray(new ICVSRemoteResource[folders.size()]);
+ return folders.toArray(new ICVSRemoteResource[folders.size()]);
}
} catch (CVSException e){
// keep current CVSException
@@ -757,7 +755,7 @@ public class CVSRepositoryLocation extends PlatformObject implements ICVSReposit
Policy.checkCanceled(monitor);
ILock hostLock;
synchronized(hostLocks) {
- hostLock = (ILock)hostLocks.get(getHost());
+ hostLock = hostLocks.get(getHost());
if (hostLock == null) {
hostLock = Job.getJobManager().newLock();
hostLocks.put(getHost(), hostLock);
@@ -1124,7 +1122,7 @@ public class CVSRepositoryLocation extends PlatformObject implements ICVSReposit
CVS_RSH_PARAMETERS = stringReplace(CVS_RSH_PARAMETERS, PORT_VARIABLE, new Integer(port).toString());
// Build the command list to be sent to the OS.
- List commands = new ArrayList();
+ List<String> commands = new ArrayList<String>();
commands.add(CVS_RSH);
StringTokenizer tokenizer = new StringTokenizer(CVS_RSH_PARAMETERS);
while (tokenizer.hasMoreTokens()) {
@@ -1133,7 +1131,7 @@ public class CVSRepositoryLocation extends PlatformObject implements ICVSReposit
}
commands.add(CVS_SERVER);
commands.add(INVOKE_SVR_CMD);
- return (String[]) commands.toArray(new String[commands.size()]);
+ return commands.toArray(new String[commands.size()]);
}
/*

Back to the top