Update of /var/cvs/src/org/mmbase/util
In directory james.mmbase.org:/tmp/cvs-serv1070/src/org/mmbase/util
Modified Files:
LocalizedEntryListFactory.java
Added Files:
IOUtil.java
Log Message:
MMB-1806 Improve io stream copy performance
See also: http://cvs.mmbase.org/viewcvs/src/org/mmbase/util
See also: http://www.mmbase.org/jira/browse/MMB-1806
Index: LocalizedEntryListFactory.java
===================================================================
RCS file: /var/cvs/src/org/mmbase/util/LocalizedEntryListFactory.java,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -b -r1.55 -r1.56
--- LocalizedEntryListFactory.java 26 Jan 2009 16:35:09 -0000 1.55
+++ LocalizedEntryListFactory.java 7 Apr 2009 08:23:27 -0000 1.56
@@ -38,7 +38,7 @@
* partially by explicit values, though this is not recommended.
*
* @author Michiel Meeuwissen
- * @version $Id: LocalizedEntryListFactory.java,v 1.55 2009/01/26 16:35:09
michiel Exp $
+ * @version $Id: LocalizedEntryListFactory.java,v 1.56 2009/04/07 08:23:27
nklasens Exp $
* @since MMBase-1.8
*/
public class LocalizedEntryListFactory<C> implements Serializable, Cloneable {
@@ -647,7 +647,7 @@
return "(localized: " + localized + "bundles: " + bundles +
"fallBack: " + fallBack + ")";
}
- private static class Bundle<D> implements Serializable, PublicCloneable {
+ private static class Bundle<D> implements Serializable,
PublicCloneable<Bundle<D>> {
private static final long serialVersionUID = 1L; // increase this if
object serialization changes (which we shouldn't do!)
private String resource;
@@ -687,10 +687,11 @@
*/
Collection<Map.Entry<D, String>> get(Locale loc) throws
MissingResourceException {
try {
- return SortedBundle.getResource(resource, loc, classLoader,
constantsProvider, wrapper, comparator).entrySet();
+ Map<D, String> resourceMap =
SortedBundle.getResource(resource, loc, classLoader, constantsProvider,
wrapper, comparator);
+ return resourceMap.entrySet();
} catch (IllegalArgumentException iae) {
log.error(iae);
- return Collections.emptyList();
+ return Collections.emptySet();
}
}
@@ -722,7 +723,7 @@
return result;
}
- public Object clone() {
+ public Bundle<D> clone() {
log.debug("Cloning bundle " + this);
try {
Bundle clone = (Bundle) super.clone();
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs