Fixed 31481: Fix & improve javadoc generation
authorStefan Hühner <stefan.huehner@openbravo.com>
Sat, 14 Nov 2015 14:19:01 +0100
changeset 28204 b252497be371
parent 28203 3a7faced04fe
child 28205 75603f5172e6
Fixed 31481: Fix & improve javadoc generation

- add modules src + src-test to generated javadoc to not miss all the
code in modules in the docs (convert to subelement sourcepath for this)
- fix referencing java sources in src-test by adding /src to the reference
- add modules/*/lib/test/*.jar to find referenced class in test code
- update link to standard java6 javadoc to use newer url

- 2-3 simple javadoc syntax fixes in java files
build.xml
modules/org.openbravo.client.application/src/org/openbravo/client/application/report/ReportingUtils.java
modules/org.openbravo.service.json/src/org/openbravo/service/json/UnpagedRequestCachedPreference.java
src/org/openbravo/financial/FinancialUtils.java
--- a/build.xml	Sat Nov 14 13:26:10 2015 +0100
+++ b/build.xml	Sat Nov 14 14:19:01 2015 +0100
@@ -554,13 +554,29 @@
   </target>
 
   <target name="generate.java.doc">
-    <javadoc sourcepath="${base.src}:${base.src.test}:${build.AD}:${base.src.core}/src:${base.src.gen}:build/javasqlc/src/:build/javasqlc/srcAD" Windowtitle="${title}" access="protected" Header="${header}" Footer="${footer}" destdir="${build.docs}" linksource="no" maxmemory="1024M">
+    <javadoc Windowtitle="${title}" access="protected" Header="${header}" Footer="${footer}" destdir="${build.docs}" maxmemory="1024M">
+      <sourcepath>
+        <pathelement path="${base.src}" />
+        <pathelement path="${base.src.test}/src" />
+        <pathelement path="${build.AD}" />
+        <pathelement path="${base.src.core}/src" />
+        <pathelement path="${base.src.gen}" />
+        <pathelement path="build/javasqlc/src" />
+        <pathelement path="build/javasqlc/srcAD" />
+        <dirset dir="${base.modules}">
+          <include name="*/src" />
+          <include name="*/src-test" />
+        </dirset>
+      </sourcepath>
       <excludepackage name="org.openbravo.erpWindows.*"/>
       <classpath>
         <path refid="project.class.path"/>
         <pathelement path="lib/build/js.jar" />
+        <fileset dir="${base.modules}">
+          <include name="*/lib/test/*.jar" />
+        </fileset>
       </classpath>
-      <link href="http://java.sun.com/javase/6/docs/api/"/>
+      <link href="http://docs.oracle.com/javase/6/docs/api/"/>
     </javadoc>
   </target>
 
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/report/ReportingUtils.java	Sat Nov 14 13:26:10 2015 +0100
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/report/ReportingUtils.java	Sat Nov 14 14:19:01 2015 +0100
@@ -1127,7 +1127,7 @@
   }
 
   /**
-   * @see ReportingUtils#concatPDFReport(List<JasperPrint>, boolean, OutputStream,
+   * @see ReportingUtils#concatPDFReport(List, boolean, OutputStream,
    *      SimplePdfExporterConfiguration)
    */
   public static void concatPDFReport(List<JasperPrint> jasperPrintList, boolean createBookmarks,
--- a/modules/org.openbravo.service.json/src/org/openbravo/service/json/UnpagedRequestCachedPreference.java	Sat Nov 14 13:26:10 2015 +0100
+++ b/modules/org.openbravo.service.json/src/org/openbravo/service/json/UnpagedRequestCachedPreference.java	Sat Nov 14 14:19:01 2015 +0100
@@ -32,9 +32,10 @@
  * 'Allow Unpaged Datasource Manual Request' preference in cache during the application life cycle,
  * avoiding the time spent to compute the preference value.
  * 
- * This class it is also used by the {@link PreferenceEventHandler} class to detect changes in the
- * preference value, and it that case it invalidates the stored value. This way the next time it is
- * requested, the current value will be retrieved from database again.
+ * This class it is also used by the
+ * {@link org.openbravo.client.application.event.PreferenceEventHandler} class to detect changes in
+ * the preference value, and it that case it invalidates the stored value. This way the next time it
+ * is requested, the current value will be retrieved from database again.
  * 
  * This mechanism for automatic refresh the preference value, only works on environments with a
  * single JVM. In case of Tomcat clustering environments (multiple JVM) it will be necessary to
--- a/src/org/openbravo/financial/FinancialUtils.java	Sat Nov 14 13:26:10 2015 +0100
+++ b/src/org/openbravo/financial/FinancialUtils.java	Sat Nov 14 14:19:01 2015 +0100
@@ -348,10 +348,6 @@
 
   /**
    * Get all the payment details with available credit
-   * 
-   * @param businessPartner
-   * @param currency
-   * @return
    */
   public static ScrollableResults getPaymentsWithCredit(String businessPartnerId, String currencyId) {
     StringBuilder hql = new StringBuilder();