From 67287398a505f879d33c06888cc96b8347a3f5c1 Mon Sep 17 00:00:00 2001
From: Matthew Swift <matthew.swift@forgerock.com>
Date: Wed, 13 Jun 2012 19:55:12 +0000
Subject: [PATCH] Fix compiler warnings on JDK7.

---
 opends/src/build-tools/org/opends/build/tools/CoverageDiff.java |   14 +++++---------
 1 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/opends/src/build-tools/org/opends/build/tools/CoverageDiff.java b/opends/src/build-tools/org/opends/build/tools/CoverageDiff.java
index 2e456de..277564f 100644
--- a/opends/src/build-tools/org/opends/build/tools/CoverageDiff.java
+++ b/opends/src/build-tools/org/opends/build/tools/CoverageDiff.java
@@ -23,6 +23,7 @@
  *
  *
  *      Copyright 2008 Sun Microsystems, Inc.
+ *      Portions copyright 2012 ForgeRock AS.
  */
 package org.opends.build.tools;
 
@@ -41,7 +42,6 @@
 import org.tmatesoft.svn.core.SVNException;
 import org.tmatesoft.svn.core.internal.io.dav.DAVRepositoryFactory;
 import org.tmatesoft.svn.core.wc.SVNClientManager;
-import org.tmatesoft.svn.core.wc.SVNDiffClient;
 import org.tmatesoft.svn.core.wc.SVNRevision;
 
 public class CoverageDiff extends Task {
@@ -188,7 +188,7 @@
 
     // So we can go over http:// and https:// when diff'ing against previous versions
     DAVRepositoryFactory.setup();
-    
+
     IReportDataView emmaDataView = null;
     try
     {
@@ -307,7 +307,7 @@
     SVNRevision baseRevision = SVNRevision.parse(fromRevision);
     System.out.println("Doing coverage diff from revision: " + baseRevision.toString());
 
-    ourClientManager.getDiffClient().doDiff(workspaceRoot, baseRevision, 
+    ourClientManager.getDiffClient().doDiff(workspaceRoot, baseRevision,
             workspaceRoot, SVNRevision.WORKING, SVNDepth.INFINITY, false,
             new FileOutputStream(diffFile), null);
 
@@ -650,7 +650,6 @@
     int workingCopyBegin;
     int workingCopyRange;
     int otherCopyBegin;
-    int otherCopyRange;
 
     Double[] modCoverage = new Double[4];
     modCoverage[COVERED_MOD_EXE_LINES] = 0.0;
@@ -671,15 +670,12 @@
     int workingCopyEndIdx = chunkHeader.indexOf(" ", workingCopyCommaIdx);
     int otherCopyBeginIdx = chunkHeader.indexOf(otherCopyFlag);
     int otherCopyCommaIdx = chunkHeader.indexOf(",", otherCopyBeginIdx);
-    int otherCopyEndIdx = chunkHeader.indexOf(" ", otherCopyCommaIdx);
     workingCopyBegin = Integer.parseInt(
         chunkHeader.substring(workingCopyBeginIdx + 1, workingCopyCommaIdx));
     workingCopyRange = Integer.parseInt(
         chunkHeader.substring(workingCopyCommaIdx + 1, workingCopyEndIdx));
     otherCopyBegin = Integer.parseInt(
         chunkHeader.substring(otherCopyBeginIdx + 1, otherCopyCommaIdx));
-    otherCopyRange = Integer.parseInt(
-        chunkHeader.substring(otherCopyCommaIdx + 1, otherCopyEndIdx));
 
     String chunkLine;
     SrcFileItem.LineCoverageData lCoverageData = null;
@@ -804,12 +800,12 @@
       return null;
     }
 
-    for(Iterator packages = rootItem.getChildren(); packages.hasNext();)
+    for(Iterator<?> packages = rootItem.getChildren(); packages.hasNext();)
     {
       IItem packageItem = (IItem)packages.next();
       if(packageItem.getName().equals(srcPackageName))
       {
-        for(Iterator sources = packageItem.getChildren(); sources.hasNext();)
+        for(Iterator<?> sources = packageItem.getChildren(); sources.hasNext();)
         {
           SrcFileItem sourceItem = (SrcFileItem)sources.next();
           if(sourceItem.getName().equals(srcFileName))

--
Gitblit v1.10.0