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

doebele pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/empire-db.git


The following commit(s) were added to refs/heads/master by this push:
     new 662e49c6 EMPIREDB-459 Renamed parameter and JavaDoc
662e49c6 is described below

commit 662e49c60dde4a90c7888aefdf8665f1974db615
Author: Rainer Döbele <[email protected]>
AuthorDate: Tue Mar 25 18:58:58 2025 +0100

    EMPIREDB-459
    Renamed parameter and JavaDoc
---
 .../org/apache/empire/commons/ObjectUtils.java     | 10 +++---
 .../java/org/apache/empire/commons/ValueUtils.java | 36 +++++++++++-----------
 2 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/empire-db/src/main/java/org/apache/empire/commons/ObjectUtils.java 
b/empire-db/src/main/java/org/apache/empire/commons/ObjectUtils.java
index 52beb9f1..b8c6736e 100644
--- a/empire-db/src/main/java/org/apache/empire/commons/ObjectUtils.java
+++ b/empire-db/src/main/java/org/apache/empire/commons/ObjectUtils.java
@@ -561,18 +561,18 @@ public final class ObjectUtils
      * Converts a column value to a Java type
      * 
      * @param <T> the type to convert to
-     * @param column the column expression
-     * @param value the object to convert
-     * @param returnType the class type to convert to
+     * @param column the column expression for metadata access
+     * @param value the value to convert
+     * @param valueType the desired value type
      * 
      * @return the converted value of v or null
      * 
      * @throws ClassCastException if the object is not null and is not 
assignable to the type T.
      */
-    public static <T> T convertColumnValue(ColumnExpr column, Object value, 
Class<T> returnType)
+    public static <T> T convertColumnValue(ColumnExpr column, Object value, 
Class<T> valueType)
         throws ClassCastException
     {
-        return valueUtils.convertColumnValue(column, value, returnType);
+        return valueUtils.convertColumnValue(column, value, valueType);
     }
 
     /**
diff --git a/empire-db/src/main/java/org/apache/empire/commons/ValueUtils.java 
b/empire-db/src/main/java/org/apache/empire/commons/ValueUtils.java
index 0997dd9c..5e4531bc 100644
--- a/empire-db/src/main/java/org/apache/empire/commons/ValueUtils.java
+++ b/empire-db/src/main/java/org/apache/empire/commons/ValueUtils.java
@@ -771,44 +771,44 @@ public class ValueUtils
      * toString(), toInteger(), toDecimal(), toDate(), etc.
      * 
      * @param <T> the type to convert to
-     * @param column the column expression
-     * @param value the object to convert
-     * @param returnType the class type to convert to
+     * @param column the column expression for metadata access
+     * @param value the value to convert
+     * @param vt the desired value type
      * 
      * @return the converted value
      * 
      * @throws ClassCastException if the object is not null and is not 
assignable to the type T.
      */
     @SuppressWarnings("unchecked")
-    public <T> T convertColumnValue(ColumnExpr column, Object value, Class<T> 
rt)
+    public <T> T convertColumnValue(ColumnExpr column, Object value, Class<T> 
vt)
         throws ClassCastException
     {
         // check
         if (value==ObjectUtils.NO_VALUE)
             throw new InvalidValueException(value);
         // use a is
-        if (rt==Object.class)
+        if (vt==Object.class)
             return ((T)value);
         // convert
-        if (rt==String.class)
+        if (vt==String.class)
             return (T)toString(value);
-        if (rt==Integer.class)
+        if (vt==Integer.class)
             return (T)(value!=null ? toInteger(value) : INTEGER_ZERO);
-        if (rt==Long.class)
+        if (vt==Long.class)
             return (T)(value!=null ? toLong(value) : LONG_ZERO);
-        if (rt==Double.class)
+        if (vt==Double.class)
             return (T)(value!=null ? toDouble(value) : DOUBLE_ZERO);
-        if (rt==BigDecimal.class)
+        if (vt==BigDecimal.class)
             return (T)(value!=null ? toDecimal(value) : BigDecimal.ZERO); // 
required for compatibility
-        if (rt==Boolean.class)
+        if (vt==Boolean.class)
             return (T)(value!=null ? toBoolean(value, false) : Boolean.FALSE);
         // enum
-        if (rt.isEnum())
+        if (vt.isEnum())
         {   // Null
             if (value==null)
                 return null;
             // convert
-            Class<? extends Enum<?>> enumType = (Class<? extends Enum<?>>)rt;
+            Class<? extends Enum<?>> enumType = (Class<? extends Enum<?>>)vt;
             try {
                 // Convert to enum, depending on DataType
                 boolean numeric = column.getDataType().isNumeric();
@@ -823,19 +823,19 @@ public class ValueUtils
         // Date conversions
         try {
             // DateTimeFormatter.ISO_LOCAL_DATE_TIME
-            if (rt==Date.class)
+            if (vt==Date.class)
                 return (T)toDate(value);
-            if (rt==Timestamp.class)
+            if (vt==Timestamp.class)
                 return (T)toTimestamp(value);
-            if (rt==LocalDate.class)
+            if (vt==LocalDate.class)
                 return (T)toLocalDate(value);
-            if (rt==LocalDateTime.class)
+            if (vt==LocalDateTime.class)
                 return (T)toLocalDateTime(value);
         } catch (ParseException | DateTimeParseException e) {
             throw new ValueConversionException(Timestamp.class, value, e);
         }
         // something else?
-        return convertToJava(rt, value);
+        return convertToJava(vt, value);
     }
 
     /**

Reply via email to