diff --git a/core/src/main/java/org/springframework/ldap/core/support/DefaultDirObjectFactory.java b/core/src/main/java/org/springframework/ldap/core/support/DefaultDirObjectFactory.java
index 12790b11..935aa549 100644
--- a/core/src/main/java/org/springframework/ldap/core/support/DefaultDirObjectFactory.java
+++ b/core/src/main/java/org/springframework/ldap/core/support/DefaultDirObjectFactory.java
@@ -35,7 +35,7 @@ import java.util.Hashtable;
/**
* Default implementation of the DirObjectFactory interface. Creates a
* {@link DirContextAdapter} from the supplied arguments.
- *
+ *
* @author Mattias Hellborg Arthursson
*/
public class DefaultDirObjectFactory implements DirObjectFactory {
@@ -44,7 +44,7 @@ public class DefaultDirObjectFactory implements DirObjectFactory {
/**
* Key to use in the ContextSource implementation to store the value of the
* base path suffix, if any, in the Ldap Environment.
- *
+ *
* @deprecated Use {@link BaseLdapNameAware} and
* {@link BaseLdapPathBeanPostProcessor} instead.
*/
@@ -102,7 +102,7 @@ public class DefaultDirObjectFactory implements DirObjectFactory {
* Names. Also, the name might contain referral information, in which case
* we need to separate the server information from the actual Distinguished
* Name so that we can create a representing DirContextAdapter.
- *
+ *
* @param attrs the attributes
* @param name the Name, typically a CompositeName, possibly
* including referral information.
@@ -149,17 +149,10 @@ public class DefaultDirObjectFactory implements DirObjectFactory {
nameString = pathString;
}
catch (URISyntaxException e) {
- if (JdkVersion.isAtLeastJava15()) {
- throw new IllegalArgumentException(
- "Supplied name starts with protocol prefix indicating a referral,"
- + " but is not possible to parse to an URI",
- e);
- } else {
- throw new IllegalArgumentException(
- "Supplied name starts with protocol prefix indicating a referral,"
- + " but is not possible to parse to an URI: " +
- e.getMessage());
- }
+ throw new IllegalArgumentException(
+ "Supplied name starts with protocol prefix indicating a referral,"
+ + " but is not possible to parse to an URI",
+ e);
}
if (LOG.isDebugEnabled()) {
LOG.debug("Resulting name after removal of referral information: '" + nameString + "'");
diff --git a/core/src/main/java/org/springframework/ldap/repository/support/QueryDslLdapRepository.java b/core/src/main/java/org/springframework/ldap/repository/support/QueryDslLdapRepository.java
index a9dadb43..f19e6fb5 100644
--- a/core/src/main/java/org/springframework/ldap/repository/support/QueryDslLdapRepository.java
+++ b/core/src/main/java/org/springframework/ldap/repository/support/QueryDslLdapRepository.java
@@ -18,8 +18,10 @@ package org.springframework.ldap.repository.support;
import com.mysema.query.types.OrderSpecifier;
import com.mysema.query.types.Predicate;
+
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
+import org.springframework.data.domain.Sort;
import org.springframework.data.querydsl.QueryDslPredicateExecutor;
import org.springframework.ldap.core.LdapOperations;
import org.springframework.ldap.odm.core.ObjectDirectoryMapper;
@@ -55,11 +57,23 @@ public class QueryDslLdapRepository extends SimpleLdapRepository implement
return findAll(predicate).size();
}
+ public boolean exists(Predicate predicate) {
+ return count(predicate) > 0;
+ }
+
+ public Iterable findAll(Predicate predicate, Sort sort) {
+ throw new UnsupportedOperationException();
+ }
+
private QueryDslLdapQuery queryFor(Predicate predicate) {
return new QueryDslLdapQuery(getLdapOperations(), getClazz())
.where(predicate);
}
+ public Iterable findAll(OrderSpecifier>... orders) {
+ throw new UnsupportedOperationException();
+ }
+
@Override
public Iterable findAll(Predicate predicate, OrderSpecifier>... orders) {
throw new UnsupportedOperationException();
diff --git a/gradle/java.gradle b/gradle/java.gradle
index 3514ea7f..9aaa621c 100644
--- a/gradle/java.gradle
+++ b/gradle/java.gradle
@@ -5,20 +5,20 @@ sourceCompatibility = '1.6'
targetCompatibility = '1.6'
ext.apacheDsVersion = '1.5.5'
-ext.springVersion = '3.2.8.RELEASE'
-ext.springDataVersion = '1.6.5.RELEASE'
+ext.springVersion = '3.2.13.RELEASE'
+ext.springDataVersion = '1.10.0.RELEASE'
ext.springBatchVersion = '2.0.4.RELEASE'
ext.junitVersion = '4.11'
ext.commonsIoVersion = '2.4'
-ext.commonsPoolVersion = '1.5.4'
-ext.commonsLangVersion = '2.4'
-ext.commonsLoggingVersion = '1.1.3'
+ext.commonsPoolVersion = '1.6'
+ext.commonsLangVersion = '2.6'
+ext.commonsLoggingVersion = '1.2'
ext.gsbaseVersion = '2.0.1'
ext.log4jVersion = '1.2.17'
-ext.mockitoVersion = '1.9.5'
-ext.queryDslVersion = '3.2.4'
-ext.slf4jVersion = '1.7.7'
-ext.powerMockVersion = '1.5.4'
+ext.mockitoVersion = '1.10.19'
+ext.queryDslVersion = '3.6.3'
+ext.slf4jVersion = '1.7.12'
+ext.powerMockVersion = '1.6.2'
ext.powerMockDependencies = [
"org.powermock:powermock-core:$powerMockVersion",