Revision: 17663
          http://sourceforge.net/p/gate/code/17663
Author:   markagreenwood
Date:     2014-03-14 20:07:37 +0000 (Fri, 14 Mar 2014)
Log Message:
-----------
fixed a few issues and switched on the compiler warnings

Modified Paths:
--------------
    gate/trunk/plugins/Tools/build.xml
    gate/trunk/plugins/Tools/src/gate/qa/QualityAssurancePR.java

Modified: gate/trunk/plugins/Tools/build.xml
===================================================================
--- gate/trunk/plugins/Tools/build.xml  2014-03-14 16:19:05 UTC (rev 17662)
+++ gate/trunk/plugins/Tools/build.xml  2014-03-14 20:07:37 UTC (rev 17663)
@@ -1,94 +1,93 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
 <project basedir="." default="all" name="tools">
-  <!-- Prevent Ant from warning about includeantruntime not being set -->
-  <property name="build.sysclasspath" value="ignore" />
+       <!-- Prevent Ant from warning about includeantruntime not being set -->
+       <property name="build.sysclasspath" value="ignore" />
 
-  <property file="build.properties" />
-  <property name="plugin.name" value="Tools"/>
+       <property file="build.properties" />
+       <property name="plugin.name" value="Tools" />
 
-  <!-- Make environment variables available -->
-  <property environment="env" />
+       <!-- Make environment variables available -->
+       <property environment="env" />
 
