Review Board 1.7.22


SQOOP-875 Sqoop2: ClassUtils.instantiate class should not be logging on ERROR level

Review Request #9388 - Created Feb. 9, 2013 and submitted

Jarek Cecho
SQOOP-875
Reviewers
Sqoop
sqoop-sqoop2
I've changed the debug levels to debug.

 

Diff revision 1 (Latest)

  1. common/src/main/java/org/apache/sqoop/utils/ClassUtils.java: Loading...
common/src/main/java/org/apache/sqoop/utils/ClassUtils.java
Revision 4f89b5057ee04b9bdcf58ad92bd40dc3c49ad72d New Change
[20] 102 lines
[+20] [+] public static Object instantiate(Class klass, Object ... args) {
103

    
   
103

   
104
    try {
104
    try {
105
      Constructor constructor = klass.getConstructor(argumentTypes);
105
      Constructor constructor = klass.getConstructor(argumentTypes);
106
      return constructor.newInstance(args);
106
      return constructor.newInstance(args);
107
    } catch (NoSuchMethodException e) {
107
    } catch (NoSuchMethodException e) {
108
      LOG.error("Can't find such constructor.", e);
108
      LOG.debug("Can't find such constructor.", e);
109
    } catch (InvocationTargetException e) {
109
    } catch (InvocationTargetException e) {
110
      LOG.error("Can't instantiate object.", e);
110
      LOG.debug("Can't instantiate object.", e);
111
    } catch (InstantiationException e) {
111
    } catch (InstantiationException e) {
112
      LOG.error("Can't instantiate object.", e);
112
      LOG.debug("Can't instantiate object.", e);
113
    } catch (IllegalAccessException e) {
113
    } catch (IllegalAccessException e) {
114
      LOG.error("Can't instantiate object.", e);
114
      LOG.debug("Can't instantiate object.", e);
115
    }
115
    }
116

    
   
116

   
117
    return null;
117
    return null;
118
  }
118
  }
119

    
   
119

   
[+20] [20] 52 lines
  1. common/src/main/java/org/apache/sqoop/utils/ClassUtils.java: Loading...