Author: jdonnerstag Date: Sun Mar 25 02:18:26 2007 New Revision: 522184 URL: http://svn.apache.org/viewvc?view=rev&rev=522184 Log: fixed java 1.5 -> 1.4 issues
Modified: incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket/src/main/java/wicket/markup/ComponentTag.java incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket/src/main/java/wicket/resource/PropertiesFactory.java Modified: incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket/src/main/java/wicket/markup/ComponentTag.java URL: http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket/src/main/java/wicket/markup/ComponentTag.java?view=diff&rev=522184&r1=522183&r2=522184 ============================================================================== --- incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket/src/main/java/wicket/markup/ComponentTag.java (original) +++ incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket/src/main/java/wicket/markup/ComponentTag.java Sun Mar 25 02:18:26 2007 @@ -51,6 +51,9 @@ */ public static final String DEFAULT_WICKET_NAMESPACE = "wicket"; + /** an empty list */ + private static final List EMPTY_LIST = new LinkedList(); + /** * Assuming this is a open (or open-close) tag, 'closes' refers to the * ComponentTag which closes it. @@ -151,7 +154,7 @@ { if (behaviors == null) { - List empty = Collections.emptyList(); + List empty = EMPTY_LIST; return empty.iterator(); } Modified: incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket/src/main/java/wicket/resource/PropertiesFactory.java URL: http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket/src/main/java/wicket/resource/PropertiesFactory.java?view=diff&rev=522184&r1=522183&r2=522184 ============================================================================== --- incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket/src/main/java/wicket/resource/PropertiesFactory.java (original) +++ incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket/src/main/java/wicket/resource/PropertiesFactory.java Sun Mar 25 02:18:26 2007 @@ -23,19 +23,17 @@ import java.util.Iterator; import java.util.List; import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import wicket.Application; import wicket.settings.IResourceSettings; +import wicket.util.concurrent.ConcurrentHashMap; import wicket.util.listener.IChangeListener; -import wicket.util.resource.IFixedLocationResourceStream; import wicket.util.resource.IResourceStream; import wicket.util.resource.ResourceStreamNotFoundException; import wicket.util.resource.locator.ResourceStreamLocator; -import wicket.util.string.Strings; import wicket.util.value.ValueMap; import wicket.util.watch.ModificationWatcher; @@ -193,27 +191,27 @@ .getInputStream()); // Determine if resource is a XML File - boolean loadAsXml = false; - if (resourceStream instanceof IFixedLocationResourceStream) - { - String location = ((IFixedLocationResourceStream)resourceStream) - .locationAsString(); - if (location != null) - { - String ext = Strings.lastPathComponent(location, '.').toLowerCase(); - if ("xml".equals(ext)) - { - loadAsXml = true; - } - } - } - - // Load the properties - if (loadAsXml) - { - properties.loadFromXML(in); - } - else +// boolean loadAsXml = false; +// if (resourceStream instanceof IFixedLocationResourceStream) +// { +// String location = ((IFixedLocationResourceStream)resourceStream) +// .locationAsString(); +// if (location != null) +// { +// String ext = Strings.lastPathComponent(location, '.').toLowerCase(); +// if ("xml".equals(ext)) +// { +// loadAsXml = true; +// } +// } +// } +// +// // Load the properties +// if (loadAsXml) +// { +// properties.loadFromXML(in); +// } +// else { properties.load(in); }