You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opennlp.apache.org by to...@apache.org on 2018/10/02 11:46:00 UTC

[opennlp] branch master updated: OPENNLP-1222 - build opennlp with java11 (#335)

This is an automated email from the ASF dual-hosted git repository.

tommaso pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/opennlp.git


The following commit(s) were added to refs/heads/master by this push:
     new 02a4112  OPENNLP-1222 - build opennlp with java11 (#335)
02a4112 is described below

commit 02a411205b6f812c5a7f54530ffeb03e473382ed
Author: Tommaso Teofili <to...@gmail.com>
AuthorDate: Tue Oct 2 13:45:47 2018 +0200

    OPENNLP-1222 - build opennlp with java11 (#335)
---
 .../java/opennlp/tools/langdetect/LanguageDetectorFactory.java |  8 ++++----
 .../src/main/java/opennlp/tools/ml/model/DataIndexer.java      |  2 +-
 opennlp-tools/src/main/java/opennlp/tools/util/StringUtil.java |  8 ++++----
 .../src/main/java/opennlp/tools/util/TrainingParameters.java   | 10 ++++++----
 pom.xml                                                        |  9 ++++++++-
 5 files changed, 23 insertions(+), 14 deletions(-)

diff --git a/opennlp-tools/src/main/java/opennlp/tools/langdetect/LanguageDetectorFactory.java b/opennlp-tools/src/main/java/opennlp/tools/langdetect/LanguageDetectorFactory.java
index 422a98d..b989887 100644
--- a/opennlp-tools/src/main/java/opennlp/tools/langdetect/LanguageDetectorFactory.java
+++ b/opennlp-tools/src/main/java/opennlp/tools/langdetect/LanguageDetectorFactory.java
@@ -28,9 +28,9 @@ import opennlp.tools.util.normalizer.UrlCharSequenceNormalizer;
 
 
 /**
- * <p>Default factory used by Language Detector. Extend this class to change the Language Detector
- * behaviour, such as the {@link LanguageDetectorContextGenerator}.</p>
- * <p>The default {@link DefaultLanguageDetectorContextGenerator} will use char n-grams of
+ * Default factory used by Language Detector. Extend this class to change the Language Detector
+ * behaviour, such as the {@link LanguageDetectorContextGenerator}.
+ * The default {@link DefaultLanguageDetectorContextGenerator} will use char n-grams of
  * size 1 to 3 and the following normalizers:
  * <ul>
  * <li> {@link EmojiCharSequenceNormalizer}
@@ -39,7 +39,7 @@ import opennlp.tools.util.normalizer.UrlCharSequenceNormalizer;
  * <li> {@link NumberCharSequenceNormalizer}
  * <li> {@link ShrinkCharSequenceNormalizer}
  * </ul>
- * </p>
+ *
  */
 public class LanguageDetectorFactory extends BaseToolFactory {
 
diff --git a/opennlp-tools/src/main/java/opennlp/tools/ml/model/DataIndexer.java b/opennlp-tools/src/main/java/opennlp/tools/ml/model/DataIndexer.java
index 6c2955c..e03382e 100644
--- a/opennlp-tools/src/main/java/opennlp/tools/ml/model/DataIndexer.java
+++ b/opennlp-tools/src/main/java/opennlp/tools/ml/model/DataIndexer.java
@@ -85,7 +85,7 @@ public interface DataIndexer {
   /**
    * Performs the data indexing. Make sure the init(...) method is called first.
    * 
-   * @param eventStream {@link ObjectStream<Event>}
+   * @param eventStream a stream of events
    */
   void index(ObjectStream<Event> eventStream) throws IOException;
 }
diff --git a/opennlp-tools/src/main/java/opennlp/tools/util/StringUtil.java b/opennlp-tools/src/main/java/opennlp/tools/util/StringUtil.java
index 3ed769b..c3bd7e6 100644
--- a/opennlp-tools/src/main/java/opennlp/tools/util/StringUtil.java
+++ b/opennlp-tools/src/main/java/opennlp/tools/util/StringUtil.java
@@ -101,11 +101,11 @@ public class StringUtil {
   }
 
   /**
-   * Returns <tt>true</tt> if {@link CharSequence#length()} is
-   * <tt>0</tt> or <tt>null</tt>.
+   * Returns {@code true} if {@link CharSequence#length()} is
+   * {@code 0} or {@code null}.
    *
-   * @return <tt>true</tt> if {@link CharSequence#length()} is <tt>0</tt>, otherwise
-   *         <tt>false</tt>
+   * @return {@code true} if {@link CharSequence#length()} is {@code 0}, otherwise
+   *         {@code false}
    *
    * @since 1.5.1
    */
diff --git a/opennlp-tools/src/main/java/opennlp/tools/util/TrainingParameters.java b/opennlp-tools/src/main/java/opennlp/tools/util/TrainingParameters.java
index 6fc351c..8006a4d 100644
--- a/opennlp-tools/src/main/java/opennlp/tools/util/TrainingParameters.java
+++ b/opennlp-tools/src/main/java/opennlp/tools/util/TrainingParameters.java
@@ -311,23 +311,25 @@ public class TrainingParameters {
   }
 
   /**
-   * get a String parameter
+   * get a String parameter.
+   *
+   * {@link java.lang.ClassCastException} can be thrown if the value is not {@code String}
    * @param key
    * @param defaultValue
    * @return
-   * @throws {@link java.lang.ClassCastException} can be thrown if the value is not {@link String}
    */
   public String getStringParameter(String key, String defaultValue) {
     return getStringParameter(null, key, defaultValue);
   }
 
   /**
-   * get a String parameter in the specified namespace
+   * get a String parameter in the specified namespace.
+   *
+   * {@link java.lang.ClassCastException} can be thrown if the value is not {@link String}
    * @param namespace
    * @param key
    * @param defaultValue
    * @return
-   * @throws {@link java.lang.ClassCastException} can be thrown if the value is not {@link String}
    */
   public String getStringParameter(String namespace, String key, String defaultValue) {
     Object value = parameters.get(getKey(namespace, key));
diff --git a/pom.xml b/pom.xml
index 37a37e4..4e69fdd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -139,7 +139,7 @@
 		<java.version>1.8</java.version>
 		<maven.compiler.target>1.8</maven.compiler.target>
 		<maven.version>3.3.9</maven.version>
-		<enforcer.plugin.version>1.4.1</enforcer.plugin.version>
+		<enforcer.plugin.version>3.0.0-M2</enforcer.plugin.version>
 		<junit.version>4.12</junit.version>
 		<checkstyle.plugin.version>2.17</checkstyle.plugin.version>
 		<opennlp.forkCount>1.0C</opennlp.forkCount>
@@ -163,6 +163,12 @@
 				</plugin>
 
 				<plugin>
+					<groupId>org.apache.maven.plugins</groupId>
+					<artifactId>maven-assembly-plugin</artifactId>
+					<version>3.1.0</version>
+				</plugin>
+
+				<plugin>
 					<groupId>org.apache.felix</groupId>
 					<artifactId>maven-bundle-plugin</artifactId>
 					<version>3.2.0</version>
@@ -315,6 +321,7 @@
 
 			<plugin>
 				<artifactId>maven-javadoc-plugin</artifactId>
+				<version>3.0.1</version>
 				<configuration>
 					<additionalparam>-Xdoclint:none</additionalparam>
 				</configuration>