summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomasz Zarna2013-09-20 09:34:23 (EDT)
committer Tomasz Zarna2013-09-20 09:34:23 (EDT)
commit874f9d42dddb1e5bdfc1a14d1aa8eeb130e62320 (patch)
treef28512888921769bccc82ecf67e385de500a09f5
parent7e7e8c64f4e7ea0292097c6d9e0f920dc0491939 (diff)
downloadorg.eclipse.mylyn.incubator-874f9d42dddb1e5bdfc1a14d1aa8eeb130e62320.zip
org.eclipse.mylyn.incubator-874f9d42dddb1e5bdfc1a14d1aa8eeb130e62320.tar.gz
org.eclipse.mylyn.incubator-874f9d42dddb1e5bdfc1a14d1aa8eeb130e62320.tar.bz2
fixing compiler warnings in Mylyn Incubatorrefs/changes/42/16642/1
Change-Id: I648ccb832641fda9c032f153a53429249a7dda76 Signed-off-by: Tomasz Zarna <tomasz.zarna@tasktop.com>
-rw-r--r--org.eclipse.mylyn.monitor.usage/src/org/eclipse/mylyn/internal/monitor/usage/InteractionEventLogger.java4
-rw-r--r--org.eclipse.mylyn.monitor.usage/src/org/eclipse/mylyn/internal/monitor/usage/wizards/UsageFileSelectionWizardPage.java11
-rw-r--r--org.eclipse.mylyn.sandbox.tests/src/org/eclipse/mylyn/monitor/reports/tests/ContextParsingTest.java2
-rw-r--r--org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/WebRepositorySettingsPage.java1
4 files changed, 12 insertions, 6 deletions
diff --git a/org.eclipse.mylyn.monitor.usage/src/org/eclipse/mylyn/internal/monitor/usage/InteractionEventLogger.java b/org.eclipse.mylyn.monitor.usage/src/org/eclipse/mylyn/internal/monitor/usage/InteractionEventLogger.java
index 9c464d0..e860783 100644
--- a/org.eclipse.mylyn.monitor.usage/src/org/eclipse/mylyn/internal/monitor/usage/InteractionEventLogger.java
+++ b/org.eclipse.mylyn.monitor.usage/src/org/eclipse/mylyn/internal/monitor/usage/InteractionEventLogger.java
@@ -34,9 +34,9 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Status;
+import org.eclipse.mylyn.commons.core.HtmlStreamTokenizer;
+import org.eclipse.mylyn.commons.core.HtmlStreamTokenizer.Token;
import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.commons.net.HtmlStreamTokenizer;
-import org.eclipse.mylyn.commons.net.HtmlStreamTokenizer.Token;
import org.eclipse.mylyn.internal.context.core.InteractionContextExternalizer;
import org.eclipse.mylyn.monitor.core.AbstractMonitorLog;
import org.eclipse.mylyn.monitor.core.IInteractionEventListener;
diff --git a/org.eclipse.mylyn.monitor.usage/src/org/eclipse/mylyn/internal/monitor/usage/wizards/UsageFileSelectionWizardPage.java b/org.eclipse.mylyn.monitor.usage/src/org/eclipse/mylyn/internal/monitor/usage/wizards/UsageFileSelectionWizardPage.java
index 4b0fc92..bfaef6e 100644
--- a/org.eclipse.mylyn.monitor.usage/src/org/eclipse/mylyn/internal/monitor/usage/wizards/UsageFileSelectionWizardPage.java
+++ b/org.eclipse.mylyn.monitor.usage/src/org/eclipse/mylyn/internal/monitor/usage/wizards/UsageFileSelectionWizardPage.java
@@ -58,6 +58,7 @@ public class UsageFileSelectionWizardPage extends WizardPage {
private static List<File> getBackupFiles() {
ArrayList<File> backupFiles = new ArrayList<File>();
+ FileInputStream inputStream = null;
try {
String destination = MonitorFileRolloverJob.getZippedMonitorFileDirPath();
@@ -72,7 +73,7 @@ public class UsageFileSelectionWizardPage extends WizardPage {
submissionLogFile.createNewFile();
}
- FileInputStream inputStream = new FileInputStream(submissionLogFile);
+ inputStream = new FileInputStream(submissionLogFile);
int bytesRead = 0;
byte[] buffer = new byte[1000];
@@ -100,6 +101,14 @@ public class UsageFileSelectionWizardPage extends WizardPage {
// TODO Auto-generated catch block
e.printStackTrace();
+ } finally {
+ try {
+ if (inputStream != null) {
+ inputStream.close();
+ }
+ } catch (IOException ioe) {
+ // ignore
+ }
}
return backupFiles;
}
diff --git a/org.eclipse.mylyn.sandbox.tests/src/org/eclipse/mylyn/monitor/reports/tests/ContextParsingTest.java b/org.eclipse.mylyn.sandbox.tests/src/org/eclipse/mylyn/monitor/reports/tests/ContextParsingTest.java
index 00320f8..ef015ca 100644
--- a/org.eclipse.mylyn.sandbox.tests/src/org/eclipse/mylyn/monitor/reports/tests/ContextParsingTest.java
+++ b/org.eclipse.mylyn.sandbox.tests/src/org/eclipse/mylyn/monitor/reports/tests/ContextParsingTest.java
@@ -56,7 +56,6 @@ public class ContextParsingTest extends TestCase {
InteractionContextScaling scalingFactors = new InteractionContextScaling();
// scalingFactors.setDecay(new ScalingFactor("decay", .05f));
InteractionContext context = new InteractionContext("test", scalingFactors);
- int numEvents = 0;
for (InteractionEvent event : events) {
if (event.isValidStructureHandle()) {
// if (SelectionMonitor.isValidStructureHandle(event)) {
@@ -77,7 +76,6 @@ public class ContextParsingTest extends TestCase {
assertTrue("should be positive: " + element.getInterest().getValue(), element.getInterest()
.getValue() >= 0);
- numEvents++;
}
}
}
diff --git a/org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/WebRepositorySettingsPage.java b/org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/WebRepositorySettingsPage.java
index 8145d12..711ed38 100644
--- a/org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/WebRepositorySettingsPage.java
+++ b/org.eclipse.mylyn.web.tasks/src/org/eclipse/mylyn/internal/web/tasks/WebRepositorySettingsPage.java
@@ -124,7 +124,6 @@ public class WebRepositorySettingsPage extends AbstractRepositorySettingsPage im
getContainer().updateButtons();
}
- @SuppressWarnings("restriction")
@Override
protected void createAdditionalControls(Composite parent) {
addRepositoryTemplatesToServerUrlCombo();