equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
67 } else { |
67 } else { |
68 this.cons = cons; |
68 this.cons = cons; |
69 } |
69 } |
70 } |
70 } |
71 |
71 |
|
72 @SuppressWarnings("unchecked") // For Hashtable clone: env.clone() |
72 public LazySearchEnumerationImpl(NamingEnumeration<Binding> candidates, |
73 public LazySearchEnumerationImpl(NamingEnumeration<Binding> candidates, |
73 AttrFilter filter, SearchControls cons, |
74 AttrFilter filter, SearchControls cons, |
74 Context ctx, Hashtable<String, Object> env, boolean useFactory) |
75 Context ctx, Hashtable<String, Object> env, boolean useFactory) |
75 throws NamingException { |
76 throws NamingException { |
76 |
77 |
77 this.candidates = candidates; |
78 this.candidates = candidates; |
78 this.filter = filter; |
79 this.filter = filter; |
79 this.env = env; |
80 this.env = (Hashtable<String, Object>) |
|
81 ((env == null) ? null : env.clone()); |
80 this.context = ctx; |
82 this.context = ctx; |
81 this.useFactory = useFactory; |
83 this.useFactory = useFactory; |
82 |
84 |
83 if(cons == null) { |
85 if(cons == null) { |
84 this.cons = new SearchControls(); |
86 this.cons = new SearchControls(); |