fixing compiler warnings in Mylyn Incubator

Change-Id: I648ccb832641fda9c032f153a53429249a7dda76
Signed-off-by: Tomasz Zarna <tomasz.zarna@tasktop.com>
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.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 @@
 
 	private static List<File> getBackupFiles() {
 		ArrayList<File> backupFiles = new ArrayList<File>();
+		FileInputStream inputStream = null;
 		try {
 
 			String destination = MonitorFileRolloverJob.getZippedMonitorFileDirPath();
@@ -72,7 +73,7 @@
 					submissionLogFile.createNewFile();
 				}
 
-				FileInputStream inputStream = new FileInputStream(submissionLogFile);
+				inputStream = new FileInputStream(submissionLogFile);
 
 				int bytesRead = 0;
 				byte[] buffer = new byte[1000];
@@ -100,6 +101,14 @@
 			// 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 @@
 		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 @@
 
 					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 @@
 		getContainer().updateButtons();
 	}
 
-	@SuppressWarnings("restriction")
 	@Override
 	protected void createAdditionalControls(Composite parent) {
 		addRepositoryTemplatesToServerUrlCombo();