Re: Create an empty java.util.Set in VTL

2018-01-25 Thread Sergiu Dumitriu
Not if you're using the secure uberspector, which everyone should be doing. On 01/25/2018 11:44 AM, Alex Fedotov wrote: > You can probably use a hack with classloader. Along the lines of: > > #set($x = > "1".getClass().getClassloader().findClass("java.uti.HashSet").newInstance()) > > Alex > >

Re: Create an empty java.util.Set in VTL

2018-01-25 Thread sebb
Or use the Map, and use a fixed value (or ignore it) On 25 January 2018 at 16:44, Alex Fedotov wrote: > You can probably use a hack with classloader. Along the lines of: > > #set($x = > "1".getClass().getClassloader().findClass("java.uti.HashSet").newInstance()) > > Alex > > >

Re: Create an empty java.util.Set in VTL

2018-01-25 Thread Alex Fedotov
You can probably use a hack with classloader. Along the lines of: #set($x = "1".getClass().getClassloader().findClass("java.uti.HashSet").newInstance()) Alex On Thu, Jan 25, 2018 at 11:30 AM, Christopher Schultz < ch...@christopherschultz.net> wrote: > -BEGIN PGP SIGNED MESSAGE- >

Re: Create an empty java.util.Set in VTL

2018-01-25 Thread Sergiu Dumitriu
Not with the default syntax and context. If you can control the context, you can put an utility that can create any type of collection: random sets, linked sets, ordered sets, linked maps, ordered maps... On 01/25/2018 11:30 AM, Christopher Schultz wrote: > All, > > If I want to create a new

Create an empty java.util.Set in VTL

2018-01-25 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 All, If I want to create a new empty array/collection, I can do something like this: #set($array = []) If I want to create a new Map, I can do this: #set($map = {}) Is there a way to create a new Set? I'd like to use a set because: 1. I want