Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2019-04-18 02:10:37 -0400
committerAlexander Kurtakov2019-04-18 02:10:37 -0400
commit2a44308b041da309149d120f95b8cf55879aa8e1 (patch)
tree2a55ae231b0f040a2036cf42be6f75057e9b4198
parentca7a24d40322f481ddee4bef4a5bdf5bdc317730 (diff)
downloadeclipse.platform.team-2a44308b041da309149d120f95b8cf55879aa8e1.tar.gz
eclipse.platform.team-2a44308b041da309149d120f95b8cf55879aa8e1.tar.xz
eclipse.platform.team-2a44308b041da309149d120f95b8cf55879aa8e1.zip
Remove useless casts from cvs.core.
And enable the compiler preference to mark them. Change-Id: I091e72b08d56caf719ae663dfa5302b1ae57ec75 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
-rw-r--r--bundles/org.eclipse.team.cvs.core/.settings/org.eclipse.jdt.core.prefs56
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSMergeSubscriber.java2
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSRepositoryLocationMatcher.java2
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/AbstractStructureVisitor.java2
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Update.java2
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory.java2
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filesystem/CVSFileTree.java4
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseFile.java2
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseFolder.java2
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java16
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/FileContentCachingService.java2
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/FileModificationManager.java2
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolder.java6
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderMemberFetcher.java8
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderSandbox.java2
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteModule.java4
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/SessionPropertySyncInfoCache.java2
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/SynchronizerSyncInfoCache.java4
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/UpdateContentCachingService.java2
19 files changed, 88 insertions, 34 deletions
diff --git a/bundles/org.eclipse.team.cvs.core/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.team.cvs.core/.settings/org.eclipse.jdt.core.prefs
index 8922d924d..3e8224c8c 100644
--- a/bundles/org.eclipse.team.cvs.core/.settings/org.eclipse.jdt.core.prefs
+++ b/bundles/org.eclipse.team.cvs.core/.settings/org.eclipse.jdt.core.prefs
@@ -7,6 +7,15 @@ org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
org.eclipse.jdt.core.circularClasspath=error
org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnull.secondary=
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
@@ -16,20 +25,28 @@ org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
+org.eclipse.jdt.core.compiler.problem.APILeak=warning
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
org.eclipse.jdt.core.compiler.problem.deprecation=warning
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
@@ -38,35 +55,72 @@ org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
org.eclipse.jdt.core.compiler.problem.missingDefaultCase=warning
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disable
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning
+org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled
+org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unstableAutoModuleName=warning
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedImport=error
org.eclipse.jdt.core.compiler.problem.unusedLabel=error
org.eclipse.jdt.core.compiler.problem.unusedLocal=error
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSMergeSubscriber.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSMergeSubscriber.java
index f12d2896b..e39b8ac0b 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSMergeSubscriber.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSMergeSubscriber.java
@@ -195,7 +195,7 @@ public class CVSMergeSubscriber extends CVSSyncTreeSubscriber implements IResour
@Override
public IResource[] roots() {
- return (IResource[]) roots.toArray(new IResource[roots.size()]);
+ return roots.toArray(new IResource[roots.size()]);
}
@Override
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSRepositoryLocationMatcher.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSRepositoryLocationMatcher.java
index d93b040c0..d46978bd0 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSRepositoryLocationMatcher.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSRepositoryLocationMatcher.java
@@ -59,7 +59,7 @@ public class CVSRepositoryLocationMatcher {
for (Iterator i = infoMap.keySet().iterator(); i.hasNext();) {
IProject project = (IProject) i.next();
if (confirmedProjectsList.contains(project)) {
- LoadInfo loadInfo = (LoadInfo) infoMap.get(project);
+ LoadInfo loadInfo = infoMap.get(project);
projectSetRepositoryLocations.add(loadInfo.repositoryLocation);
}
}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/AbstractStructureVisitor.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/AbstractStructureVisitor.java
index 715916bd5..6de8222b1 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/AbstractStructureVisitor.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/AbstractStructureVisitor.java
@@ -277,7 +277,7 @@ abstract class AbstractStructureVisitor implements ICVSResourceVisitor {
this.monitor.beginTask(null, resourceHint);
session.setSendFileTitleKey(getSendFileMessage());
for (int i = 0; i < resourceList.size(); i++) {
- ((ICVSResource)resourceList.get(i)).accept(this);
+ resourceList.get(i).accept(this);
}
} finally {
monitor.done();
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Update.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Update.java
index 973bd4cb9..a03b0604e 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Update.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Update.java
@@ -116,7 +116,7 @@ public class Update extends Command {
newOptions.add(Command.PRUNE_EMPTY_DIRECTORIES);
}
}
- localOptions = (LocalOption[]) newOptions.toArray(new LocalOption[newOptions.size()]);
+ localOptions = newOptions.toArray(new LocalOption[newOptions.size()]);
return super.filterLocalOptions(session, globalOptions, localOptions);
}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory.java
index b6c537c35..4b96051cc 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory.java
@@ -267,7 +267,7 @@ public class CVSFileHistory extends FileHistory {
directDescendents.add(revisions[i]);
}
}
- return (IFileRevision[]) directDescendents.toArray(new IFileRevision[directDescendents.size()]);
+ return directDescendents.toArray(new IFileRevision[directDescendents.size()]);
}
private IFileRevision[] convertToFileRevision(IFileState[] localRevisions, IProgressMonitor monitor) {
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filesystem/CVSFileTree.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filesystem/CVSFileTree.java
index 27cc76509..8668054bd 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filesystem/CVSFileTree.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filesystem/CVSFileTree.java
@@ -50,7 +50,7 @@ public class CVSFileTree {
for (int i = 0; i < remoteResources.length; i++) {
IFileInfo fileInfo;
try {
- fileInfo = getFileInfo((ICVSResource) remoteResources[i], new NullProgressMonitor());
+ fileInfo = getFileInfo(remoteResources[i], new NullProgressMonitor());
fileStore[i] = new CVSFileStore(baseURI.append(fileInfo.getName()), fileInfo);
} catch (TeamException e) {}
}
@@ -90,7 +90,7 @@ public class CVSFileTree {
for (int i = 0; i < remoteResources.length; i++) {
IFileInfo fileInfo;
try {
- fileInfo = getFileInfo((ICVSResource) remoteResources[i], new NullProgressMonitor());
+ fileInfo = getFileInfo(remoteResources[i], new NullProgressMonitor());
fileInfos[i] = fileInfo;
} catch (TeamException e) {}
}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseFile.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseFile.java
index 61402eedd..4c094f94d 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseFile.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseFile.java
@@ -340,7 +340,7 @@ public class EclipseFile extends EclipseResource implements ICVSFile {
notificationCharacters.add(Character.valueOf(NotifyInfo.COMMIT));
internalFormat = new char[notificationCharacters.size()];
for (int i = 0; i < internalFormat.length; i++) {
- internalFormat[i] = ((Character)notificationCharacters.get(i)).charValue();
+ internalFormat[i] = notificationCharacters.get(i).charValue();
}
}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseFolder.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseFolder.java
index 648eb7fb2..5ccf5374f 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseFolder.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseFolder.java
@@ -80,7 +80,7 @@ class EclipseFolder extends EclipseResource implements ICVSFolder {
}
}
}
- return (ICVSResource[]) result.toArray(new ICVSResource[result.size()]);
+ return result.toArray(new ICVSResource[result.size()]);
}
@Override
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java
index 925f57f7d..11fdf0b81 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java
@@ -421,7 +421,7 @@ public class EclipseSynchronizer implements IFlushOperation {
// broadcast changes to unmanaged children - they are the only candidates for being ignored
List<IResource> possibleIgnores = new ArrayList<>();
accumulateNonManagedChildren(folder, possibleIgnores);
- ResourceStateChangeListeners.getListener().resourceSyncInfoChanged((IResource[])possibleIgnores.toArray(new IResource[possibleIgnores.size()]));
+ ResourceStateChangeListeners.getListener().resourceSyncInfoChanged(possibleIgnores.toArray(new IResource[possibleIgnores.size()]));
} finally {
endOperation();
}
@@ -681,7 +681,7 @@ public class EclipseSynchronizer implements IFlushOperation {
}
if (!changed.isEmpty()) {
ResourceStateChangeListeners.getListener().resourceSyncInfoChanged(
- (IResource[]) changed.toArray(new IResource[changed.size()]));
+ changed.toArray(new IResource[changed.size()]));
}
} finally {
if (rule != null) endBatching(rule, null);
@@ -708,7 +708,7 @@ public class EclipseSynchronizer implements IFlushOperation {
}
if (!changed.isEmpty()) {
ResourceStateChangeListeners.getListener().externalSyncInfoChange(
- (IResource[]) changed.toArray(new IResource[changed.size()]));
+ changed.toArray(new IResource[changed.size()]));
}
}
@@ -1030,7 +1030,7 @@ public class EclipseSynchronizer implements IFlushOperation {
// do not overwrite the sync info for linked resources
if (infos.size() > 0 || !isLinkedResource(folder))
SyncFileWriter.writeAllResourceSync(folder,
- (byte[][]) infos.toArray(new byte[infos.size()][]));
+ infos.toArray(new byte[infos.size()][]));
} catch(CVSException e) {
try {
sessionPropertyCache.purgeCache(folder, false /* depth 1 */);
@@ -1058,7 +1058,7 @@ public class EclipseSynchronizer implements IFlushOperation {
allChanges.addAll(Arrays.asList(changedResources));
allChanges.addAll(Arrays.asList(changedFolders));
allChanges.addAll(dirtyParents);
- IResource[] resources = (IResource[]) allChanges.toArray(
+ IResource[] resources = allChanges.toArray(
new IResource[allChanges.size()]);
broadcastResourceStateChanges(resources);
if ( ! errors.isEmpty()) {
@@ -1067,7 +1067,7 @@ public class EclipseSynchronizer implements IFlushOperation {
CVSMessages.EclipseSynchronizer_ErrorCommitting,
null);
for (int i = 0; i < errors.size(); i++) {
- status.merge((IStatus)errors.get(i));
+ status.merge(errors.get(i));
}
return status;
}
@@ -1457,7 +1457,7 @@ public class EclipseSynchronizer implements IFlushOperation {
}
}
}
- return (IContainer[]) folders.toArray(new IContainer[folders.size()]);
+ return folders.toArray(new IContainer[folders.size()]);
}
/**
@@ -1825,7 +1825,7 @@ public class EclipseSynchronizer implements IFlushOperation {
IResource resource = resources[i];
set.add(resource.getProject());
}
- IProject[] projects = (IProject[]) set.toArray(new IProject[set.size()]);
+ IProject[] projects = set.toArray(new IProject[set.size()]);
if (projects.length == 1) {
return projects[0];
}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/FileContentCachingService.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/FileContentCachingService.java
index 3a7a14268..dace20051 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/FileContentCachingService.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/FileContentCachingService.java
@@ -135,6 +135,6 @@ public class FileContentCachingService {
// The child does not exists so exclude it
}
}
- return (String[]) existing.toArray(new String[existing.size()]);
+ return existing.toArray(new String[existing.size()]);
}
}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/FileModificationManager.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/FileModificationManager.java
index 57cefe6cc..d35f56e26 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/FileModificationManager.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/FileModificationManager.java
@@ -95,7 +95,7 @@ public class FileModificationManager implements IResourceChangeListener {
});
if (!modifiedResources.isEmpty()) {
ResourceStateChangeListeners.getListener().resourceModified(
- (IResource[])modifiedResources.toArray(new IResource[modifiedResources.size()]));
+ modifiedResources.toArray(new IResource[modifiedResources.size()]));
modifiedResources.clear();
}
} catch (CoreException e) {
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolder.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolder.java
index 2eb13c50e..567c90813 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolder.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolder.java
@@ -164,7 +164,7 @@ public class RemoteFolder extends RemoteResource implements ICVSRemoteFolder, IC
IStatus status = Command.UPDATE.execute(
session,
new GlobalOption[] { Command.DO_NOT_CHANGE },
- (LocalOption[]) localOptions.toArray(new LocalOption[localOptions.size()]),
+ localOptions.toArray(new LocalOption[localOptions.size()]),
new ICVSResource[] { child }, new UpdateListener(listener),
Policy.subMonitorFor(progress, 70));
if (status.getCode() == CVSStatus.SERVER_ERROR) {
@@ -246,7 +246,7 @@ public class RemoteFolder extends RemoteResource implements ICVSRemoteFolder, IC
}
}
- return (ICVSResource[]) result.toArray(new ICVSResource[result.size()]);
+ return result.toArray(new ICVSResource[result.size()]);
}
@Override
@@ -501,7 +501,7 @@ public class RemoteFolder extends RemoteResource implements ICVSRemoteFolder, IC
@Override
public ICVSRemoteResource forTag(CVSTag tagName) {
- return (ICVSRemoteFolder)forTag(null, tagName);
+ return forTag(null, tagName);
}
@Override
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderMemberFetcher.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderMemberFetcher.java
index 1c0ee061b..d6d297ffc 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderMemberFetcher.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderMemberFetcher.java
@@ -105,7 +105,7 @@ public class RemoteFolderMemberFetcher implements IUpdateMessageListener, IStatu
return Command.UPDATE.execute(
session,
new GlobalOption[] { Command.DO_NOT_CHANGE },
- (LocalOption[])localOptions.toArray(new LocalOption[localOptions.size()]),
+ localOptions.toArray(new LocalOption[localOptions.size()]),
new ICVSResource[] { parentFolder },
new UpdateListener(this),
Policy.subMonitorFor(progress, 90));
@@ -159,11 +159,11 @@ public class RemoteFolderMemberFetcher implements IUpdateMessageListener, IStatu
// Report any internal exceptions that occurred fetching the members
if ( ! exceptions.isEmpty()) {
if (exceptions.size() == 1) {
- throw (CVSException)exceptions.get(0);
+ throw exceptions.get(0);
} else {
MultiStatus multi = new MultiStatus(CVSProviderPlugin.ID, 0, errorTitle, null);
for (int i = 0; i < exceptions.size(); i++) {
- multi.merge(((CVSException)exceptions.get(i)).getStatus());
+ multi.merge(exceptions.get(i).getStatus());
}
throw new CVSException(multi);
}
@@ -285,7 +285,7 @@ public class RemoteFolderMemberFetcher implements IUpdateMessageListener, IStatu
* @return
*/
protected ICVSFile[] getFiles() {
- return (ICVSFile[]) files.toArray(new ICVSFile[files.size()]);
+ return files.toArray(new ICVSFile[files.size()]);
}
/**
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderSandbox.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderSandbox.java
index 38d3a277d..0171bc54d 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderSandbox.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderSandbox.java
@@ -115,6 +115,6 @@ public class RemoteFolderSandbox extends RemoteFolder {
results.add(children[i]);
}
}
- setChildren((ICVSRemoteResource[]) results.toArray(new ICVSRemoteResource[results.size()]));
+ setChildren(results.toArray(new ICVSRemoteResource[results.size()]));
}
}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteModule.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteModule.java
index 470a79bee..0877316bb 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteModule.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteModule.java
@@ -111,7 +111,7 @@ public class RemoteModule extends RemoteFolder {
CVSProviderPlugin.log(IStatus.WARNING, NLS.bind(CVSMessages.RemoteModule_invalidDefinition, new String[] { moduleDefinitionStrings[i], repository.getLocation(true) }), null);
continue;
}
- LocalOption[] localOptions = (LocalOption[]) localOptionsList.toArray(new LocalOption[localOptionsList.size()]);
+ LocalOption[] localOptions = localOptionsList.toArray(new LocalOption[localOptionsList.size()]);
if (Checkout.ALIAS.isElementOf(localOptions)) {
@@ -233,7 +233,7 @@ public class RemoteModule extends RemoteFolder {
}
}
if (expandable) {
- module.setReferencedModules((ICVSRemoteResource[]) referencedFolders.toArray(new ICVSRemoteResource[referencedFolders.size()]));
+ module.setReferencedModules(referencedFolders.toArray(new ICVSRemoteResource[referencedFolders.size()]));
} else {
module.setExpandable(false);
}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/SessionPropertySyncInfoCache.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/SessionPropertySyncInfoCache.java
index f76475112..0c09bafc6 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/SessionPropertySyncInfoCache.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/SessionPropertySyncInfoCache.java
@@ -163,7 +163,7 @@ import org.eclipse.team.internal.ccvs.core.util.SyncFileWriter;
flushed.addAll(Arrays.asList(flushedChildren));
}
}
- return (IResource[]) flushed.toArray(new IResource[flushed.size()]);
+ return flushed.toArray(new IResource[flushed.size()]);
} catch (CoreException e) {
throw CVSException.wrapException(e);
}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/SynchronizerSyncInfoCache.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/SynchronizerSyncInfoCache.java
index f8cd3e8c2..46747a6c2 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/SynchronizerSyncInfoCache.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/SynchronizerSyncInfoCache.java
@@ -313,7 +313,7 @@ import org.eclipse.team.internal.ccvs.core.util.Util;
if (cachedResources.size() != 0){
IResource[] resources = folder.members(true);
- IResource[] cachedResourcesArray = (IResource[]) cachedResources.toArray(new IResource[cachedResources.size()]);
+ IResource[] cachedResourcesArray = cachedResources.toArray(new IResource[cachedResources.size()]);
IResource[]finalResources = new IResource[resources.length + cachedResourcesArray.length];
System.arraycopy(resources, 0, finalResources, 0, resources.length);
System.arraycopy(cachedResourcesArray, 0, finalResources, resources.length, cachedResourcesArray.length);
@@ -397,7 +397,7 @@ import org.eclipse.team.internal.ccvs.core.util.Util;
synchronized (pendingCacheWrites) {
if (pendingCacheWrites.isEmpty())
return null;
- return (IResource[]) pendingCacheWrites.keySet().toArray(new IResource[pendingCacheWrites.size()]);
+ return pendingCacheWrites.keySet().toArray(new IResource[pendingCacheWrites.size()]);
}
}
}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/UpdateContentCachingService.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/UpdateContentCachingService.java
index 1ea7f0372..18280a3d2 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/UpdateContentCachingService.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/UpdateContentCachingService.java
@@ -266,7 +266,7 @@ public class UpdateContentCachingService implements IUpdateMessageListener {
options.add(Update.RETRIEVE_ABSENT_DIRECTORIES);
if (!options.isEmpty())
- return (LocalOption[]) options.toArray(new LocalOption[options.size()]);
+ return options.toArray(new LocalOption[options.size()]);
return Command.NO_LOCAL_OPTIONS;
}

Back to the top