throws SQLException {
long time = System.currentTimeMillis();
- CachedRowSet data;
-
- try (PreparedStatement ps = conn.prepareStatement(statement)) {
- data = RowSetProvider.newFactory().createCachedRowSet();
+ try (PreparedStatement ps = conn.prepareStatement(statement);
+ CachedRowSet data = RowSetProvider.newFactory().createCachedRowSet()) {
if (arguments != null) {
prepareStatementForExecuteUpdate(arguments, ps);
}
LOGGER.debug("SQL SUCCESS. rows returned: {}, time(ms): {}", data.size(),
(System.currentTimeMillis() - time));
}
- ps.close();
} catch (SQLException exc) {
handleSqlExceptionForExecuteStatement(conn, statement, arguments, exc, time);
} finally {
bais = new ByteArrayInputStream(buffer);
bsis = new BufferedServletInputStream(bais);
} catch (Exception ex) {
- ex.printStackTrace();
+ log.error("Exception in getInputStream",ex);
}
return bsis;
try {
SvcLogicExpressionFactory.parse(sbuff.toString());
} catch (IOException e) {
- e.printStackTrace();
+ LOG.error("Exception in SvcLogicExpressionFactory.parse",e);
}
}
}
}
}
} catch (BreakNodeException br) {
- LOG.debug("ForNodeExecutor caught break");
+ LOG.error("ForNodeExecutor caught break",br);
}
return (null);
}
Class returnClass = m.getReturnType();
String fieldName = toLowerHyphen(m.getName().substring(3));
- fieldName = fieldName.substring(0, 1).toLowerCase() + fieldName.substring(1);
-
+ if(fieldName!=null) {
+ fieldName = fieldName.substring(0, 1).toLowerCase() + fieldName.substring(1);
+ }else {
+ fieldName="";
+ }
String propName = propNamePfx + "." + fieldName;
// Is the return type a yang generated class?
}
public static boolean isYangGenerated(Class c) {
- if (c == null) {
- return (false);
- } else {
+ if (c != null) {
return (c.getName().startsWith("org.opendaylight.yang.gen."));
}
+ return false;
}
public static boolean isIpPrefix(Class c) {