Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Xenos2016-03-22 13:33:14 -0400
committerStefan Xenos2016-03-22 17:52:18 -0400
commitbd0ead98b29653875145033cf77d61e14c636b02 (patch)
treec5bf10618a50078c31229d396f53185268ca1ecf /bundles/org.eclipse.team.cvs.ui
parentb8821710ffb03f8e7573be209e1ab14e27ba04b4 (diff)
downloadeclipse.platform.team-bd0ead98b29653875145033cf77d61e14c636b02.tar.gz
eclipse.platform.team-bd0ead98b29653875145033cf77d61e14c636b02.tar.xz
eclipse.platform.team-bd0ead98b29653875145033cf77d61e14c636b02.zip
Bug 489805 - Move the team git repository to Java 1.8
Fixes compiler warnings. This reverts commit b8821710ffb03f8e7573be209e1ab14e27ba04b4. Change-Id: I64b54428dc8500ab05427d505bb801e46511916b Signed-off-by: Stefan Xenos <sxenos@gmail.com>
Diffstat (limited to 'bundles/org.eclipse.team.cvs.ui')
-rw-r--r--bundles/org.eclipse.team.cvs.ui/.classpath2
-rw-r--r--bundles/org.eclipse.team.cvs.ui/.settings/org.eclipse.jdt.core.prefs9
-rw-r--r--bundles/org.eclipse.team.cvs.ui/META-INF/MANIFEST.MF4
-rw-r--r--bundles/org.eclipse.team.cvs.ui/pom.xml2
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/SelectionPropertyTester.java2
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/FileDiffOperation.java38
6 files changed, 21 insertions, 36 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/.classpath b/bundles/org.eclipse.team.cvs.ui/.classpath
index ce7393340..22f30643c 100644
--- a/bundles/org.eclipse.team.cvs.ui/.classpath
+++ b/bundles/org.eclipse.team.cvs.ui/.classpath
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/bundles/org.eclipse.team.cvs.ui/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.team.cvs.ui/.settings/org.eclipse.jdt.core.prefs
index 8c048cdd3..5fbc8ecfe 100644
--- a/bundles/org.eclipse.team.cvs.ui/.settings/org.eclipse.jdt.core.prefs
+++ b/bundles/org.eclipse.team.cvs.ui/.settings/org.eclipse.jdt.core.prefs
@@ -7,10 +7,10 @@ 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.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
@@ -39,7 +39,6 @@ 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.missingDeprecatedAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
@@ -74,7 +73,7 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=di
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
+org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL
org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX
diff --git a/bundles/org.eclipse.team.cvs.ui/META-INF/MANIFEST.MF b/bundles/org.eclipse.team.cvs.ui/META-INF/MANIFEST.MF
index 5dace710b..7d310e831 100644
--- a/bundles/org.eclipse.team.cvs.ui/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.team.cvs.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.team.cvs.ui; singleton:=true
-Bundle-Version: 3.3.800.qualifier
+Bundle-Version: 3.4.0.qualifier
Bundle-Activator: org.eclipse.team.internal.ccvs.ui.CVSUIPlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
@@ -33,4 +33,4 @@ Require-Bundle: org.eclipse.ui.ide;bundle-version="[3.3.0,4.0.0)";resolution:=op
org.eclipse.core.expressions;bundle-version="[3.2.0,4.0.0)",
com.ibm.icu;bundle-version="4.4.2"
Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
diff --git a/bundles/org.eclipse.team.cvs.ui/pom.xml b/bundles/org.eclipse.team.cvs.ui/pom.xml
index c8e57a79d..53426d70c 100644
--- a/bundles/org.eclipse.team.cvs.ui/pom.xml
+++ b/bundles/org.eclipse.team.cvs.ui/pom.xml
@@ -19,6 +19,6 @@
</parent>
<groupId>org.eclipse.team</groupId>
<artifactId>org.eclipse.team.cvs.ui</artifactId>
- <version>3.3.800-SNAPSHOT</version>
+ <version>3.4.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/SelectionPropertyTester.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/SelectionPropertyTester.java
index 8c5586959..2b97b5f52 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/SelectionPropertyTester.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/SelectionPropertyTester.java
@@ -74,7 +74,7 @@ public class SelectionPropertyTester extends PropertyTester {
Method method = findMethod(clazz, property);
if (method != null) {
- invoke = method.invoke(instance, null);
+ invoke = method.invoke(instance, (Object[])null);
return ((Boolean) invoke).booleanValue();
}
} catch (IllegalArgumentException e) {
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/FileDiffOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/FileDiffOperation.java
index 91b2f6d75..542c7449b 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/FileDiffOperation.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/FileDiffOperation.java
@@ -57,35 +57,21 @@ public class FileDiffOperation extends DiffOperation {
}
protected void copyFile() throws CVSException {
- FileChannel tempFileChannel=null;
- FileChannel fileChannel=null;
- try {
- tempFileChannel = new FileInputStream(tempFile).getChannel();
- fileChannel = new FileOutputStream(file).getChannel();
-
- long size= tempFileChannel.size();
+ try (FileInputStream tempFileStream = new FileInputStream(tempFile);
+ FileOutputStream fileStream = new FileOutputStream(file)) {
+
+ FileChannel tempFileChannel = tempFileStream.getChannel();
+ FileChannel fileChannel = fileStream.getChannel();
+
+ long size = tempFileChannel.size();
long bytesTransferred = fileChannel.transferFrom(tempFileChannel, 0, size);
- while (bytesTransferred != size){
- //Transfer from point left off until the end of the file
- bytesTransferred += fileChannel.transferFrom(tempFileChannel, bytesTransferred, size);
- }
+ while (bytesTransferred != size) {
+ // Transfer from point left off until the end of the file
+ bytesTransferred += fileChannel.transferFrom(tempFileChannel, bytesTransferred, size);
+ }
} catch (IOException e) {
- throw CVSException.wrapException(e);
+ throw CVSException.wrapException(e);
} finally {
- if (tempFileChannel!=null)
- try {
- tempFileChannel.close();
- } catch (IOException e) {
- throw CVSException.wrapException(e);
- }
-
- if (fileChannel!=null)
- try {
- fileChannel.close();
- } catch (IOException e) {
- throw CVSException.wrapException(e);
- }
-
if (tempFile != null)
tempFile.delete();
}

Back to the top