-  <!-- If environment variable GATE_HOME is set, use it for
+       <!-- If environment variable GATE_HOME is set, use it for
        gate.home (unless it was already set in build.properties -->
-  <condition property="gate.home" value="${env.GATE_HOME}">
-    <isset property="env.GATE_HOME"/>
-  </condition>
+       <condition property="gate.home" value="${env.GATE_HOME}">
+               <isset property="env.GATE_HOME" />
+       </condition>
 
-  <property name="dest" value="classes"/>
-  <property name="gate.home" value="../.."/>
-  <property name="src" value="src"/>
-  <property name="doc.dir" location="doc" />
-  <property name="javadoc.dir" location="${doc.dir}/javadoc" />
+       <property name="dest" value="classes" />
+       <property name="gate.home" value="../.." />
+       <property name="src" value="src" />
+       <property name="doc.dir" location="doc" />
+       <property name="javadoc.dir" location="${doc.dir}/javadoc" />
 
-  <fileset id="gatelib.classpath" dir="${gate.home}/lib">
-    <include name="*.jar"/>
-    <include name="*.zip"/>
-  </fileset>
+       <fileset id="gatelib.classpath" dir="${gate.home}/lib">
+               <include name="*.jar" />
+               <include name="*.zip" />
+       </fileset>
 
-  <fileset id="gate.classpath" dir="${gate.home}/bin">
-    <include name="*.jar"/>
-    <include name="*.zip"/>
-  </fileset>
+       <fileset id="gate.classpath" dir="${gate.home}/bin">
+               <include name="*.jar" />
+               <include name="*.zip" />
+       </fileset>
 
-  <path id="compile.classpath">
-       <fileset refid="gatelib.classpath"/>
-       <fileset refid="gate.classpath"/>
-  </path>
+       <path id="compile.classpath">
+               <fileset refid="gatelib.classpath" />
+               <fileset refid="gate.classpath" />
+       </path>
 
-  <target name="jar" depends="compile">
-    <jar compress="false" destfile="tools.jar">
-      <fileset dir="${dest}"/>
-    </jar>
-  </target>
+       <target name="jar" depends="compile">
+               <jar compress="false" destfile="tools.jar">
+                       <fileset dir="${dest}" />
+               </jar>
+       </target>
 
 
-  <target name="compile" depends="init">
-    <javac encoding="utf-8" classpathref="compile.classpath" debug="true" 
deprecation="true" destdir="${dest}" nowarn="false" source="1.6" target="1.6">
-      <src path="${src}"/>
-    </javac>
-  </target>
+       <target name="compile" depends="init">
+               <javac encoding="utf-8" classpathref="compile.classpath" 
debug="true" deprecation="true" destdir="${dest}" nowarn="false" source="1.6" 
target="1.6">
+                       <src path="${src}" />
+                       <compilerarg value="-Xmaxwarns" />
+                       <compilerarg value="${gate.compile.maxwarnings}" />
+                       <compilerarg value="-Xlint:all" />
+               </javac>
+       </target>
 
-  <!-- Build JavaDoc documentation -->
-  <target name="doc.prepare">
-    <mkdir dir="${javadoc.dir}" />
-  </target>
+       <!-- Build JavaDoc documentation -->
+       <target name="doc.prepare">
+               <mkdir dir="${javadoc.dir}" />
+       </target>
 
-  <target name="javadoc" depends="doc.prepare">
-    <javadoc destdir="${javadoc.dir}" packagenames="*"
-             classpathref="compile.classpath"
-             encoding="UTF-8"
-             windowtitle="${plugin.name} JavaDoc"
-             source="1.6">
-      <sourcepath>
-        <pathelement location="${src}" />
-      </sourcepath>
-      <link href="http://docs.oracle.com/javase/6/docs/api/"; />
-      <link href="http://gate.ac.uk/gate/doc/javadoc/"; />
-    </javadoc>
-  </target>
+       <target name="javadoc" depends="doc.prepare">
+               <javadoc destdir="${javadoc.dir}" packagenames="*" 
classpathref="compile.classpath" encoding="UTF-8" windowtitle="${plugin.name} 
JavaDoc" source="1.6">
+                       <sourcepath>
+                               <pathelement location="${src}" />
+                       </sourcepath>
+                       <link href="http://docs.oracle.com/javase/6/docs/api/"; 
/>
+                       <link href="http://gate.ac.uk/gate/doc/javadoc/"; />
+               </javadoc>
+       </target>
 
-  <target name="clean.classes">
-    <delete failonerror="false" includeemptydirs="true">
-      <fileset dir="${dest}"/>
-    </delete>
-  </target>
+       <target name="clean.classes">
+               <delete failonerror="false" includeemptydirs="true">
+                       <fileset dir="${dest}" />
+               </delete>
+       </target>
 
-  <target name="clean" depends="clean.classes">
-    <delete file="tools.jar"/>
-  </target>
+       <target name="clean" depends="clean.classes">
+               <delete file="tools.jar" />
+       </target>
 
-  <target name="init">
-    <mkdir dir="${dest}"/>
-  </target>
+       <target name="init">
+               <mkdir dir="${dest}" />
+       </target>
 
-  <!-- Build everything - the code and JavaDoc -->
-  <target name="all" depends="jar, javadoc" />
+       <!-- Build everything - the code and JavaDoc -->
+       <target name="all" depends="jar, javadoc" />
 
-  <!-- targets required by the top-level build file -->
-  <target name="build" depends="jar"/>
-  <target name="distro.prepare" depends="clean.classes" />
-  <target name="test" />
+       <!-- targets required by the top-level build file -->
+       <target name="build" depends="jar" />
+       <target name="distro.prepare" depends="clean.classes" />
+       <target name="test" />
 
 </project>

Modified: gate/trunk/plugins/Tools/src/gate/qa/QualityAssurancePR.java
===================================================================
--- gate/trunk/plugins/Tools/src/gate/qa/QualityAssurancePR.java        
2014-03-14 16:19:05 UTC (rev 17662)
+++ gate/trunk/plugins/Tools/src/gate/qa/QualityAssurancePR.java        
2014-03-14 20:07:37 UTC (rev 17663)
@@ -50,6 +50,8 @@
 public class QualityAssurancePR extends AbstractLanguageAnalyser implements
                                                                 
ProcessingResource {
 
+  private static final long serialVersionUID = 806633306890012316L;
+
   /**
    * Key annotation set name
    */
@@ -119,7 +121,7 @@
     }
 
     // check if we are processing the last document in the corpus
-    Document lastDocument = (Document)corpus.get(corpus.size() - 1);
+    Document lastDocument = corpus.get(corpus.size() - 1);
     if(lastDocument != document) {
       return;
     }
@@ -189,7 +191,7 @@
       boolean documentWasLoaded = corpus.isDocumentLoaded(row);
 
       // obtain the document from corpus
-      Document document = (Document)corpus.get(row);
+      Document document = corpus.get(row);
       documentNames.add(document.getName());
 
       // get annotations from the selected key and response annotation

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs

Reply via email to