geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bschucha...@apache.org
Subject [geode] branch whitelist_wip updated: work-in-progress branch for whitelisting classes that can be deserialized.
Date Tue, 07 Nov 2017 23:19:09 GMT
This is an automated email from the ASF dual-hosted git repository.

bschuchardt pushed a commit to branch whitelist_wip
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/whitelist_wip by this push:
     new 13aec8e  work-in-progress branch for whitelisting classes that can be deserialized.
13aec8e is described below

commit 13aec8e3b29972af7d3603b0b35da8fcfe016340
Author: Bruce Schuchardt <bschuchardt@pivotal.io>
AuthorDate: Tue Nov 7 15:17:46 2017 -0800

    work-in-progress branch for whitelisting classes that can be deserialized.
    
    Added a new unit test showing that excludedClasses cannot be deserialized.
    These are classes that have been said to never be serialized.
    
    There is also a new REST AnalyseSerializables test that is currently failing.
---
 .../geode/internal/InternalDataSerializer.java     |   8 +-
 .../internal/cache/CreateRegionProcessor.java      |   4 +-
 .../geode/internal/cache/EventStateHelper.java     |   4 +-
 .../internal/cache/InitialImageOperation.java      |   6 +-
 .../AnalyzeSerializablesJUnitTest.java             |  89 ++++++++++++++--
 .../InternalDataSerializerWhitelistTest.java       |  68 ++++++++++++
 .../apache/geode/codeAnalysis/excludedClasses.txt  | 116 ---------------------
 geode-web-api/build.gradle                         |   1 +
 .../AnalyzeWebApiSerializablesJUnitTest.java       |  29 ++++++
 .../apache/geode/codeAnalysis/excludedClasses.txt  |   6 ++
 10 files changed, 198 insertions(+), 133 deletions(-)

