diff --git a/openjpa-kernel/src/main/java/org/apache/openjpa/util/BlacklistClassResolver.java b/openjpa-kernel/src/main/java/org/apache/openjpa/util/BlacklistClassResolver.java index 799225502..e48e578e1 100644 --- a/openjpa-kernel/src/main/java/org/apache/openjpa/util/BlacklistClassResolver.java +++ b/openjpa-kernel/src/main/java/org/apache/openjpa/util/BlacklistClassResolver.java @@ -20,10 +20,9 @@ package org.apache.openjpa.util; public class BlacklistClassResolver { public static final BlacklistClassResolver DEFAULT = new BlacklistClassResolver( - toArray( - System.getProperty( - "openjpa.serialization.class.blacklist", - "org.codehaus.groovy.runtime.,org.apache.commons.collections.functors.,org.apache.xalan")), + toArray(System.getProperty( + "openjpa.serialization.class.blacklist", + "org.codehaus.groovy.runtime.,org.apache.commons.collections.functors.,org.apache.xalan")), toArray(System.getProperty("openjpa.serialization.class.whitelist"))); private final String[] blacklist; @@ -35,7 +34,7 @@ public class BlacklistClassResolver { } protected boolean isBlacklisted(final String name) { - return !contains(whitelist, name) && contains(blacklist, name); + return (whitelist != null && !contains(whitelist, name)) || contains(blacklist, name); } public final String check(final String name) {