Author: doogie
Date: Sat Mar 21 22:46:22 2009 New Revision: 757046 URL: http://svn.apache.org/viewvc?rev=757046&view=rev Log: Fix purely empty whitespace lines, and remove trailing whitespace. Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/component/AlreadyLoadedException.java ofbiz/trunk/framework/base/src/org/ofbiz/base/component/ComponentConfig.java ofbiz/trunk/framework/base/src/org/ofbiz/base/component/ComponentException.java ofbiz/trunk/framework/base/src/org/ofbiz/base/component/ComponentLoaderConfig.java ofbiz/trunk/framework/base/src/org/ofbiz/base/component/ComponentResourceHandler.java ofbiz/trunk/framework/base/src/org/ofbiz/base/config/ClasspathLoader.java ofbiz/trunk/framework/base/src/org/ofbiz/base/config/FileLoader.java ofbiz/trunk/framework/base/src/org/ofbiz/base/config/GenericConfigException.java ofbiz/trunk/framework/base/src/org/ofbiz/base/config/JNDIConfigUtil.java ofbiz/trunk/framework/base/src/org/ofbiz/base/config/MainResourceHandler.java ofbiz/trunk/framework/base/src/org/ofbiz/base/config/ResourceHandler.java ofbiz/trunk/framework/base/src/org/ofbiz/base/config/ResourceLoader.java ofbiz/trunk/framework/base/src/org/ofbiz/base/config/SecurityConfigUtil.java ofbiz/trunk/framework/base/src/org/ofbiz/base/config/UrlLoader.java ofbiz/trunk/framework/base/src/org/ofbiz/base/container/BeanShellContainer.java ofbiz/trunk/framework/base/src/org/ofbiz/base/container/ClassLoaderContainer.java ofbiz/trunk/framework/base/src/org/ofbiz/base/container/ComponentContainer.java ofbiz/trunk/framework/base/src/org/ofbiz/base/container/Container.java ofbiz/trunk/framework/base/src/org/ofbiz/base/container/ContainerConfig.java ofbiz/trunk/framework/base/src/org/ofbiz/base/container/ContainerException.java ofbiz/trunk/framework/base/src/org/ofbiz/base/container/ContainerLoader.java ofbiz/trunk/framework/base/src/org/ofbiz/base/container/JunitContainer.java ofbiz/trunk/framework/base/src/org/ofbiz/base/container/JustLoadComponentsContainer.java ofbiz/trunk/framework/base/src/org/ofbiz/base/container/NamingServiceContainer.java ofbiz/trunk/framework/base/src/org/ofbiz/base/crypto/BlowFishCrypt.java ofbiz/trunk/framework/base/src/org/ofbiz/base/crypto/DesCrypt.java ofbiz/trunk/framework/base/src/org/ofbiz/base/crypto/HashCrypt.java ofbiz/trunk/framework/base/src/org/ofbiz/base/location/ClasspathLocationResolver.java ofbiz/trunk/framework/base/src/org/ofbiz/base/location/ComponentLocationResolver.java ofbiz/trunk/framework/base/src/org/ofbiz/base/location/FlexibleLocation.java ofbiz/trunk/framework/base/src/org/ofbiz/base/location/LocationResolver.java ofbiz/trunk/framework/base/src/org/ofbiz/base/location/OFBizHomeLocationResolver.java ofbiz/trunk/framework/base/src/org/ofbiz/base/location/StandardUrlLocationResolver.java ofbiz/trunk/framework/base/src/org/ofbiz/base/splash/SplashLoader.java ofbiz/trunk/framework/base/src/org/ofbiz/base/splash/SplashScreen.java ofbiz/trunk/framework/base/src/org/ofbiz/base/test/BaseUnitTests.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/AliasKeyManager.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/Base64.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/BshUtil.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/CachedClassLoader.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/DateRange.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/Debug.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/FileUtil.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/GeneralException.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/GeneralRuntimeException.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/GroovyUtil.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/HttpClient.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/HttpClientException.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/HttpRequestFileUpload.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/JNDIContextFactory.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/KeyStoreUtil.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/Log4jLoggerWriter.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/MessageString.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/MultiTrustManager.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/NotifyLevel.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/ObjectInputStream.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/ObjectType.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/OfbizBshBsfEngine.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/OutputStreamByteCount.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/SSLUtil.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/StringOutputStream.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/StringUtil.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/TimeDuration.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/URLConnector.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilDateTime.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilFormatOut.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilGenerics.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilHttp.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilJ2eeCompat.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilJavaParse.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilMisc.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilName.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilNumber.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilObject.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilParse.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilPlist.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilProperties.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilTimer.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilURL.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilValidate.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilXml.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/CacheLine.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/CacheLineTable.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/CacheListener.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/CacheSoftReference.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/HardRefCacheLine.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/JdbmRecordManager.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/JdbmSerializer.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/SoftRefCacheLine.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/UtilCache.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/FlexibleMapAccessor.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/FlexibleProperties.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/FlexibleServletAccessor.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/LRUMap.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/LifoSet.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/LocalizedMap.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/MapComparator.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/MapStack.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/OrderedMap.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/OrderedSet.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/ResourceBundleMapWrapper.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/string/FlexibleStringExpander.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/string/JuelConnector.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/string/UelFunctions.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/string/UelUtil.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/template/FreeMarkerWorker.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/template/XslTransform.java Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/component/AlreadyLoadedException.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/component/AlreadyLoadedException.java?rev=757046&r1=757045&r2=757046&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/component/AlreadyLoadedException.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/component/AlreadyLoadedException.java Sat Mar 21 22:46:22 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/component/ComponentConfig.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/component/ComponentConfig.java?rev=757046&r1=757045&r2=757046&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/component/ComponentConfig.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/component/ComponentConfig.java Sat Mar 21 22:46:22 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -255,11 +255,11 @@ public static List getAppBarWebInfos(String serverName) { return ComponentConfig.getAppBarWebInfos(serverName, null, null); } - + public static List getAppBarWebInfos(String serverName, String menuName) { return ComponentConfig.getAppBarWebInfos(serverName, null, menuName); } - + public static List<WebappInfo> getAppBarWebInfos(String serverName, Comparator<? super String> comp, String menuName) { List<WebappInfo> webInfos = serverWebApps.get(serverName + menuName); if (webInfos == null) { @@ -284,7 +284,7 @@ } } else { tm.put(key, wInfo); - } + } } } } @@ -535,7 +535,7 @@ public List<KeystoreInfo> getKeystoreInfos() { return this.keystoreInfos; } - + public List<WebappInfo> getWebappInfos() { return this.webappInfos; } @@ -616,7 +616,7 @@ } } - public static class KeystoreInfo extends ResourceInfo { + public static class KeystoreInfo extends ResourceInfo { public String name; public String type; public String password; @@ -647,7 +647,7 @@ public String getName() { return name; } - + public String getType() { return type; } @@ -672,12 +672,12 @@ public String name; public String title; public String description; - public String menuName; + public String menuName; public String server; public String mountPoint; public String location; public String[] basePermission; - public String position; + public String position; public boolean appBarDisplay; public boolean sessionCookieAccepted; @@ -687,7 +687,7 @@ this.componentConfig = componentConfig; this.name = element.getAttribute("name"); this.title = element.getAttribute("title"); - this.description = element.getAttribute("description"); + this.description = element.getAttribute("description"); this.server = element.getAttribute("server"); this.mountPoint = element.getAttribute("mount-point"); this.location = element.getAttribute("location"); @@ -713,18 +713,18 @@ if (UtilValidate.isEmpty(this.title)) { this.title = Character.toUpperCase(name.charAt(0)) + name.substring(1).toLowerCase(); } - + if (UtilValidate.isEmpty(this.description)) { this.description = this.title; } - + String menuNameStr = element.getAttribute("menu-name"); if (UtilValidate.isNotEmpty(menuNameStr)) { this.menuName = menuNameStr; } else { this.menuName = "main"; } - + this.position = element.getAttribute("position"); // default mount point is name if none specified @@ -784,7 +784,7 @@ public String getTitle() { return title; } - + public String getDescription() { return description; } @@ -796,7 +796,7 @@ public Map<String, String> getInitParameters() { return initParameters; } - + public boolean isSessionCookieAccepted() { return sessionCookieAccepted; } Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/component/ComponentException.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/component/ComponentException.java?rev=757046&r1=757045&r2=757046&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/component/ComponentException.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/component/ComponentException.java Sat Mar 21 22:46:22 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -33,7 +33,7 @@ public ComponentException(String str) { super(str); } - + public ComponentException(Throwable nested) { super(nested); } Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/component/ComponentLoaderConfig.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/component/ComponentLoaderConfig.java?rev=757046&r1=757045&r2=757046&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/component/ComponentLoaderConfig.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/component/ComponentLoaderConfig.java Sat Mar 21 22:46:22 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -40,15 +40,15 @@ * */ public class ComponentLoaderConfig { - - public static final String module = ComponentLoaderConfig.class.getName(); + + public static final String module = ComponentLoaderConfig.class.getName(); public static final String COMPONENT_LOAD_XML_FILENAME = "component-load.xml"; - + public static final int SINGLE_COMPONENT = 0; public static final int COMPONENT_DIRECTORY = 1; - + protected static List<ComponentDef> componentsToLoad = null; - + public static List<ComponentDef> getRootComponents(String configFile) throws ComponentException { if (componentsToLoad == null) { synchronized (ComponentLoaderConfig.class) { @@ -58,7 +58,7 @@ } URL xmlUrl = UtilURL.fromResource(configFile); ComponentLoaderConfig.componentsToLoad = ComponentLoaderConfig.getComponentsFromConfig(xmlUrl); - } + } } } return componentsToLoad; @@ -96,8 +96,8 @@ public String name; public String location; public int type = -1; - - public ComponentDef(Element element) { + + public ComponentDef(Element element) { Properties systemProps = System.getProperties(); if ("load-component".equals(element.getNodeName())) { name = element.getAttribute("component-name"); @@ -108,6 +108,6 @@ location = FlexibleStringExpander.expandString(element.getAttribute("parent-directory"), UtilGenerics.<String, Object>checkMap(systemProps)); type = COMPONENT_DIRECTORY; } - } + } } } Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/component/ComponentResourceHandler.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/component/ComponentResourceHandler.java?rev=757046&r1=757045&r2=757046&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/component/ComponentResourceHandler.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/component/ComponentResourceHandler.java Sat Mar 21 22:46:22 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/config/ClasspathLoader.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/config/ClasspathLoader.java?rev=757046&r1=757045&r2=757046&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/config/ClasspathLoader.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/config/ClasspathLoader.java Sat Mar 21 22:46:22 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -36,7 +36,7 @@ } return url; } - + public InputStream loadResource(String location) throws GenericConfigException { URL url = getURL(location); try { Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/config/FileLoader.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/config/FileLoader.java?rev=757046&r1=757045&r2=757046&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/config/FileLoader.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/config/FileLoader.java Sat Mar 21 22:46:22 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -38,7 +38,7 @@ } return fileUrl; } - + public InputStream loadResource(String location) throws GenericConfigException { URL fileUrl = getURL(location); try { Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/config/GenericConfigException.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/config/GenericConfigException.java?rev=757046&r1=757045&r2=757046&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/config/GenericConfigException.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/config/GenericConfigException.java Sat Mar 21 22:46:22 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -33,7 +33,7 @@ public GenericConfigException(String str) { super(str); } - + public GenericConfigException(Throwable nested) { super(nested); } Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/config/JNDIConfigUtil.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/config/JNDIConfigUtil.java?rev=757046&r1=757045&r2=757046&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/config/JNDIConfigUtil.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/config/JNDIConfigUtil.java Sat Mar 21 22:46:22 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -30,7 +30,7 @@ * */ public class JNDIConfigUtil { - + public static final String module = JNDIConfigUtil.class.getName(); public static final String JNDI_CONFIG_XML_FILENAME = "jndiservers.xml"; protected static Map<String, JndiServerInfo> jndiServerInfos = FastMap.newInstance(); Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/config/MainResourceHandler.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/config/MainResourceHandler.java?rev=757046&r1=757045&r2=757046&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/config/MainResourceHandler.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/config/MainResourceHandler.java Sat Mar 21 22:46:22 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/config/ResourceHandler.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/config/ResourceHandler.java?rev=757046&r1=757045&r2=757046&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/config/ResourceHandler.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/config/ResourceHandler.java Sat Mar 21 22:46:22 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -29,18 +29,18 @@ * */ public interface ResourceHandler extends Serializable { - + public String getLoaderName(); - + public String getLocation(); - + public Document getDocument() throws GenericConfigException; - + public InputStream getStream() throws GenericConfigException; - + public URL getURL() throws GenericConfigException; - + public boolean isFileResource() throws GenericConfigException; - + public String getFullLocation() throws GenericConfigException; } Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/config/ResourceLoader.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/config/ResourceLoader.java?rev=757046&r1=757045&r2=757046&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/config/ResourceLoader.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/config/ResourceLoader.java Sat Mar 21 22:46:22 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -32,7 +32,7 @@ * Loads resources using dynamically specified resource loader classes. */ public abstract class ResourceLoader { - + public static final String module = ResourceLoader.class.getName(); protected static UtilCache<String, Object> loaderCache = new UtilCache<String, Object>("resource.ResourceLoaders", 0, 0); Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/config/SecurityConfigUtil.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/config/SecurityConfigUtil.java?rev=757046&r1=757045&r2=757046&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/config/SecurityConfigUtil.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/config/SecurityConfigUtil.java Sat Mar 21 22:46:22 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -34,7 +34,7 @@ * */ public class SecurityConfigUtil { - + public static final String module = SecurityConfigUtil.class.getName(); /** The security config filename */ Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/config/UrlLoader.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/config/UrlLoader.java?rev=757046&r1=757045&r2=757046&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/config/UrlLoader.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/config/UrlLoader.java Sat Mar 21 22:46:22 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -26,7 +26,7 @@ * */ public class UrlLoader extends ResourceLoader implements java.io.Serializable { - + public URL getURL(String location) throws GenericConfigException { String fullLocation = fullLocation(location); @@ -40,10 +40,10 @@ if (url == null) { throw new GenericConfigException("URL Resource not found: " + fullLocation); } - + return url; } - + public InputStream loadResource(String location) throws GenericConfigException { URL url = getURL(location); Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/container/BeanShellContainer.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/container/BeanShellContainer.java?rev=757046&r1=757045&r2=757046&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/container/BeanShellContainer.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/container/BeanShellContainer.java Sat Mar 21 22:46:22 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -42,7 +42,7 @@ public void init(String[] args, String configFile) { this.configFileLocation = configFile; } - + /** * @see org.ofbiz.base.container.Container#init(java.lang.String[], java.lang.String) */ Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/container/ClassLoaderContainer.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/container/ClassLoaderContainer.java?rev=757046&r1=757045&r2=757046&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/container/ClassLoaderContainer.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/container/ClassLoaderContainer.java Sat Mar 21 22:46:22 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/container/ComponentContainer.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/container/ComponentContainer.java?rev=757046&r1=757045&r2=757046&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/container/ComponentContainer.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/container/ComponentContainer.java Sat Mar 21 22:46:22 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/container/Container.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/container/Container.java?rev=757046&r1=757045&r2=757046&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/container/Container.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/container/Container.java Sat Mar 21 22:46:22 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -30,7 +30,7 @@ * @throws ContainerException */ public void init(String[] args, String configFile) throws ContainerException; - + /** * Start the container * @@ -41,7 +41,7 @@ /** * Stop the container - * + * * @throws ContainerException */ public void stop() throws ContainerException; Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/container/ContainerConfig.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/container/ContainerConfig.java?rev=757046&r1=757045&r2=757046&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/container/ContainerConfig.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/container/ContainerConfig.java Sat Mar 21 22:46:22 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -41,14 +41,14 @@ * */ public class ContainerConfig { - + public static final String module = ContainerConfig.class.getName(); - + protected static Map<String, Container> containers = new LinkedHashMap<String, Container>(); - + public static Container getContainer(String containerName, String configFile) throws ContainerException { Container container = containers.get(containerName); - if (container == null) { + if (container == null) { synchronized (ContainerConfig.class) { container = containers.get(containerName); if (container == null) { @@ -57,28 +57,28 @@ } new ContainerConfig(configFile); container = (Container) containers.get(containerName); - } + } } if (container == null) { throw new ContainerException("No container found with the name : " + containerName); - } + } } return container; } - + public static Collection<Container> getContainers(String configFile) throws ContainerException { if (containers.size() == 0) { - synchronized (ContainerConfig.class) { + synchronized (ContainerConfig.class) { if (containers.size() == 0) { if (configFile == null) { throw new ContainerException("Container config file cannot be null"); } - new ContainerConfig(configFile); - } + new ContainerConfig(configFile); + } } if (containers.size() == 0) { throw new ContainerException("No containers loaded; problem with configuration"); - } + } } return containers.values(); } @@ -150,14 +150,14 @@ } protected ContainerConfig() {} - - protected ContainerConfig(String configFileLocation) throws ContainerException { + + protected ContainerConfig(String configFileLocation) throws ContainerException { // load the config file URL xmlUrl = UtilURL.fromResource(configFileLocation); if (xmlUrl == null) { throw new ContainerException("Could not find " + configFileLocation + " master OFBiz container configuration"); } - + // read the document Document containerDocument = null; try { @@ -168,34 +168,34 @@ throw new ContainerException("Error reading the container config file: " + xmlUrl, e); } catch (IOException e) { throw new ContainerException("Error reading the container config file: " + xmlUrl, e); - } - + } + // root element - Element root = containerDocument.getDocumentElement(); - + Element root = containerDocument.getDocumentElement(); + // containers for (Element curElement: UtilXml.childElementList(root, "container")) { Container container = new Container(curElement); - containers.put(container.name, container); - } + containers.put(container.name, container); + } } - + public static class Container { public String name; public String className; public Map<String, Property> properties; - + public Container(Element element) { this.name = element.getAttribute("name"); this.className = element.getAttribute("class"); - + properties = new LinkedHashMap<String, Property>(); for (Element curElement: UtilXml.childElementList(element, "property")) { Property property = new Property(curElement); properties.put(property.name, property); - } + } } - + public Property getProperty(String name) { return properties.get(name); } @@ -216,21 +216,21 @@ public String name; public String value; public Map<String, Property> properties; - + public Property(Element element) { this.name = element.getAttribute("name"); this.value = element.getAttribute("value"); if (UtilValidate.isEmpty(this.value)) { - this.value = UtilXml.childElementValue(element, "property-value"); + this.value = UtilXml.childElementValue(element, "property-value"); } properties = new LinkedHashMap<String, Property>(); for (Element curElement: UtilXml.childElementList(element, "property")) { Property property = new Property(curElement); - properties.put(property.name, property); - } + properties.put(property.name, property); + } } - + public Property getProperty(String name) { return properties.get(name); } @@ -247,5 +247,5 @@ return props; } } - } + } } Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/container/ContainerException.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/container/ContainerException.java?rev=757046&r1=757045&r2=757046&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/container/ContainerException.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/container/ContainerException.java Sat Mar 21 22:46:22 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -24,7 +24,7 @@ * ContainerException */ public class ContainerException extends GenericConfigException { - + public ContainerException() { super(); } @@ -32,13 +32,13 @@ public ContainerException(String str) { super(str); } - + public ContainerException(Throwable t) { super(t); } public ContainerException(String str, Throwable nested) { super(str, nested); - } + } } Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/container/ContainerLoader.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/container/ContainerLoader.java?rev=757046&r1=757045&r2=757046&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/container/ContainerLoader.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/container/ContainerLoader.java Sat Mar 21 22:46:22 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -35,7 +35,7 @@ * */ public class ContainerLoader implements StartupLoader { - + public static final String module = ContainerLoader.class.getName(); public static final String CONTAINER_CONFIG = "ofbiz-containers.xml"; private static boolean loaded = false; @@ -50,14 +50,14 @@ public void load(Start.Config config, String args[]) throws StartupException { Debug.logInfo("[Startup] Loading containers...", module); loaded = true; - + // get the master container configuration file this.configFile = config.containerConfig; - + Collection<ContainerConfig.Container> containers = null; try { containers = ContainerConfig.getContainers(configFile); - } catch (ContainerException e) { + } catch (ContainerException e) { throw new StartupException(e); } @@ -114,7 +114,7 @@ Debug.logInfo("Shutting down containers", module); if (Debug.verboseOn()) printThreadDump(); - + // shutting down in reverse order for (int i = loadedContainers.size(); i > 0; i--) { Container container = loadedContainers.get(i-1); @@ -163,7 +163,7 @@ try { containerClass = loader.loadClass(containerCfg.className); } catch (ClassNotFoundException e) { - throw new StartupException("Cannot locate container class", e); + throw new StartupException("Cannot locate container class", e); } if (containerClass == null) { throw new StartupException("Component container class not loaded"); @@ -180,7 +180,7 @@ } catch (ClassCastException e) { throw new StartupException("Cannot create " + containerCfg.name, e); } - + if (containerObj == null) { throw new StartupException("Unable to create instance of component container"); } Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/container/JunitContainer.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/container/JunitContainer.java?rev=757046&r1=757045&r2=757046&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/container/JunitContainer.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/container/JunitContainer.java Sat Mar 21 22:46:22 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/container/JustLoadComponentsContainer.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/container/JustLoadComponentsContainer.java?rev=757046&r1=757045&r2=757046&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/container/JustLoadComponentsContainer.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/container/JustLoadComponentsContainer.java Sat Mar 21 22:46:22 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -47,6 +47,6 @@ return true; } - public void stop() throws ContainerException { + public void stop() throws ContainerException { } } Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/container/NamingServiceContainer.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/container/NamingServiceContainer.java?rev=757046&r1=757045&r2=757046&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/container/NamingServiceContainer.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/container/NamingServiceContainer.java Sat Mar 21 22:46:22 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/crypto/BlowFishCrypt.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/crypto/BlowFishCrypt.java?rev=757046&r1=757045&r2=757046&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/crypto/BlowFishCrypt.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/crypto/BlowFishCrypt.java Sat Mar 21 22:46:22 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -128,45 +128,45 @@ cipher.init(mode, secretKeySpec); return cipher.doFinal(bytes); } - - public static byte[] generateKey() throws NoSuchAlgorithmException { - KeyGenerator keyGen = KeyGenerator.getInstance("Blowfish"); + + public static byte[] generateKey() throws NoSuchAlgorithmException { + KeyGenerator keyGen = KeyGenerator.getInstance("Blowfish"); keyGen.init(448); - - SecretKey secretKey = keyGen.generateKey(); + + SecretKey secretKey = keyGen.generateKey(); byte[] keyBytes = secretKey.getEncoded(); - + return keyBytes; } - + public static boolean testKey(byte[] key) { String testString = "1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstufwxyz"; BlowFishCrypt c = new BlowFishCrypt(key); byte[] encryptedBytes = c.encrypt(testString); String encryptedMessage = new String(encryptedBytes); - + byte[] decryptedBytes = c.decrypt(encryptedMessage); String decryptedMessage = new String(decryptedBytes); - + if (testString.equals(decryptedMessage)) { return true; } - + return false; - } + } public static void main(String args[]) throws Exception { if (args[0] == null) { args[0] = "ofbkey"; } - + byte[] key = generateKey(); - if (testKey(key)) { + if (testKey(key)) { FileOutputStream fos = new FileOutputStream(args[0]); ObjectOutputStream os = new ObjectOutputStream(fos); String keyString = new String(key); os.writeObject(keyString); - fos.close(); - } - } + fos.close(); + } + } } Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/crypto/DesCrypt.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/crypto/DesCrypt.java?rev=757046&r1=757045&r2=757046&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/crypto/DesCrypt.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/crypto/DesCrypt.java Sat Mar 21 22:46:22 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/crypto/HashCrypt.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/crypto/HashCrypt.java?rev=757046&r1=757045&r2=757046&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/crypto/HashCrypt.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/crypto/HashCrypt.java Sat Mar 21 22:46:22 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -47,7 +47,7 @@ messagedigest.update(strBytes); byte[] digestBytes = messagedigest.digest(); char[] digestChars = Hex.encodeHex(digestBytes); - + return "{" + hashType + "}" + new String(digestChars, 0, digestChars.length); } catch (Exception e) { throw new GeneralRuntimeException("Error while computing hash of type " + hashType, e); @@ -71,23 +71,23 @@ throw new GeneralRuntimeException("Error while computing hash of type " + hashType, e); } } - + public static String getHashTypeFromPrefix(String hashString) { if (UtilValidate.isEmpty(hashString) || hashString.charAt(0) != '{') { return null; } - + return hashString.substring(1, hashString.indexOf('}')); } - + public static String removeHashTypePrefix(String hashString) { if (UtilValidate.isEmpty(hashString) || hashString.charAt(0) != '{') { return hashString; } - + return hashString.substring(hashString.indexOf('}') + 1); } - + public static String getDigestHashOldFunnyHexEncode(String str, String hashType) { if (UtilValidate.isEmpty(hashType)) hashType = "SHA"; if (str == null) return null; Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/location/ClasspathLocationResolver.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/location/ClasspathLocationResolver.java?rev=757046&r1=757045&r2=757046&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/location/ClasspathLocationResolver.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/location/ClasspathLocationResolver.java Sat Mar 21 22:46:22 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -32,7 +32,7 @@ public URL resolveLocation(String location) throws MalformedURLException { return resolveLocation(location, null); } - + public URL resolveLocation(String location, ClassLoader loader) throws MalformedURLException { String baseLocation = FlexibleLocation.stripLocationType(location); // if there is a leading forward slash, remove it Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/location/ComponentLocationResolver.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/location/ComponentLocationResolver.java?rev=757046&r1=757045&r2=757046&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/location/ComponentLocationResolver.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/location/ComponentLocationResolver.java Sat Mar 21 22:46:22 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -35,14 +35,14 @@ public static final String module = ComponentLocationResolver.class.getName(); - public URL resolveLocation(String location) throws MalformedURLException { + public URL resolveLocation(String location) throws MalformedURLException { StringBuffer baseLocation = ComponentLocationResolver.getBaseLocation(location); URL fileUrl = UtilURL.fromFilename(baseLocation.toString()); - + if (fileUrl == null) { Debug.logWarning("Unable to get file URL for component location; expanded location was [" + baseLocation + "], original location was [" + location + "]", module); } - + return fileUrl; } Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/location/FlexibleLocation.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/location/FlexibleLocation.java?rev=757046&r1=757045&r2=757046&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/location/FlexibleLocation.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/location/FlexibleLocation.java Sat Mar 21 22:46:22 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -32,16 +32,16 @@ */ public class FlexibleLocation { - + protected static Map<String, LocationResolver> locationResolvers = FastMap.newInstance(); - + protected static Map<String, String> defaultResolvers = FastMap.newInstance(); - + protected static String standardUrlResolverName = StandardUrlLocationResolver.class.getName(); protected static String classpathResolverName = ClasspathLocationResolver.class.getName(); protected static String ofbizHomeResolverName = OFBizHomeLocationResolver.class.getName(); protected static String componentResolverName = ComponentLocationResolver.class.getName(); - + static { defaultResolvers.put("http", standardUrlResolverName); defaultResolvers.put("https", standardUrlResolverName); @@ -53,17 +53,17 @@ defaultResolvers.put("ofbizhome", ofbizHomeResolverName); defaultResolvers.put("component", componentResolverName); } - + /** * Resolves the gives location into a URL object for use in various ways. - * + * * The general format of the location is like a URL: {locationType}://location/path/file.ext - * + * * Supports standard locationTypes like http, https, ftp, jar, & file * Supports a classpath location type for when desired to be used like any other URL * Supports OFBiz specific location types like ofbizhome and component * Supports additional locationTypes specified in the locationresolvers.properties file - * + * * @param location The location String to parse and create a URL from * @return URL object corresponding to the location String passed in * @throws MalformedURLException @@ -71,13 +71,13 @@ public static URL resolveLocation(String location) throws MalformedURLException { return resolveLocation(location, null); } - + public static URL resolveLocation(String location, ClassLoader loader) throws MalformedURLException { if (location == null || location.length() == 0) { return null; } String locationType = getLocationType(location); - + LocationResolver resolver = locationResolvers.get(locationType); if (resolver == null) { synchronized (FlexibleLocation.class) { @@ -115,14 +115,14 @@ } catch (SecurityException e) { throw new MalformedURLException("Error loading Location Resolver class \"" + locationResolverName + "\": " + e.toString()); } - + if (resolver != null) { locationResolvers.put(locationType, resolver); } } } } - + if (resolver != null) { if (loader != null && resolver instanceof ClasspathLocationResolver) { ClasspathLocationResolver cplResolver = (ClasspathLocationResolver) resolver; @@ -134,9 +134,9 @@ throw new MalformedURLException("Could not find a LocationResolver for the location type: " + locationType); } } - - /** - * Find the location type descriptor for the passed location String; + + /** + * Find the location type descriptor for the passed location String; * generally is all text before the first ":" character. * If no type descriptor is found, defaults to "classpath". */ @@ -144,7 +144,7 @@ if (location == null || location.length() == 0) { return null; } - + int colonIndex = location.indexOf(":"); if (colonIndex > 0) { return location.substring(0, colonIndex); @@ -152,14 +152,14 @@ return "classpath"; } } - + public static String stripLocationType(String location) { if (location == null || location.length() == 0) { return ""; } - + StringBuffer strippedSoFar = new StringBuffer(location); - + // first take care of the colon and everything before it int colonIndex = strippedSoFar.indexOf(":"); if (colonIndex == 0) { @@ -167,12 +167,12 @@ } else if (colonIndex > 0) { strippedSoFar.delete(0, colonIndex + 1); } - + // now remove any extra forward slashes, ie as long as the first two are forward slashes remove the first one while (strippedSoFar.charAt(0) == '/' && strippedSoFar.charAt(1) == '/') { strippedSoFar.deleteCharAt(0); } - + return strippedSoFar.toString(); } } Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/location/LocationResolver.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/location/LocationResolver.java?rev=757046&r1=757045&r2=757046&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/location/LocationResolver.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/location/LocationResolver.java Sat Mar 21 22:46:22 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/location/OFBizHomeLocationResolver.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/location/OFBizHomeLocationResolver.java?rev=757046&r1=757045&r2=757046&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/location/OFBizHomeLocationResolver.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/location/OFBizHomeLocationResolver.java Sat Mar 21 22:46:22 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -29,9 +29,9 @@ */ public class OFBizHomeLocationResolver implements LocationResolver { - + public static final String envName = "ofbiz.home"; - + public URL resolveLocation(String location) throws MalformedURLException { String propValue = System.getProperty(envName); if (propValue == null) { @@ -40,14 +40,14 @@ } StringBuilder baseLocation = new StringBuilder(FlexibleLocation.stripLocationType(location)); - + // if there is not a forward slash between the two, add it if (baseLocation.charAt(0) != '/' && propValue.charAt(propValue.length() - 1) != '/') { baseLocation.insert(0, '/'); } - + baseLocation.insert(0, propValue); - + return UtilURL.fromFilename(baseLocation.toString()); } } Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/location/StandardUrlLocationResolver.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/location/StandardUrlLocationResolver.java?rev=757046&r1=757045&r2=757046&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/location/StandardUrlLocationResolver.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/location/StandardUrlLocationResolver.java Sat Mar 21 22:46:22 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/splash/SplashLoader.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/splash/SplashLoader.java?rev=757046&r1=757045&r2=757046&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/splash/SplashLoader.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/splash/SplashLoader.java Sat Mar 21 22:46:22 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/splash/SplashScreen.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/splash/SplashScreen.java?rev=757046&r1=757045&r2=757046&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/splash/SplashScreen.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/splash/SplashScreen.java Sat Mar 21 22:46:22 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -66,7 +66,7 @@ fMediaTracker = new MediaTracker(this); fImage = Toolkit.getDefaultToolkit().getImage(fImageId); } - + private void center() { Dimension screen = Toolkit.getDefaultToolkit().getScreenSize(); Rectangle frame = getBounds(); Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/test/BaseUnitTests.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/test/BaseUnitTests.java?rev=757046&r1=757045&r2=757046&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/test/BaseUnitTests.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/test/BaseUnitTests.java Sat Mar 21 22:46:22 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -41,20 +41,20 @@ } public void testFormatPrintableCreditCard_1() { - assertEquals("test 4111111111111111 to ************111", - "************1111", + assertEquals("test 4111111111111111 to ************111", + "************1111", UtilFormatOut.formatPrintableCreditCard("4111111111111111")); } public void testFormatPrintableCreditCard_2() { - assertEquals("test 4111 to 4111", - "4111", + assertEquals("test 4111 to 4111", + "4111", UtilFormatOut.formatPrintableCreditCard("4111")); } public void testFormatPrintableCreditCard_3() { - assertEquals("test null to null", - null, + assertEquals("test null to null", + null, UtilFormatOut.formatPrintableCreditCard(null)); } } Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/AliasKeyManager.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/AliasKeyManager.java?rev=757046&r1=757045&r2=757046&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/AliasKeyManager.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/AliasKeyManager.java Sat Mar 21 22:46:22 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/Base64.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/Base64.java?rev=757046&r1=757045&r2=757046&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/Base64.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/Base64.java Sat Mar 21 22:46:22 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -100,7 +100,7 @@ Base64DecMap[Base64EncMap[idx]] = (byte) idx; } } - + /** * This method decodes the given byte[] using the base64-encoding * specified in RFC-2045 (Section 6.8). @@ -141,7 +141,7 @@ return dest; } - + /** * This method decodes the given string using the base64-encoding * specified in RFC-2045 (Section 6.8). @@ -153,12 +153,12 @@ if (str == null) { return null; } - + byte data[] = new byte[str.length()]; data = str.getBytes(); return new String(base64Decode(data)); } - + /** * This method encodes the given byte[] using the base64-encoding * specified in RFC-2045 (Section 6.8). @@ -197,7 +197,7 @@ return dest; } - + /** * This method encodes the given string using the base64-encoding * specified in RFC-2045 (Section 6.8). Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/BshUtil.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/BshUtil.java?rev=757046&r1=757045&r2=757046&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/BshUtil.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/BshUtil.java Sat Mar 21 22:46:22 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -48,12 +48,12 @@ protected static Map<ClassLoader, BshClassManager> masterClassManagers = new HashMap<ClassLoader, BshClassManager>(); public static UtilCache<String, Interpreter.ParsedScript> parsedScripts = new UtilCache<String, Interpreter.ParsedScript>("script.BshLocationParsedCache", 0, 0, false); - + /** * Evaluate a BSH condition or expression * @param expression The expression to evaluate * @param context The context to use in evaluation (re-written) - * @return Object The result of the evaluation + * @return Object The result of the evaluation * @throws EvalError */ public static final Object eval(String expression, Map<String, Object> context) throws EvalError { @@ -87,7 +87,7 @@ } return o; } - + public static Interpreter makeInterpreter(Map<String, ? extends Object> context) throws EvalError { Interpreter bsh = getMasterInterpreter(null); // Set the context for the condition @@ -95,11 +95,11 @@ for (Map.Entry<String, ? extends Object> entry: context.entrySet()) { bsh.set(entry.getKey(), entry.getValue()); } - + // include the context itself in for easier access in the scripts bsh.set("context", context); } - + return bsh; } @@ -120,9 +120,9 @@ } } } - + if (master != null) { - Interpreter interpreter = new Interpreter(new StringReader(""), System.out, System.err, + Interpreter interpreter = new Interpreter(new StringReader(""), System.out, System.err, false, new NameSpace(master, "global"), null, null); return interpreter; } else { @@ -131,11 +131,11 @@ return interpreter; } } - + public static Object runBshAtLocation(String location, Map<String, ? extends Object> context) throws GeneralException { try { Interpreter interpreter = makeInterpreter(context); - + Interpreter.ParsedScript script = null; script = parsedScripts.get(location); if (script == null) { @@ -153,7 +153,7 @@ } } } - + return interpreter.evalParsedScript(script); } catch (MalformedURLException e) { String errMsg = "Error loading BSH script at [" + location + "]: " + e.toString(); @@ -175,7 +175,7 @@ } else { Debug.logError(t, "ERROR: Got cause (from getCause) for BSH EvalError: " + ee.toString(), module); } - + String errMsg = "Error running BSH script at [" + location + "], line [" + ee.getErrorLineNumber() + "]: " + t.toString(); // don't log the full exception, just the main message; more detail logged later throw new GeneralException(errMsg, t); Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/CachedClassLoader.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/CachedClassLoader.java?rev=757046&r1=757045&r2=757046&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/CachedClassLoader.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/CachedClassLoader.java Sat Mar 21 22:46:22 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -31,13 +31,13 @@ * */ public class CachedClassLoader extends URLClassLoader { - + public interface Init { void loadClasses(ClassLoader loader, Map<String, Class<?>> classNameMap) throws ClassNotFoundException; } public static final String module = CachedClassLoader.class.getName(); - + private String contextName; public static Map<String, Class<?>> globalClassNameClassMap = new HashMap<String, Class<?>>(); @@ -59,7 +59,7 @@ globalClassNameClassMap.put("String", java.lang.String.class); globalClassNameClassMap.put("java.lang.String", java.lang.String.class); - + globalClassNameClassMap.put("Boolean", java.lang.Boolean.class); globalClassNameClassMap.put("java.lang.Boolean", java.lang.Boolean.class); @@ -80,7 +80,7 @@ globalClassNameClassMap.put("java.lang.Byte", java.lang.Byte.class); globalClassNameClassMap.put("Character", java.lang.Character.class); globalClassNameClassMap.put("java.lang.Character", java.lang.Character.class); - + globalClassNameClassMap.put("Timestamp", java.sql.Timestamp.class); globalClassNameClassMap.put("java.sql.Timestamp", java.sql.Timestamp.class); globalClassNameClassMap.put("Time", java.sql.Time.class); @@ -90,7 +90,7 @@ globalClassNameClassMap.put("Locale", java.util.Locale.class); globalClassNameClassMap.put("java.util.Locale", java.util.Locale.class); - + globalClassNameClassMap.put("java.util.Date", java.util.Date.class); globalClassNameClassMap.put("Collection", java.util.Collection.class); globalClassNameClassMap.put("java.util.Collection", java.util.Collection.class); @@ -125,7 +125,7 @@ } } } - + public CachedClassLoader(URL[] url, ClassLoader parent, String contextName) { super(url, parent); this.contextName = contextName; @@ -141,27 +141,27 @@ Debug.logVerbose("Cached ClassLoader Packages : " + pakList.toString(), module); } } - + public CachedClassLoader(ClassLoader parent, String contextName) { - this(new URL[0], parent, contextName); + this(new URL[0], parent, contextName); } - + public CachedClassLoader(URL[] url, ClassLoader parent) { this(url, parent, "__globalContext"); - } - + } + public String toString() { return "org.ofbiz.base.util.CachedClassLoader(" + contextName + ") / " + getParent().toString(); } - + public Class<?> loadClass(String name) throws ClassNotFoundException { return loadClass(name, false); } - + protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException { //check glocal common classes, ie for all instances Class<?> theClass = globalClassNameClassMap.get(name); - + //check local classes, ie for this instance if (theClass == null) theClass = localClassNameClassMap.get(name); @@ -172,10 +172,10 @@ throw new ClassNotFoundException("Cached loader got a known bad class name: " + name); } } - + if (theClass == null) { if (Debug.verboseOn()) Debug.logVerbose("Cached loader cache miss for class name: [" + name + "]", module); - + synchronized (this) { theClass = localClassNameClassMap.get(name); if (theClass == null) { @@ -201,11 +201,11 @@ } return theClass; } - + public URL getResource(String name) { //check glocal common resources, ie for all instances URL theResource = globalResourceMap.get(name); - + //check local resources, ie for this instance if (theResource == null) theResource = localResourceMap.get(name); @@ -216,11 +216,11 @@ return null; } } - + if (theResource == null) { if (Debug.verboseOn()) Debug.logVerbose("Cached loader cache miss for resource name: [" + name + "]", module); //Debug.logInfo("Cached loader cache miss for resource name: [" + name + "]", module); - + synchronized (this) { theResource = localResourceMap.get(name); if (theResource == null) { @@ -245,7 +245,7 @@ } return theResource; } - + protected boolean isGlobalPath(String name) { if (name.startsWith("java.") || name.startsWith("java/") || name.startsWith("/java/")) return true; if (name.startsWith("javax.") || name.startsWith("javax/") || name.startsWith("/javax/")) return true; Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/DateRange.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/DateRange.java?rev=757046&r1=757045&r2=757046&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/DateRange.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/DateRange.java Sat Mar 21 22:46:22 2009 @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
Free forum by Nabble | Edit this page |