No effective change - code cleanup - return void (unused return values)

This commit is contained in:
Robin Bygrave
2015-08-01 17:51:04 +12:00
parent ca1f95df7a
commit 93f13113e6
7 changed files with 21 additions and 50 deletions
@@ -1,22 +0,0 @@
package com.avaje.ebeaninternal.server.core;
import com.avaje.ebeaninternal.server.util.ClassPathSearchMatcher;
/**
* Matcher used for searching for Embeddable, Entity and ScalarTypes in the
* class path.
*/
public class OnBootupClassSearchMatcher implements ClassPathSearchMatcher {
BootupClasses classes = new BootupClasses();
public boolean isMatch(Class<?> cls) {
return classes.isMatch(cls);
}
public BootupClasses getOnBootupClasses() {
return classes;
}
}
@@ -1057,8 +1057,8 @@ public class BeanDescriptor<T> implements MetaBeanInfo {
return namedQueries.get(name);
}
public DeployNamedQuery addNamedQuery(DeployNamedQuery deployNamedQuery) {
return namedQueries.put(deployNamedQuery.getName(), deployNamedQuery);
public void addNamedQuery(DeployNamedQuery deployNamedQuery) {
namedQueries.put(deployNamedQuery.getName(), deployNamedQuery);
}
/**
@@ -1038,7 +1038,7 @@ public class BeanDescriptorManager implements BeanDescriptorMap {
/**
* Set the Identity generation mechanism.
*/
private <T> IdType setIdGeneration(DeployBeanDescriptor<T> desc) {
private <T> void setIdGeneration(DeployBeanDescriptor<T> desc) {
if (desc.propertiesId().size() == 0) {
// bean doesn't have an Id property
@@ -1046,7 +1046,7 @@ public class BeanDescriptorManager implements BeanDescriptorMap {
// expecting an id property
logger.warn(Message.msg("deploy.nouid", desc.getFullName()));
}
return null;
return;
}
if (IdType.SEQUENCE.equals(desc.getIdType()) && !dbIdentity.isSupportsSequence()) {
@@ -1069,21 +1069,21 @@ public class BeanDescriptorManager implements BeanDescriptorMap {
String genName = desc.getIdGeneratorName();
if (UuidIdGenerator.AUTO_UUID.equals(genName)) {
desc.setIdGenerator(uuidIdGenerator);
return IdType.GENERATOR;
return;
}
}
if (desc.getBaseTable() == null) {
// no base table so not going to set Identity
// of sequence information
return null;
return;
}
if (IdType.IDENTITY.equals(desc.getIdType())) {
// used when getGeneratedKeys is not supported (SQL Server 2000)
String selectLastInsertedId = dbIdentity.getSelectLastInsertedId(desc.getBaseTable());
desc.setSelectLastInsertedId(selectLastInsertedId);
return IdType.IDENTITY;
return;
}
String seqName = desc.getIdGeneratorName();
@@ -1098,8 +1098,6 @@ public class BeanDescriptorManager implements BeanDescriptorMap {
// create the sequence based IdGenerator
IdGenerator seqIdGen = createSequenceIdGenerator(seqName);
desc.setIdGenerator(seqIdGen);
return IdType.SEQUENCE;
}
private IdGenerator createSequenceIdGenerator(String seqName) {
@@ -55,7 +55,7 @@ public class Dnode {
/**
* Generate this node as xml to the buffer.
*/
public StringBuilder generate(StringBuilder sb) {
public void generate(StringBuilder sb) {
if (sb == null) {
sb = new StringBuilder();
}
@@ -85,7 +85,6 @@ public class Dnode {
}
sb.append("</").append(nodeName).append(">");
}
return sb;
}
/**
@@ -147,7 +147,7 @@ public abstract class DmlHandler implements PersistHandler, BindableRequest {
/**
* Bind a raw value. Used to bind the discriminator column.
*/
public Object bind(String propName, Object value, int sqlType) throws SQLException {
public void bind(String propName, Object value, int sqlType) throws SQLException {
if (logLevelSql) {
if (value == null) {
bindLog.append("null");
@@ -162,32 +162,30 @@ public abstract class DmlHandler implements PersistHandler, BindableRequest {
bindLog.append(",");
}
dataBind.setObject(value, sqlType);
return value;
}
public Object bindNoLog(Object value, int sqlType, String logPlaceHolder) throws SQLException {
public void bindNoLog(Object value, int sqlType, String logPlaceHolder) throws SQLException {
if (logLevelSql) {
bindLog.append(logPlaceHolder).append(" ");
}
dataBind.setObject(value, sqlType);
return value;
}
/**
* Bind the value to the preparedStatement.
*/
public Object bind(Object value, BeanProperty prop) throws SQLException {
return bindInternal(logLevelSql, value, prop);
public void bind(Object value, BeanProperty prop) throws SQLException {
bindInternal(logLevelSql, value, prop);
}
/**
* Bind the value to the preparedStatement without logging.
*/
public Object bindNoLog(Object value, BeanProperty prop) throws SQLException {
return bindInternal(false, value, prop);
public void bindNoLog(Object value, BeanProperty prop) throws SQLException {
bindInternal(false, value, prop);
}
private Object bindInternal(boolean log, Object value, BeanProperty prop) throws SQLException {
private void bindInternal(boolean log, Object value, BeanProperty prop) throws SQLException {
if (log) {
if (prop.isLob()) {
@@ -203,7 +201,6 @@ public abstract class DmlHandler implements PersistHandler, BindableRequest {
}
// do the actual binding to PreparedStatement
prop.bind(dataBind, value);
return value;
}
/**
@@ -27,23 +27,22 @@ public interface BindableRequest {
* logicalType to dbType.
* </p>
*/
Object bind(Object value, BeanProperty prop) throws SQLException;
void bind(Object value, BeanProperty prop) throws SQLException;
/**
* Bind a raw value. Used to bind the discriminator column.
*/
Object bind(String propName, Object value, int sqlType) throws SQLException;
void bind(String propName, Object value, int sqlType) throws SQLException;
/**
* Bind a raw value with a placeHolder to put into the transaction log.
*/
Object bindNoLog(Object value, int sqlType, String logPlaceHolder) throws SQLException;
void bindNoLog(Object value, int sqlType, String logPlaceHolder) throws SQLException;
/**
* Bind the value to the preparedStatement without logging.
*/
Object bindNoLog(Object value, BeanProperty prop) throws SQLException;
void bindNoLog(Object value, BeanProperty prop) throws SQLException;
/**
* Register the value from a update GeneratedValue. This can only be set to
@@ -44,8 +44,8 @@ public class DataBind {
return ++pos;
}
public int decrementPos() {
return ++pos;
public void decrementPos() {
++pos;
}
public int executeUpdate() throws SQLException {