<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi Roger,</p>
<p>thanks for your quick response. That does seem to work better.<br>
</p>
<pre class="moz-signature" cols="72">Regards
Heinz
--
Dr Heinz M. Kabutz (PhD CompSci)
Author of "The Java™ Specialists' Newsletter" - <a class="moz-txt-link-abbreviated" href="http://www.javaspecialists.eu">www.javaspecialists.eu</a>
Java Champion - <a class="moz-txt-link-abbreviated" href="http://www.javachampions.org">www.javachampions.org</a>
JavaOne Rock Star Speaker
Tel: +30 69 75 595 262
Skype: kabutz
</pre>
<div class="moz-cite-prefix">On 2023/02/06 06:55, Roger Riggs wrote:<br>
</div>
<blockquote type="cite"
cite="mid:1555d359-0a01-764d-c014-f2b5b678cabb@oracle.com">
<pre><span style="color:#8c8c8c;font-style:italic;">*</span><span style="color:#8c8c8c;background-color:#edfced;font-style:italic;"> // Returns a composite filter of the static JVM-wide filter, a thread-specific filter,
</span><span style="color:#8c8c8c;font-style:italic;">*</span><span style="color:#8c8c8c;background-color:#edfced;font-style:italic;"> // and the stream-specific filter.
</span><span style="color:#8c8c8c;font-style:italic;">*</span><span style="color:#8c8c8c;background-color:#edfced;font-style:italic;"> public ObjectInputFilter apply(ObjectInputFilter curr, ObjectInputFilter next) {
</span><span style="color:#8c8c8c;font-style:italic;">*</span><span style="color:#8c8c8c;background-color:#edfced;font-style:italic;"> if (curr == null) {
</span><span style="color:#8c8c8c;font-style:italic;">*</span><span style="color:#8c8c8c;background-color:#edfced;font-style:italic;"> // Called from the OIS constructor or perhaps OIS.setObjectInputFilter with no current filter
</span><span style="color:#8c8c8c;font-style:italic;">*</span><span style="color:#8c8c8c;background-color:#edfced;font-style:italic;"> var filter = filterThreadLocal.get();
</span><span style="color:#8c8c8c;font-style:italic;">*</span><span style="color:#8c8c8c;background-color:#edfced;font-style:italic;"> if (filter != null) {
</span><span style="color:#8c8c8c;font-style:italic;">*</span><span style="color:#8c8c8c;background-color:#edfced;font-style:italic;"> // Merge to invoke the thread local filter and then the JVM-wide filter (if any)
</span><span style="color:#8c8c8c;font-style:italic;">*</span><span style="color:#8c8c8c;background-color:#edfced;font-style:italic;"> filter = ObjectInputFilter.merge(filter, next);
</span><span style="color:#8c8c8c;font-style:italic;">*</span><span style="color:#8c8c8c;background-color:#edfced;font-style:italic;"> return ObjectInputFilter.rejectUndecidedClass(filter);
</span><span style="color:#8c8c8c;font-style:italic;">*</span><span style="color:#8c8c8c;background-color:#edfced;font-style:italic;"> }
</span><span style="color:#8c8c8c;font-style:italic;">*</span><span style="color:#8c8c8c;background-color:#edfced;font-style:italic;"> return (next == null) ? null : ObjectInputFilter.rejectUndecidedClass(next);
</span><span style="color:#8c8c8c;font-style:italic;">*</span><span style="color:#8c8c8c;background-color:#edfced;font-style:italic;"> } else {
</span><span style="color:#8c8c8c;font-style:italic;">*</span><span style="color:#8c8c8c;background-color:#edfced;font-style:italic;"> // Called from OIS.setObjectInputFilter with a current filter and a stream-specific filter.
</span><span style="color:#8c8c8c;font-style:italic;">*</span><span style="color:#8c8c8c;background-color:#edfced;font-style:italic;"> // The curr filter already incorporates the thread filter and static JVM-wide filter
</span><span style="color:#8c8c8c;font-style:italic;">*</span><span style="color:#8c8c8c;background-color:#edfced;font-style:italic;"> // and rejection of undecided classes
</span><span style="color:#8c8c8c;font-style:italic;">*</span><span style="color:#8c8c8c;background-color:#edfced;font-style:italic;"> // If there is a stream-specific filter merge to invoke it and then the current filter.
</span><span style="color:#8c8c8c;font-style:italic;">*</span><span style="color:#8c8c8c;background-color:#edfced;font-style:italic;"> if (next != null) {
</span><span style="color:#8c8c8c;font-style:italic;">*</span><span style="color:#8c8c8c;background-color:#edfced;font-style:italic;"> return ObjectInputFilter.merge(next, curr);
</span><span style="color:#8c8c8c;font-style:italic;">*</span><span style="color:#8c8c8c;background-color:#edfced;font-style:italic;"> }
</span><span style="color:#8c8c8c;font-style:italic;">*</span><span style="color:#8c8c8c;background-color:#edfced;font-style:italic;"> return curr;
</span><span style="color:#8c8c8c;font-style:italic;">*</span><span style="color:#8c8c8c;background-color:#edfced;font-style:italic;"> }
</span><span style="color:#8c8c8c;font-style:italic;">*</span><span style="color:#8c8c8c;background-color:#edfced;font-style:italic;"> }</span></pre>
</blockquote>
</body>
</html>