RFR JDK-8194667: Regex: Serialization doesn't work with match flags (original) (raw)

Xueming Shen xueming.shen at oracle.com
Fri Jan 12 16:48:37 UTC 2018


Hi,

Please help review the change for JDK-8194667

issue: https://bugs.openjdk.java.net/browse/JDK-8194667 webrev: http://cr.openjdk.java.net/~sherman/8194667/webrev

The bits of "flags" are being updated on and off during the pattern compiling by the possible embedded match flag(s) in old implementation. The proposed fix is to add a temporary field "flags0" for this purpose and save/store "flags" for the purpose of deserialization (same as the field "pattern").

For the compatibility concern I'm leaving the behavior of method flags() unchanged to return the muted "flags". Arguably it might be desired to return the original "flags" instead. We can leave this "issue" for future RFE.

1145 public int flags() { 1146 return flags0; 1147 }

Thanks, Sherman



More information about the core-libs-dev mailing list