浏览代码

Fixed typos in documentation and exception

Nagy Attila Gabor 6 年之前
父节点
当前提交
5ccf4ceaad

+ 3 - 3
RISE-V2G-EVCC/EVCCConfig.properties

@@ -86,9 +86,9 @@ energy.transfermode.requested = AC_three_phase_core
 #
 # Implementation classes
 #---------------------------------------------
-# If you want to replace the implementations the set the following attributes
-# to the name of your classes
-# When omitted default dummy implementations will be used
+# If you want to replace the implementation then set the following value
+# to the name of your class
+# When omitted default dummy implementation will be used
 implementation.evcc.controller = com.v2gclarity.risev2g.evcc.evController.DummyEVController
 
 # XML representation of messages

+ 1 - 1
RISE-V2G-SECC/SECCConfig.properties

@@ -79,7 +79,7 @@ environment.private = false
 #
 # Implementation classes
 #---------------------------------------------
-# If you want to replace the implementations the set the following attributes
+# If you want to replace the implementations then set the following values
 # to the name of your classes
 # When omitted default dummy implementations will be used
 implementation.secc.backend = com.v2gclarity.risev2g.secc.backend.DummyBackendInterface

+ 2 - 2
RISE-V2G-Shared/src/main/java/com/v2gclarity/risev2g/shared/misc/V2GImplementationFactory.java

@@ -40,7 +40,7 @@ abstract public class V2GImplementationFactory {
 	 * Builds an object instance from the configuration properties
 	 * The configuration should hold the class of the instance that
 	 * will be built.
-	 * @param propertyName Name of the property the contains the fully qualified class name
+	 * @param propertyName Name of the property that contains the fully qualified class name
 	 * @param cls Target class of the build instance
 	 * @param params Optional arguments to the constructor
 	 * @return
@@ -61,7 +61,7 @@ abstract public class V2GImplementationFactory {
 			Constructor<?> constructor = clazz.getConstructor(paramClasses);
 			Object instance = constructor.newInstance(params);
 			if (!cls.isInstance(instance)) {
-				throw new Exception("Instantiated object is not of excepted type");
+				throw new Exception("Instantiated object does not match the expected type " + cls.getCanonicalName());
 			}
 			return cls.cast(instance);
 		} catch (Exception e) {