Made AclClassIdUtils genuinely package level by injecting the conversionService instead of AclClassIdUtils
Fixes gh-4814
This commit is contained in:
@@ -29,7 +29,7 @@ import org.springframework.security.acls.model.ObjectIdentity;
|
||||
* the correct Java type as specified by <code>acl_class.class_id_type</code>.
|
||||
* @author paulwheeler
|
||||
*/
|
||||
public class AclClassIdUtils {
|
||||
class AclClassIdUtils {
|
||||
private static final String DEFAULT_CLASS_ID_TYPE_COLUMN_NAME = "class_id_type";
|
||||
private static final Log log = LogFactory.getLog(AclClassIdUtils.class);
|
||||
|
||||
@@ -38,6 +38,10 @@ public class AclClassIdUtils {
|
||||
public AclClassIdUtils() {
|
||||
}
|
||||
|
||||
public AclClassIdUtils(ConversionService conversionService) {
|
||||
this.conversionService = conversionService;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the raw type from the database into the right Java type. For most applications the 'raw type' will be Long, for some applications
|
||||
* it could be String.
|
||||
|
||||
@@ -31,6 +31,7 @@ import java.util.Set;
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import org.springframework.core.convert.ConversionException;
|
||||
import org.springframework.core.convert.ConversionService;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.jdbc.core.PreparedStatementSetter;
|
||||
import org.springframework.jdbc.core.ResultSetExtractor;
|
||||
@@ -553,8 +554,8 @@ public class BasicLookupStrategy implements LookupStrategy {
|
||||
}
|
||||
}
|
||||
|
||||
public final void setAclClassIdUtils(AclClassIdUtils aclClassIdUtils) {
|
||||
this.aclClassIdUtils = aclClassIdUtils;
|
||||
public final void setConversionService(ConversionService conversionService) {
|
||||
this.aclClassIdUtils = new AclClassIdUtils(conversionService);
|
||||
}
|
||||
|
||||
// ~ Inner Classes
|
||||
|
||||
@@ -26,6 +26,7 @@ import javax.sql.DataSource;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.core.convert.ConversionService;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.jdbc.core.RowMapper;
|
||||
import org.springframework.security.acls.domain.ObjectIdentityImpl;
|
||||
@@ -163,8 +164,8 @@ public class JdbcAclService implements AclService {
|
||||
}
|
||||
}
|
||||
|
||||
public void setAclClassIdUtils(AclClassIdUtils aclClassIdUtils) {
|
||||
this.aclClassIdUtils = aclClassIdUtils;
|
||||
public void setConversionService(ConversionService conversionService) {
|
||||
this.aclClassIdUtils = new AclClassIdUtils(conversionService);
|
||||
}
|
||||
|
||||
protected boolean isAclClassIdSupported() {
|
||||
|
||||
Reference in New Issue
Block a user