Change getCanonicalName() to getName() in xacml-pdp 13/90013/1
authorJim Hahn <jrh3@att.com>
Mon, 17 Jun 2019 14:30:20 +0000 (10:30 -0400)
committerJim Hahn <jrh3@att.com>
Mon, 17 Jun 2019 14:30:20 +0000 (10:30 -0400)
Per javadocs, getName() should generally be used instead of
Class.getCanonicalName(). This change only applies to classes; it
does not apply to File objects.

Change-Id: Id9ad514a7ba10e7cdbf292bba2b07135bdbd2572
Issue-ID: POLICY-1646
Signed-off-by: Jim Hahn <jrh3@att.com>
main/src/main/java/org/onap/policy/pdpx/main/rest/XacmlPdpRestServer.java
main/src/main/java/org/onap/policy/pdpx/main/startstop/XacmlPdpCommandLineArguments.java

index a64953b..4b89cb1 100644 (file)
@@ -70,7 +70,7 @@ public class XacmlPdpRestServer implements Startable {
             //
             for (final HttpServletServer server : servers) {
                 if (server.isAaf()) {
-                    server.addFilterClass(null, XacmlPdpAafFilter.class.getCanonicalName());
+                    server.addFilterClass(null, XacmlPdpAafFilter.class.getName());
                 }
                 server.start();
             }
@@ -95,7 +95,7 @@ public class XacmlPdpRestServer implements Startable {
         props.setProperty(HTTP_SERVER_SERVICES + SEPARATOR + restServerParameters.getName() + ".port",
                 Integer.toString(restServerParameters.getPort()));
         props.setProperty(HTTP_SERVER_SERVICES + SEPARATOR + restServerParameters.getName() + ".restClasses",
-                XacmlPdpRestController.class.getCanonicalName());
+                XacmlPdpRestController.class.getName());
         props.setProperty(HTTP_SERVER_SERVICES + SEPARATOR + restServerParameters.getName() + ".managed", "false");
         props.setProperty(HTTP_SERVER_SERVICES + SEPARATOR + restServerParameters.getName() + ".swagger", "true");
         props.setProperty(HTTP_SERVER_SERVICES + SEPARATOR + restServerParameters.getName() + ".userName",
index 7a04d23..f393fc9 100644 (file)
@@ -137,7 +137,7 @@ public class XacmlPdpCommandLineArguments {
         }
 
         if (commandLine.hasOption('h')) {
-            return help(Main.class.getCanonicalName());
+            return help(Main.class.getName());
         }
 
         if (commandLine.hasOption('v')) {