openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1716864 - /openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/BlacklistClassResolver.java
Date Fri, 27 Nov 2015 12:41:32 GMT
Author: rmannibucau
Date: Fri Nov 27 12:41:31 2015
New Revision: 1716864

URL: http://svn.apache.org/viewvc?rev=1716864&view=rev
Log:
better whitelist handling

Modified:
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/BlacklistClassResolver.java

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/BlacklistClassResolver.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/BlacklistClassResolver.java?rev=1716864&r1=1716863&r2=1716864&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/BlacklistClassResolver.java
(original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/BlacklistClassResolver.java
Fri Nov 27 12:41:31 2015
@@ -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) {



Mime
View raw message