Skip to main content

Posts

Showing posts from November, 2016

Killing SSJS - Passing a parameter using Expression Language - Part 3

Quick, but important, footnote to this series. I discovered some serialization problems related to this technique due to the GetMap being transient. The fix is to replace this: transient private GetMap<boolean> readOnlyGetter = new GetMap<boolean>() { @Override public Boolean get(final Object key) { if(null==unid || !(unid instanceof String)){ throw new IllegalArgumentException(); } return isReadOnly(key); } public GetMap<boolean> getReadOnly() { return readOnlyGetter; } with this: public GetMap<boolean> getReadOnly() { readOnlyGetter = new GetMap<boolean>() { @Override public Boolean get(final Object key) { if(null==unid || !(unid instanceof String)){ throw new IllegalArgumentException(); } return isReadOnly(key); } return readOnlyGetter; }