Skip to content

Commit 76e2640

Browse files
committed
sonar changes
1 parent be2c78a commit 76e2640

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

lightblue-ldap-config/src/main/java/com/redhat/lightblue/config/ldap/LdapDataSourceConfiguration.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,17 +59,19 @@ public class LdapDataSourceConfiguration implements DataSourceConfiguration{
5959
private static final int DEFAULT_MAX_NUMBER_OF_CONNECTIONS = 10;
6060

6161
private String databaseName;
62-
private LDAPConnectionPool connectionPool;
62+
private transient LDAPConnectionPool connectionPool;
6363

6464
public String getDatabaseName(){
6565
return databaseName;
6666
}
6767

68+
@Override
6869
@SuppressWarnings("rawtypes")
6970
public Class<LdapDataStoreParser> getMetadataDataStoreParser() {
7071
return LdapDataStoreParser.class;
7172
}
7273

74+
@Override
7375
public void initializeFromJson(JsonNode node) {
7476
if(node == null){
7577
LOGGER.warn("Attempted to initizlize an LDAP datasource from a null JsonNode.");

lightblue-ldap-crud/src/main/java/com/redhat/lightblue/crud/ldap/LdapCRUDController.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,8 @@ public CRUDFindResponse find(CRUDOperationContext ctx,
226226
request.addControl(new ServerSideSortRequestControl(false, new SortTranslator().translate(sort)));
227227
}
228228
if((from != null) && (from > 0)){
229-
request.addControl(new VirtualListViewRequestControl(from.intValue(), 0, new Long(to - from).intValue(), 0, null, false));
229+
int endPos = to.intValue() - from.intValue();
230+
request.addControl(new VirtualListViewRequestControl(from.intValue(), 0, endPos, 0, null, false));
230231
}
231232

232233
SearchResult result = connection.search(request);

0 commit comments

Comments
 (0)