GitHub user rmatharu opened a pull request:

    https://github.com/apache/samza/pull/590

    Fixing problem with Serde of StackTraceElement, was causing test failure

    Root cause of the failing test (after constructor param addition) is that 
java's StackTraceElement does not serialize/deserialize properly in all cases.
    
    Counter example:
    
    StackTraceElement s1 = new StackTraceElement("a", "b", null, 10);
    byte[] b = new ObjectMapper().writeValueAsString(s1).getBytes("UTF-8");
    StackTraceElement s2 = new ObjectMapper().readValue(b, 
StackTraceElement.class);
    System.out.println(s1.equals(s2));// prints false
    
    In reality, the null fileName for StackTraceElement **occurrs** for java's 
internal method calls
    such as 
org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:50),
 sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/rmatharu/samza testfix

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/samza/pull/590.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #590
    
----
commit 476c94a388a8d39b579ca13cff19165c19ac3b20
Author: rmath...@linkedin.com <rmatharu@...>
Date:   2018-07-28T00:50:23Z

    Fixing problem with Serde of StackTraceElement, was causing test failure

----


---

Reply via email to