olabusayoT commented on a change in pull request #273: WIP: Add User Defined 
Functions Capability
URL: https://github.com/apache/incubator-daffodil/pull/273#discussion_r334978673
 
 

 ##########
 File path: 
daffodil-udf/src/test/java/org/badudfs/evaluate/StringFunctions/StringFunctionsProvider.java
 ##########
 @@ -16,26 +16,17 @@
  */
 package org.badudfs.evaluate.StringFunctions;
 
-import org.apache.daffodil.udf.*;
+import org.apache.daffodil.udf.UserDefinedFunctionProvider;
 
-public class StringFunctionsProvider extends UDFunctionProvider {
-       public StringFunctionsProvider() {
-               super.setFunctionClasses( new Class<?>[] { FuncA.class, 
Replace.class } );
-       }
-
-       public Object lookupFunctionClass(String namespace, String name) {
-               Object functionClass = null;
-
-               String nn = String.join("_", namespace, name);
-
-               switch (nn) {
-               case "com.ext.badudfs.StringFunctions_replace":
-                       functionClass = new Replace();
-                       break;
-               case "com.ext.badudfs.StringFunctions_funcA":
-                       functionClass = new FuncA();
-                       break;
-               }
-               return functionClass;
-       }
+/**
+ * UDF Provider for Negative Unit test
+ *
+ * Contains classes with invalid or missing evaluate functions
+ */
+public class StringFunctionsProvider extends UserDefinedFunctionProvider {
+  @Override
+  public Class<?>[] getUserDefinedFunctionClasses() {
+    // TODO Auto-generated method stub
 
 Review comment:
   No they are not. I'd used eclipse to auto generate the stub for the abstract 
method, implemented it, and then had forgotten to remove the TODO. Will remove!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to