]> source.dussan.org Git - poi.git/commitdiff
fix license check failure
authorPJ Fanning <fanningpj@apache.org>
Wed, 28 Feb 2018 10:30:05 +0000 (10:30 +0000)
committerPJ Fanning <fanningpj@apache.org>
Wed, 28 Feb 2018 10:30:05 +0000 (10:30 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1825547 13f79535-47bb-0310-9956-ffa450edef68

build.xml
src/examples/src/org/apache/poi/xwpf/usermodel/examples/BarChartExampleDOCX.java

index 242b2513a5a8028193ff05a0c58324f123325bb0..670585b736033f50c8ce8f89f1d86a8323fe151c 100644 (file)
--- a/build.xml
+++ b/build.xml
@@ -2046,46 +2046,46 @@ under the License.
     </target>
 
     <target name="rat-check" depends="init" description="Runs the Apache Creadur Rat check against the source code, to spot any files which are missing the correct license headers">
-       <mkdir dir="${rat.reportdir}" />
+        <mkdir dir="${rat.reportdir}" />
 
-       <typedef resource="org/apache/rat/anttasks/antlib.xml"
+        <typedef resource="org/apache/rat/anttasks/antlib.xml"
              uri="antlib:org.apache.rat.anttasks"
              classpath="${rat.jar}" />
-       <rat:report xmlns:rat="antlib:org.apache.rat.anttasks" reportFile="${rat.report}">
-           <fileset dir="src/">
-              <exclude name="documentation/*.txt" />
-              <exclude name="documentation/content/xdocs/dtd/" />
-              <exclude name="documentation/content/xdocs/entity/" />
-              <exclude name="scratchpad/testcases/dummy.txt" />
-              <exclude name="contrib/testcases/dummy.txt" />
-              <exclude name="examples/lib/dummy.txt" />
-              <exclude name="resources/ooxml/org/apache/poi/xslf/usermodel/notesMaster.xml" />
-              <exclude name="resources/ooxml/org/apache/poi/xslf/usermodel/empty.pptx" />
-              <exclude name="resources/main/org/apache/poi/sl/draw/geom/presetShapeDefinitions.xml" />
-                 <exclude name="resources/ooxml/org/apache/poi/xssf/usermodel/presetTableStyles.xml" />
-              <exclude name="ooxml/resources/org/apache/poi/xdgf/visio.xsd" />
-              <exclude name="examples/src/org/apache/poi/xslf/usermodel/*-chart-data.txt" />
-              <exclude name="**/*.iml" />
-              <exclude name="documentation/resources/images/pb-poi.cdr"/>
-                 <exclude name="scratchpad/models/poi-hdf.zargo"/>
-           </fileset>
-       </rat:report>
-
-       <!-- remove clutter to compact build output -->
-       <!-- replaceregexp doesn't work within loadfile ... -->
-       <replaceregexp file="${rat.report}" match="\s+Printing headers for files without AL header.++" replace="" flags="s"/>
-
-       <loadfile property="rat.reportcontent" srcFile="${rat.report}">
+        <rat:report xmlns:rat="antlib:org.apache.rat.anttasks" reportFile="${rat.report}">
+            <fileset dir="src/">
+                <exclude name="documentation/*.txt" />
+                <exclude name="documentation/content/xdocs/dtd/" />
+                <exclude name="documentation/content/xdocs/entity/" />
+                <exclude name="scratchpad/testcases/dummy.txt" />
+                <exclude name="contrib/testcases/dummy.txt" />
+                <exclude name="examples/lib/dummy.txt" />
+                <exclude name="examples/src/org/apache/poi/**/*-chart-data.txt" />
+                <exclude name="resources/ooxml/org/apache/poi/xslf/usermodel/notesMaster.xml" />
+                <exclude name="resources/ooxml/org/apache/poi/xslf/usermodel/empty.pptx" />
+                <exclude name="resources/main/org/apache/poi/sl/draw/geom/presetShapeDefinitions.xml" />
+                <exclude name="resources/ooxml/org/apache/poi/xssf/usermodel/presetTableStyles.xml" />
+                <exclude name="ooxml/resources/org/apache/poi/xdgf/visio.xsd" />
+                <exclude name="**/*.iml" />
+                <exclude name="documentation/resources/images/pb-poi.cdr"/>
+                <exclude name="scratchpad/models/poi-hdf.zargo"/>
+            </fileset>
+        </rat:report>
+
+        <!-- remove clutter to compact build output -->
+        <!-- replaceregexp doesn't work within loadfile ... -->
+        <replaceregexp file="${rat.report}" match="\s+Printing headers for files without AL header.++" replace="" flags="s"/>
+
+        <loadfile property="rat.reportcontent" srcFile="${rat.report}">
             <filterchain>
                 <linecontainsregexp negate="true">
                     <regexp pattern="^\s+(AL|B|N)\s+"/>
                 </linecontainsregexp>
             </filterchain>
-       </loadfile>
-       <echo>${rat.reportcontent}</echo>
+        </loadfile>
+        <echo>${rat.reportcontent}</echo>
 
-       <!-- fail the build if at least one note is in the report -->
-       <fail><condition><matches pattern="[1-9][0-9]* Unknown Licens" string="${rat.reportcontent}"/></condition></fail>
+        <!-- fail the build if at least one note is in the report -->
+        <fail><condition><matches pattern="[1-9][0-9]* Unknown Licens" string="${rat.reportcontent}"/></condition></fail>
     </target>
 
     <!-- Runs the Forbiddens APIs checker against the source code, to -->
index efc5a70f872d247d7ffa1327f2a16dea95bd96e7..6d73c87221623684955dfe16624cab6e9e2e62a1 100644 (file)
@@ -71,7 +71,7 @@ public class BarChartExampleDOCX {
 
             // set model
             String ln;
-            while((ln = modelReader.readLine()) != null){
+            while((ln = modelReader.readLine()) != null) {
                 String[] vals = ln.split("\\s+");
                 listCategories.add(vals[0]);
                 listValues.add(Double.valueOf(vals[1]));