diff --git a/geode-core/src/main/java/org/apache/geode/internal/InternalDataSerializer.java
b/geode-core/src/main/java/org/apache/geode/internal/InternalDataSerializer.java
index 9670bfa..78dc397 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/InternalDataSerializer.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/InternalDataSerializer.java
@@ -206,7 +206,7 @@ public abstract class InternalDataSerializer extends DataSerializer implements
D
    */
   public static void initialize(DistributionConfig distributionConfig, Collection<DistributedSystemService>
services) {
     String serializationFilterSpec; // get from configuration
-    serializationFilterSpec = "!**";
+    serializationFilterSpec = "!*";
     if (serializationFilterSpec != null) {
       if (!ClassUtils.isClassAvailable("sun.misc.ObjectInputFilter")) {
         throw new GemFireConfigException(
@@ -248,11 +248,13 @@ public abstract class InternalDataSerializer extends DataSerializer
implements D
       if (sanctionedClasses.contains(className)) {
         return ObjectInputFilter.Status.ALLOWED;
       } else {
-        return userFilter.checkInput(filterInfo);
+        ObjectInputFilter.Status status = userFilter.checkInput(filterInfo);
+        return status;
       }
     };
 
-    ObjectInputFilter.Config.setSerialFilter(serializationFilter);
+    // global filter - if we enable this it will affect all ObjectInputStreams
+//    ObjectInputFilter.Config.setSerialFilter(serializationFilter);
   }
 
   /**
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/CreateRegionProcessor.java
b/geode-core/src/main/java/org/apache/geode/internal/cache/CreateRegionProcessor.java
index ee4e2df..1de3d51 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/CreateRegionProcessor.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/CreateRegionProcessor.java
@@ -805,7 +805,7 @@ public class CreateRegionProcessor implements ProfileExchangeProcessor
{
         }
       }
       if (in.readBoolean()) {
-        this.eventState = EventStateHelper.fromData(in, false);
+        this.eventState = EventStateHelper.deDataSerialize(in, false);
       }
       if (in.readBoolean()) {
         this.destroyedId = new PersistentMemberID();
@@ -838,7 +838,7 @@ public class CreateRegionProcessor implements ProfileExchangeProcessor
{
         // The isHARegion flag is false here because
         // we currently only include the event state in the profile
         // for bucket regions.
-        EventStateHelper.toData(out, (Map) eventState, false);
+        EventStateHelper.dataSerialize(out, (Map) eventState, false);
       } else {
         out.writeBoolean(false);
       }
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/EventStateHelper.java
b/geode-core/src/main/java/org/apache/geode/internal/cache/EventStateHelper.java
index ec427bb..636777d 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/EventStateHelper.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/EventStateHelper.java
@@ -50,7 +50,7 @@ public class EventStateHelper {
    * {@link RegionStateMessage#toData(DataOutput)} <br>
    */
   @SuppressWarnings("synthetic-access")
-  public static void toData(DataOutput dop, Map eventState, boolean isHARegion) throws IOException
{
+  public static void dataSerialize(DataOutput dop, Map eventState, boolean isHARegion) throws
IOException {
     // For HARegionQueues, the event state map is uses different values
     // than a regular region :(
     InternalDistributedMember myId =
@@ -105,7 +105,7 @@ public class EventStateHelper {
    * {@link CreateRegionReplyMessage#fromData(DataInput)} <br>
    * {@link RegionStateMessage#fromData(DataInput)} <br>
    */
-  public static Map fromData(DataInput dip, boolean isHARegion)
+  public static Map deDataSerialize(DataInput dip, boolean isHARegion)
       throws IOException, ClassNotFoundException {
 
     InternalDistributedMember senderId = InternalDistributedMember.readEssentialData(dip);
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/InitialImageOperation.java
b/geode-core/src/main/java/org/apache/geode/internal/cache/InitialImageOperation.java
index 38a76de..c6d7abd 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/InitialImageOperation.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/InitialImageOperation.java
@@ -17,7 +17,6 @@ package org.apache.geode.internal.cache;
 
 import org.apache.geode.*;
 import org.apache.geode.cache.DiskAccessException;
-import org.apache.geode.cache.Operation;
 import org.apache.geode.cache.RegionDestroyedException;
 import org.apache.geode.cache.query.internal.CqStateImpl;
 import org.apache.geode.cache.query.internal.DefaultQueryService;
@@ -44,7 +43,6 @@ import org.apache.geode.internal.logging.LogService;
 import org.apache.geode.internal.logging.LoggingThreadGroup;
 import org.apache.geode.internal.logging.log4j.LocalizedMessage;
 import org.apache.geode.internal.logging.log4j.LogMarker;
-import org.apache.geode.internal.offheap.annotations.Released;
 import org.apache.geode.internal.sequencelog.EntryLogger;
 import org.apache.geode.internal.sequencelog.RegionLogger;
 import org.apache.geode.internal.util.ObjectIntProcedure;
@@ -3359,7 +3357,7 @@ public class InitialImageOperation {
       dop.writeBoolean(isHARegion);
       if (eventState != null) {
         dop.writeBoolean(true);
-        EventStateHelper.toData(dop, eventState, isHARegion);
+        EventStateHelper.dataSerialize(dop, eventState, isHARegion);
       } else {
         dop.writeBoolean(false);
       }
@@ -3392,7 +3390,7 @@ public class InitialImageOperation {
       isHARegion = dip.readBoolean();
       boolean has = dip.readBoolean();
       if (has) {
-        eventState = EventStateHelper.fromData(dip, isHARegion);
+        eventState = EventStateHelper.deDataSerialize(dip, isHARegion);
       }
       has = dip.readBoolean();
       if (has) {
diff --git a/geode-core/src/test/java/org/apache/geode/codeAnalysis/AnalyzeSerializablesJUnitTest.java
b/geode-core/src/test/java/org/apache/geode/codeAnalysis/AnalyzeSerializablesJUnitTest.java
index 5dbccd4..8a383fa 100644
--- a/geode-core/src/test/java/org/apache/geode/codeAnalysis/AnalyzeSerializablesJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/codeAnalysis/AnalyzeSerializablesJUnitTest.java
@@ -26,12 +26,19 @@ import static org.apache.geode.internal.lang.SystemUtils.isJavaVersionAtLeast;
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.assertj.core.api.Assertions.fail;
 import static org.hamcrest.core.Is.is;
+import static org.junit.Assert.assertTrue;
 import static org.junit.Assume.assumeThat;
 
+import org.apache.geode.DataSerializer;
 import org.apache.geode.codeAnalysis.decode.CompiledClass;
 import org.apache.geode.codeAnalysis.decode.CompiledField;
 import org.apache.geode.codeAnalysis.decode.CompiledMethod;
+import org.apache.geode.distributed.internal.DistributedSystemService;
+import org.apache.geode.distributed.internal.DistributionConfig;
+import org.apache.geode.distributed.internal.DistributionConfigImpl;
+import org.apache.geode.internal.HeapDataOutputStream;
 import org.apache.geode.internal.InternalDataSerializer;
+import org.apache.geode.internal.Version;
 import org.apache.geode.test.junit.categories.IntegrationTest;
 import org.junit.Before;
 import org.junit.Rule;
@@ -40,15 +47,20 @@ import org.junit.experimental.categories.Category;
 import org.junit.rules.TestName;
 
 import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.DataInputStream;
 import java.io.File;
 import java.io.FileReader;
 import java.io.IOException;
+import java.io.InvalidClassException;
+import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
+import java.util.Properties;
 
 @Category(IntegrationTest.class)
 public class AnalyzeSerializablesJUnitTest {
@@ -59,6 +71,9 @@ public class AnalyzeSerializablesJUnitTest {
       + "If the class is not persisted or sent over the wire add it to the file " + NEW_LINE
+ "%s"
       + NEW_LINE + "Otherwise if this doesn't break backward compatibility, copy the file
"
       + NEW_LINE + "%s to " + NEW_LINE + "%s.";
+  public static final String EXCLUDED_CLASSES_TXT = "excludedClasses.txt";
+  public static final String ACTUAL_DATA_SERIALIZABLES_DAT = "actualDataSerializables.dat";
+  public static final String ACTUAL_SERIALIZABLES_DAT = "actualSerializables.dat";
 
   /** all loaded classes */
   private Map<String, CompiledClass> classes;
@@ -75,7 +90,6 @@ public class AnalyzeSerializablesJUnitTest {
   @Rule
   public TestName testName = new TestName();
 
-  @Before
   public void setUp() throws Exception {
     assumeThat(
         "AnalyzeSerializables requires Java 8 but tests are running with v" + getJavaVersion(),
@@ -112,8 +126,9 @@ public class AnalyzeSerializablesJUnitTest {
   @Test
   public void testDataSerializables() throws Exception {
     System.out.println(this.testName.getMethodName() + " starting");
+    setUp();
 
-    this.actualDataSerializablesFile = createEmptyFile("actualDataSerializables.dat");
+    this.actualDataSerializablesFile = createEmptyFile(ACTUAL_DATA_SERIALIZABLES_DAT);
     System.out.println(this.testName.getMethodName() + " actualDataSerializablesFile="
         + this.actualDataSerializablesFile.getAbsolutePath());
 
@@ -126,7 +141,7 @@ public class AnalyzeSerializablesJUnitTest {
       System.out.println(
           "++++++++++++++++++++++++++++++testDataSerializables found discrepancies++++++++++++++++++++++++++++++++++++");
       System.out.println(diff);
-      fail(diff + FAIL_MESSAGE, getSrcPathFor(getResourceAsFile("excludedClasses.txt")),
+      fail(diff + FAIL_MESSAGE, getSrcPathFor(getResourceAsFile(EXCLUDED_CLASSES_TXT)),
           this.actualDataSerializablesFile.getAbsolutePath(),
           getSrcPathFor(this.expectedDataSerializablesFile));
     }
@@ -135,8 +150,9 @@ public class AnalyzeSerializablesJUnitTest {
   @Test
   public void testSerializables() throws Exception {
     System.out.println(this.testName.getMethodName() + " starting");
+    setUp();
 
-    this.actualSerializablesFile = createEmptyFile("actualSerializables.dat");
+    this.actualSerializablesFile = createEmptyFile(ACTUAL_SERIALIZABLES_DAT);
     System.out.println(this.testName.getMethodName() + " actualSerializablesFile="
         + this.actualSerializablesFile.getAbsolutePath());
 
@@ -148,12 +164,67 @@ public class AnalyzeSerializablesJUnitTest {
       System.out.println(
           "++++++++++++++++++++++++++++++testSerializables found discrepancies++++++++++++++++++++++++++++++++++++");
       System.out.println(diff);
-      fail(diff + FAIL_MESSAGE, getSrcPathFor(getResourceAsFile("excludedClasses.txt")),
+      fail(diff + FAIL_MESSAGE, getSrcPathFor(getResourceAsFile(EXCLUDED_CLASSES_TXT)),
           this.actualSerializablesFile.getAbsolutePath(),
           getSrcPathFor(this.expectedSerializablesFile, "main"));
     }
   }
 
+  @Test
+  public void excludedClassesExistAndDoNotDeserialize() throws Exception {
+    List<String> excludedClasses = AnalyzeSerializablesJUnitTest.loadExcludedClasses();
+    DistributionConfig distributionConfig = new DistributionConfigImpl(new Properties());
+    InternalDataSerializer.initialize(distributionConfig, new ArrayList<DistributedSystemService>());
+
+    for (String filePath: excludedClasses) {
+      String className = filePath.replaceAll("/", ".");
+      System.out.println("testing class " + className);
+
+      Class excludedClass = Class.forName(className);
+      assertTrue(excludedClass.getName() + " is not Serializable and should be removed from
excludedClasses.txt",
+          Serializable.class.isAssignableFrom(excludedClass));
+
+      if (excludedClass.isEnum()) {
+        // geode enums are special cased by DataSerializer and are never java-serialized
+//        for (Object instance: excludedClass.getEnumConstants()) {
+//          serializeAndDeserializeObject(instance);
+//        }
+      } else {
+        final Object excludedInstance;
+        try {
+          excludedInstance = excludedClass.newInstance();
+        } catch (InstantiationException | IllegalAccessException e) {
+          // okay - it's in the excludedClasses.txt file after all
+          // IllegalAccessException means that the constructor is private.
+          continue;
+        }
+        serializeAndDeserializeObject(excludedInstance);
+      }
+    }
+  }
+
+  private void serializeAndDeserializeObject(Object object) throws Exception {
+    HeapDataOutputStream outputStream = new HeapDataOutputStream(Version.CURRENT);
+    try {
+      DataSerializer.writeObject(object, outputStream);
+    } catch (IOException e) {
+      // some classes, such as BackupLock, are Serializable because the extend something
+      // like ReentrantLock but we never serialize them & it doesn't work to try to do
so
+      System.out.println("Not Serializable: " + object.getClass().getName());
+      e.printStackTrace();
+      return;
+    }
+    try {
+      Object
+          instance =
+          DataSerializer.readObject(
+              new DataInputStream(new ByteArrayInputStream(outputStream.toByteArray())));
+      fail("I was able to deserialize " + object.getClass().getName());
+    } catch (InvalidClassException e) {
+      // expected
+    }
+  }
+
   private String getSrcPathFor(File file) {
     return getSrcPathFor(file, "test");
   }
@@ -167,7 +238,7 @@ public class AnalyzeSerializablesJUnitTest {
   private void loadClasses() throws IOException {
     System.out.println("loadClasses starting");
 
-    List<String> excludedClasses = loadExcludedClasses(getResourceAsFile("excludedClasses.txt"));
+    List<String> excludedClasses = loadExcludedClasses(getResourceAsFile(EXCLUDED_CLASSES_TXT));
     List<String> openBugs = loadOpenBugs(getResourceAsFile("openBugs.txt"));
 
     excludedClasses.addAll(openBugs);
@@ -198,6 +269,12 @@ public class AnalyzeSerializablesJUnitTest {
         + (finish - start) / 1000 + " seconds");
   }
 
+  public static List<String> loadExcludedClasses() throws IOException {
+    AnalyzeSerializablesJUnitTest instance = new AnalyzeSerializablesJUnitTest();
+    return instance.loadExcludedClasses(instance.getResourceAsFile(EXCLUDED_CLASSES_TXT));
+  }
+
+
   private List<String> loadExcludedClasses(File exclusionsFile) throws IOException
{
     List<String> excludedClasses = new LinkedList<>();
     FileReader fr = new FileReader(exclusionsFile);
diff --git a/geode-core/src/test/java/org/apache/geode/internal/InternalDataSerializerWhitelistTest.java
b/geode-core/src/test/java/org/apache/geode/internal/InternalDataSerializerWhitelistTest.java
new file mode 100644
index 0000000..8c97f01
--- /dev/null
+++ b/geode-core/src/test/java/org/apache/geode/internal/InternalDataSerializerWhitelistTest.java
@@ -0,0 +1,68 @@
+package org.apache.geode.internal;
+
+import static org.junit.Assert.assertTrue;
+
+import java.io.ByteArrayInputStream;
+import java.io.DataInputStream;
+import java.io.IOException;
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+
+import org.junit.Test;
+
+import org.apache.geode.DataSerializer;
+import org.apache.geode.codeAnalysis.AnalyzeSerializablesJUnitTest;
+import org.apache.geode.distributed.internal.DistributedSystemService;
+import org.apache.geode.distributed.internal.DistributionConfig;
+import org.apache.geode.distributed.internal.DistributionConfigImpl;
+
+public class InternalDataSerializerWhitelistTest {
+
+  @Test
+  public void nonWhitelistedObjectIsRejected() throws Exception {
+    List<String> excludedClasses = AnalyzeSerializablesJUnitTest.loadExcludedClasses();
+    DistributionConfig distributionConfig = new DistributionConfigImpl(new Properties());
+    InternalDataSerializer.initialize(distributionConfig, new ArrayList<DistributedSystemService>());
+
+    for (String filePath: excludedClasses) {
+      String className = filePath.replaceAll("/", ".");
+      System.out.println("testing class " + className);
+
+      Class excludedClass = Class.forName(className);
+      assertTrue(excludedClass.getName() + " is not Serializable and should be removed from
excludedClasses.txt",
+          Serializable.class.isAssignableFrom(excludedClass));
+
+      if (excludedClass.isEnum()) {
+        for (Object instance: excludedClass.getEnumConstants()) {
+          serializeAndDeserializeObject(instance);
+        }
+      } else {
+        final Object excludedInstance;
+        try {
+          excludedInstance = excludedClass.newInstance();
+        } catch (InstantiationException | IllegalAccessException e) {
+          // okay - it's in the excludedClasses.txt file after all
+          // IllegalAccessException means that the constructor is private.
+          continue;
+        }
+        serializeAndDeserializeObject(excludedInstance);
+      }
+    }
+  }
+
+  private void serializeAndDeserializeObject(Object object) throws Exception {
+    HeapDataOutputStream outputStream = new HeapDataOutputStream(Version.CURRENT);
+    try {
+      DataSerializer.writeObject(object, outputStream);
+    } catch (IOException e) {
+      // some classes, such as BackupLock, are Serializable because the extend something
+      // like ReentrantLock but we never serialize them & it doesn't work to try to do
so
+      System.out.println("Not Serializable: " + object.getClass().getName());
+      e.printStackTrace();
+      return;
+    }
+    DataSerializer.readObject(new DataInputStream(new ByteArrayInputStream(outputStream.toByteArray())));
+  }
+}
diff --git a/geode-core/src/test/resources/org/apache/geode/codeAnalysis/excludedClasses.txt
b/geode-core/src/test/resources/org/apache/geode/codeAnalysis/excludedClasses.txt
index 76bf0ab..f28c54f 100644
--- a/geode-core/src/test/resources/org/apache/geode/codeAnalysis/excludedClasses.txt
+++ b/geode-core/src/test/resources/org/apache/geode/codeAnalysis/excludedClasses.txt
@@ -1,94 +1,21 @@
-org/apache/geode/cache/query/CqAttributesFactory
-org/apache/geode/cache/query/internal/index/CompactRangeIndex
 org/apache/geode/cache/query/internal/index/CompactRangeIndex$1
-org/apache/geode/cache/query/internal/index/CompactRangeIndex$IMQEvaluator$1
 org/apache/geode/internal/cache/tier/CommunicationMode
-org/apache/geode/distributed/LocatorLauncher
 org/apache/geode/distributed/LocatorLauncher$Command
-org/apache/geode/distributed/ServerLauncher
 org/apache/geode/distributed/ServerLauncher$Command
-org/apache/geode/distributed/internal/DistributionManager
 org/apache/geode/internal/ExitCode
 org/apache/geode/internal/JarDeployer
 org/apache/geode/internal/cache/BackupLock
 org/apache/geode/internal/exception/InvalidExecutionContextException
-org/apache/geode/internal/logging/GemFireLevel
-org/apache/geode/internal/logging/LoggingThreadGroup
-org/apache/geode/internal/logging/LogWriterImpl
-org/apache/geode/internal/logging/log4j/ConfigurableLogger
-org/apache/geode/internal/logging/log4j/CustomGemFireLogger
-org/apache/geode/internal/logging/log4j/ExtendedGemFireLogger
 org/apache/geode/internal/logging/log4j/FastLogger
 org/apache/geode/internal/logging/log4j/LocalizedMessage
-org/apache/geode/internal/logging/log4j/LogWriterAppenders
 org/apache/geode/internal/logging/log4j/LogWriterAppenders$Identifier
 org/apache/geode/internal/logging/log4j/LogWriterLogger
 org/apache/geode/internal/logging/log4j/message/GemFireParameterizedMessage
 org/apache/geode/internal/logging/log4j/message/GemFireParameterizedMessageFactory
 org/apache/geode/internal/offheap/RefCountChangeInfo
-org/apache/geode/internal/process/BlockingProcessStreamReader
-org/apache/geode/internal/process/NonBlockingProcessStreamReader
-org/apache/geode/internal/process/ProcessStreamReader
 org/apache/geode/internal/process/ProcessStreamReader$ReadingMode
-org/apache/geode/internal/process/ProcessTerminatedAbnormallyException
 org/apache/geode/internal/process/ProcessType
-org/apache/geode/internal/process/ProcessUtils
 org/apache/geode/internal/process/UnableToControlProcessException
-org/apache/geode/internal/redis/RegionCreationException
-org/apache/geode/internal/redis/executor/ListQuery
-org/apache/geode/internal/redis/executor/ListQuery$1
-org/apache/geode/internal/redis/executor/ListQuery$2
-org/apache/geode/internal/redis/executor/ListQuery$3
-org/apache/geode/internal/redis/executor/ListQuery$4
-org/apache/geode/internal/redis/executor/ListQuery$5
-org/apache/geode/internal/redis/executor/ListQuery$6
-org/apache/geode/internal/redis/executor/ListQuery$7
-org/apache/geode/internal/redis/executor/SortedSetQuery
-org/apache/geode/internal/redis/executor/SortedSetQuery$1
-org/apache/geode/internal/redis/executor/SortedSetQuery$10
-org/apache/geode/internal/redis/executor/SortedSetQuery$11
-org/apache/geode/internal/redis/executor/SortedSetQuery$12
-org/apache/geode/internal/redis/executor/SortedSetQuery$13
-org/apache/geode/internal/redis/executor/SortedSetQuery$14
-org/apache/geode/internal/redis/executor/SortedSetQuery$15
-org/apache/geode/internal/redis/executor/SortedSetQuery$16
-org/apache/geode/internal/redis/executor/SortedSetQuery$17
-org/apache/geode/internal/redis/executor/SortedSetQuery$18
-org/apache/geode/internal/redis/executor/SortedSetQuery$19
-org/apache/geode/internal/redis/executor/SortedSetQuery$2
-org/apache/geode/internal/redis/executor/SortedSetQuery$20
-org/apache/geode/internal/redis/executor/SortedSetQuery$21
-org/apache/geode/internal/redis/executor/SortedSetQuery$22
-org/apache/geode/internal/redis/executor/SortedSetQuery$23
-org/apache/geode/internal/redis/executor/SortedSetQuery$24
-org/apache/geode/internal/redis/executor/SortedSetQuery$25
-org/apache/geode/internal/redis/executor/SortedSetQuery$26
-org/apache/geode/internal/redis/executor/SortedSetQuery$27
-org/apache/geode/internal/redis/executor/SortedSetQuery$28
-org/apache/geode/internal/redis/executor/SortedSetQuery$29
-org/apache/geode/internal/redis/executor/SortedSetQuery$3
-org/apache/geode/internal/redis/executor/SortedSetQuery$30
-org/apache/geode/internal/redis/executor/SortedSetQuery$31
-org/apache/geode/internal/redis/executor/SortedSetQuery$32
-org/apache/geode/internal/redis/executor/SortedSetQuery$33
-org/apache/geode/internal/redis/executor/SortedSetQuery$34
-org/apache/geode/internal/redis/executor/SortedSetQuery$35
-org/apache/geode/internal/redis/executor/SortedSetQuery$36
-org/apache/geode/internal/redis/executor/SortedSetQuery$37
-org/apache/geode/internal/redis/executor/SortedSetQuery$38
-org/apache/geode/internal/redis/executor/SortedSetQuery$39
-org/apache/geode/internal/redis/executor/SortedSetQuery$4
-org/apache/geode/internal/redis/executor/SortedSetQuery$40
-org/apache/geode/internal/redis/executor/SortedSetQuery$41
-org/apache/geode/internal/redis/executor/SortedSetQuery$42
-org/apache/geode/internal/redis/executor/SortedSetQuery$43
-org/apache/geode/internal/redis/executor/SortedSetQuery$44
-org/apache/geode/internal/redis/executor/SortedSetQuery$45
-org/apache/geode/internal/redis/executor/SortedSetQuery$5
-org/apache/geode/internal/redis/executor/SortedSetQuery$6
-org/apache/geode/internal/redis/executor/SortedSetQuery$7
-org/apache/geode/internal/redis/executor/SortedSetQuery$8
-org/apache/geode/internal/redis/executor/SortedSetQuery$9
 org/apache/geode/internal/shared/NativeErrorException
 org/apache/geode/internal/shared/OSType
 org/apache/geode/internal/shared/OSType$1
@@ -97,60 +24,17 @@ org/apache/geode/internal/shared/OSType$3
 org/apache/geode/internal/shared/OSType$4
 org/apache/geode/internal/shared/OSType$5
 org/apache/geode/internal/shared/TCPSocketOptions
-org/apache/geode/internal/process/SharedConfigurationNotAvailableException
 org/apache/geode/internal/cache/tier/InternalClientMembership$EventType
 org/apache/geode/internal/util/concurrent/StoppableReadWriteLock
-org/apache/geode/rest/internal/web/exception.GemfireRestException
-org/apache/geode/rest/internal/web/controllers/support/JSONTypes
-org/apache/geode/rest/internal/web/controllers/support/QueryResultTypes
-org/apache/geode/rest/internal/web/controllers/support/UpdateOp
-org/apache/geode/rest/internal/web/exception/MalformedJsonException
-org/apache/geode/rest/internal/web/exception/RegionNotFoundException
-org/apache/geode/rest/internal/web/exception/ResourceNotFoundException
 org/apache/geode/distributed/internal/DistributionConfigImpl
-org/apache/geode/internal/cache/EventStateHelper
 org/apache/geode/internal/cache/DiskStoreMonitor$DiskState
 org/apache/geode/internal/cache/UserSpecifiedDiskStoreAttributes
-org/apache/geode/internal/cache/DiskStoreAttributesCreation
 org/apache/geode/internal/cache/Oplog$OPLOG_TYPE
 org/apache/geode/internal/cache/tier/sockets/ClientUpdateMessageImpl$ClientCqConcurrentMap
 org/apache/geode/internal/cache/tier/sockets/ClientUpdateMessageImpl$CqNameToOpHashMap
 org/apache/geode/internal/datasource/FacetsJCAConnectionManagerImpl
-org/apache/geode/internal/process/ClusterConfigurationNotAvailableException
-org/apache/geode/internal/security/GeodeSecurityUtil
-org/apache/geode/internal/security/IntegratedSecurityService
-org/apache/geode/internal/security/IntegratedSecurityService$SerializationProxy
-org/apache/geode/internal/security/SecurityService
 org/apache/geode/internal/statistics/platform/LinuxProcFsStatistics$CPU
-org/apache/geode/internal/ra/GFConnectionFactoryImpl
-org/apache/geode/internal/ra/GFConnectionImpl
-org/apache/geode/internal/ra/spi/JCAManagedConnectionFactory
 org/apache/geode/cache/operations/internal/UpdateOnlyMap
-org/apache/geode/cache/operations/CloseCQOperationContext
-org/apache/geode/cache/operations/DestroyOperationContext
-org/apache/geode/cache/operations/ExecuteCQOperationContext
-org/apache/geode/cache/operations/ExecuteFunctionOperationContext
-org/apache/geode/cache/operations/GetDurableCQsOperationContext
-org/apache/geode/cache/operations/GetOperationContext
-org/apache/geode/cache/operations/InterestOperationContext
-org/apache/geode/cache/operations/InvalidateOperationContext
-org/apache/geode/cache/operations/KeyOperationContext
-org/apache/geode/cache/operations/KeySetOperationContext
-org/apache/geode/cache/operations/KeyValueOperationContext
-org/apache/geode/cache/operations/OperationContext
-org/apache/geode/cache/operations/PutAllOperationContext
-org/apache/geode/cache/operations/PutOperationContext
-org/apache/geode/cache/operations/QueryOperationContext
-org/apache/geode/cache/operations/RegionClearOperationContext
-org/apache/geode/cache/operations/RegionCreateOperationContext
-org/apache/geode/cache/operations/RegionDestroyOperationContext
-org/apache/geode/cache/operations/RegionOperationContext
-org/apache/geode/cache/operations/RegisterInterestOperationContext
-org/apache/geode/cache/operations/RemoveAllOperationContext
-org/apache/geode/cache/operations/StopCQOperationContext
-org/apache/geode/cache/operations/UnregisterInterestOperationContext
-org/apache/geode/cache/operations/internal/GetOperationContextImpl
-org/apache/geode/internal/cache/operations/ContainsKeyOperationContext
 org/apache/geode/security/ResourcePermission
 org/apache/geode/security/ResourcePermission$Operation
 org/apache/geode/security/ResourcePermission$Resource
diff --git a/geode-web-api/build.gradle b/geode-web-api/build.gradle
index 795812f..b55a9d9 100755
--- a/geode-web-api/build.gradle
+++ b/geode-web-api/build.gradle
@@ -57,6 +57,7 @@ dependencies {
   }
 
   testCompile project(':geode-junit')
+  testCompile files(project(':geode-core').sourceSets.test.output)
 
   provided 'javax.servlet:javax.servlet-api:' + project.'javax.servlet-api.version'
   provided project(':geode-core')
diff --git a/geode-web-api/src/test/java/org/apache/geode/codeAnalysis/AnalyzeWebApiSerializablesJUnitTest.java
b/geode-web-api/src/test/java/org/apache/geode/codeAnalysis/AnalyzeWebApiSerializablesJUnitTest.java
new file mode 100644
index 0000000..5af2fe7
--- /dev/null
+++ b/geode-web-api/src/test/java/org/apache/geode/codeAnalysis/AnalyzeWebApiSerializablesJUnitTest.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information
regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version
2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain
a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under
the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
express
+ * or implied. See the License for the specific language governing permissions and limitations
under
+ * the License.
+ */
+package org.apache.geode.codeAnalysis;
+
+import org.junit.experimental.categories.Category;
+
+import org.apache.geode.test.junit.categories.IntegrationTest;
+
+@Category(IntegrationTest.class)
+public class AnalyzeWebApiSerializablesJUnitTest extends AnalyzeSerializablesJUnitTest {
+
+  @Override
+  protected String getModuleName() {
+    return "geode-web-api";
+  }
+}
+
diff --git a/geode-web-api/src/test/resources/org/apache/geode/codeAnalysis/excludedClasses.txt
b/geode-web-api/src/test/resources/org/apache/geode/codeAnalysis/excludedClasses.txt
new file mode 100644
index 0000000..9d87a65
--- /dev/null
+++ b/geode-web-api/src/test/resources/org/apache/geode/codeAnalysis/excludedClasses.txt
@@ -0,0 +1,6 @@
+org/apache/geode/rest/internal/web/controllers/support/JSONTypes
+org/apache/geode/rest/internal/web/controllers/support/QueryResultTypes
+org/apache/geode/rest/internal/web/controllers/support/UpdateOp
+org/apache/geode/rest/internal/web/exception/MalformedJsonException
+org/apache/geode/rest/internal/web/exception/RegionNotFoundException
+org/apache/geode/rest/internal/web/exception/ResourceNotFoundException

-- 
To stop receiving notification emails like this one, please contact
['"commits@geode.apache.org" <commits@geode.apache.org>'].

Mime
View raw message