You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@predictionio.apache.org by sh...@apache.org on 2017/05/12 00:31:44 UTC

incubator-predictionio-template-ecom-recommender git commit: Fix warnings

Repository: incubator-predictionio-template-ecom-recommender
Updated Branches:
  refs/heads/develop 1d0d71dc3 -> 6ef7c9b50


Fix warnings

closes #13


Project: http://git-wip-us.apache.org/repos/asf/incubator-predictionio-template-ecom-recommender/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-predictionio-template-ecom-recommender/commit/6ef7c9b5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-predictionio-template-ecom-recommender/tree/6ef7c9b5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-predictionio-template-ecom-recommender/diff/6ef7c9b5

Branch: refs/heads/develop
Commit: 6ef7c9b50d71038dc24cd6e803c61b7cd39f0c23
Parents: 1d0d71d
Author: Naoki Takezoe <ta...@apache.org>
Authored: Fri May 12 09:31:04 2017 +0900
Committer: Shinsuke Sugaya <sh...@apache.org>
Committed: Fri May 12 09:31:04 2017 +0900

----------------------------------------------------------------------
 src/main/scala/ECommAlgorithm.scala | 4 ++--
 src/main/scala/Engine.scala         | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-predictionio-template-ecom-recommender/blob/6ef7c9b5/src/main/scala/ECommAlgorithm.scala
----------------------------------------------------------------------
diff --git a/src/main/scala/ECommAlgorithm.scala b/src/main/scala/ECommAlgorithm.scala
index 3542bd3..1902999 100644
--- a/src/main/scala/ECommAlgorithm.scala
+++ b/src/main/scala/ECommAlgorithm.scala
@@ -320,7 +320,7 @@ class ECommAlgorithm(val ap: ECommAlgorithmParams)
         try {
           event.targetEntityId.get
         } catch {
-          case e => {
+          case e: Exception => {
             logger.error(s"Can't get targetEntityId of event ${event}.")
             throw e
           }
@@ -391,7 +391,7 @@ class ECommAlgorithm(val ap: ECommAlgorithmParams)
       try {
         event.targetEntityId.get
       } catch {
-        case e => {
+        case e: Exception => {
           logger.error("Can't get targetEntityId of event ${event}.")
           throw e
         }

http://git-wip-us.apache.org/repos/asf/incubator-predictionio-template-ecom-recommender/blob/6ef7c9b5/src/main/scala/Engine.scala
----------------------------------------------------------------------
diff --git a/src/main/scala/Engine.scala b/src/main/scala/Engine.scala
index 7777b31..b527bca 100644
--- a/src/main/scala/Engine.scala
+++ b/src/main/scala/Engine.scala
@@ -1,6 +1,6 @@
 package org.example.ecommercerecommendation
 
-import org.apache.predictionio.controller.IEngineFactory
+import org.apache.predictionio.controller.EngineFactory
 import org.apache.predictionio.controller.Engine
 
 case class Query(
@@ -20,7 +20,7 @@ case class ItemScore(
   score: Double
 ) extends Serializable
 
-object ECommerceRecommendationEngine extends IEngineFactory {
+object ECommerceRecommendationEngine extends EngineFactory {
   def apply() = {
     new Engine(
       classOf[DataSource],