You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by dm...@apache.org on 2009/05/17 11:45:59 UTC
svn commit: r775615 [2/2] - in /commons/sandbox/resources/trunk: ./ conf/
src/assembly/ src/main/java/org/apache/commons/resources/
src/main/java/org/apache/commons/resources/impl/
src/main/java/org/apache/commons/resources/util/ src/site/ src/site/res...
Modified: commons/sandbox/resources/trunk/src/main/java/org/apache/commons/resources/impl/ResourcesFactoryBase.java
URL: http://svn.apache.org/viewvc/commons/sandbox/resources/trunk/src/main/java/org/apache/commons/resources/impl/ResourcesFactoryBase.java?rev=775615&r1=775614&r2=775615&view=diff
==============================================================================
--- commons/sandbox/resources/trunk/src/main/java/org/apache/commons/resources/impl/ResourcesFactoryBase.java (original)
+++ commons/sandbox/resources/trunk/src/main/java/org/apache/commons/resources/impl/ResourcesFactoryBase.java Sun May 17 09:45:58 2009
@@ -1,24 +1,18 @@
/*
- * $Id$
- * $Revision$
- * $Date$
- *
- * ====================================================================
- *
- * Copyright 2003-2005 The Apache Software Foundation
- *
- * Licensed 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
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file 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 KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
+ * 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 KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package org.apache.commons.resources.impl;
@@ -46,7 +40,7 @@
* @see org.apache.commons.resources.impl.XMLResourcesFactory
*/
public abstract class ResourcesFactoryBase implements ResourcesFactory {
-
+
// ----------------------------------------------------- Instance Variables
Modified: commons/sandbox/resources/trunk/src/main/java/org/apache/commons/resources/impl/WebappPropertyResources.java
URL: http://svn.apache.org/viewvc/commons/sandbox/resources/trunk/src/main/java/org/apache/commons/resources/impl/WebappPropertyResources.java?rev=775615&r1=775614&r2=775615&view=diff
==============================================================================
--- commons/sandbox/resources/trunk/src/main/java/org/apache/commons/resources/impl/WebappPropertyResources.java (original)
+++ commons/sandbox/resources/trunk/src/main/java/org/apache/commons/resources/impl/WebappPropertyResources.java Sun May 17 09:45:58 2009
@@ -1,24 +1,18 @@
/*
- * $Id$
- * $Revision$
- * $Date$
- *
- * ====================================================================
- *
- * Copyright 2003-2005 The Apache Software Foundation
- *
- * Licensed 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
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file 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 KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
+ * 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 KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package org.apache.commons.resources.impl;
@@ -129,7 +123,7 @@
Properties props = new Properties();
String name = baseUrl.replace('.', '/');
name += getLocaleSuffix(locale) + ".properties";
-
+
InputStream stream = null;
try {
@@ -146,14 +140,14 @@
// try ContextClassLoader
}
if (stream == null){
-
+
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
if (classLoader == null) {
classLoader = this.getClass().getClassLoader();
}
stream = classLoader.getResourceAsStream(name);
}
-
+
// Parse the input stream and populate the name-value mappings map
if (stream != null) {
if (getLog().isTraceEnabled()) {
Modified: commons/sandbox/resources/trunk/src/main/java/org/apache/commons/resources/impl/WebappPropertyResourcesFactory.java
URL: http://svn.apache.org/viewvc/commons/sandbox/resources/trunk/src/main/java/org/apache/commons/resources/impl/WebappPropertyResourcesFactory.java?rev=775615&r1=775614&r2=775615&view=diff
==============================================================================
--- commons/sandbox/resources/trunk/src/main/java/org/apache/commons/resources/impl/WebappPropertyResourcesFactory.java (original)
+++ commons/sandbox/resources/trunk/src/main/java/org/apache/commons/resources/impl/WebappPropertyResourcesFactory.java Sun May 17 09:45:58 2009
@@ -1,24 +1,18 @@
/*
- * $Id$
- * $Revision$
- * $Date$
- *
- * ====================================================================
- *
- * Copyright 2003-2005 The Apache Software Foundation
- *
- * Licensed 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
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file 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 KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
+ * 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 KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package org.apache.commons.resources.impl;
Modified: commons/sandbox/resources/trunk/src/main/java/org/apache/commons/resources/impl/WebappResourcesFactoryBase.java
URL: http://svn.apache.org/viewvc/commons/sandbox/resources/trunk/src/main/java/org/apache/commons/resources/impl/WebappResourcesFactoryBase.java?rev=775615&r1=775614&r2=775615&view=diff
==============================================================================
--- commons/sandbox/resources/trunk/src/main/java/org/apache/commons/resources/impl/WebappResourcesFactoryBase.java (original)
+++ commons/sandbox/resources/trunk/src/main/java/org/apache/commons/resources/impl/WebappResourcesFactoryBase.java Sun May 17 09:45:58 2009
@@ -1,31 +1,26 @@
/*
- * $Id$
- * $Revision$
- * $Date$
- *
- * ====================================================================
- *
- * Copyright 2003-2005 The Apache Software Foundation
- *
- * Licensed 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
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file 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 KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
+ * 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 KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
+
package org.apache.commons.resources.impl;
import javax.servlet.ServletContext;
/**
- * <p>Convenience base class for Web App implementations of
+ * <p>Convenience base class for Web App implementations of
* {@link org.apache.commons.resources.ResourcesFactory}.</p>
*/
public abstract class WebappResourcesFactoryBase extends ResourcesFactoryBase {
@@ -42,9 +37,9 @@
* @return The Servlet Context.
*/
public ServletContext getServletContext() {
-
+
return (this.servletContext);
-
+
}
/**
@@ -53,9 +48,9 @@
* @param servletContext The Servlet Context.
*/
public void setServletContext(ServletContext servletContext) {
-
+
this.servletContext = servletContext;
-
+
}
}
Modified: commons/sandbox/resources/trunk/src/main/java/org/apache/commons/resources/impl/WebappXMLResources.java
URL: http://svn.apache.org/viewvc/commons/sandbox/resources/trunk/src/main/java/org/apache/commons/resources/impl/WebappXMLResources.java?rev=775615&r1=775614&r2=775615&view=diff
==============================================================================
--- commons/sandbox/resources/trunk/src/main/java/org/apache/commons/resources/impl/WebappXMLResources.java (original)
+++ commons/sandbox/resources/trunk/src/main/java/org/apache/commons/resources/impl/WebappXMLResources.java Sun May 17 09:45:58 2009
@@ -1,24 +1,18 @@
/*
- * $Id$
- * $Revision$
- * $Date$
- *
- * ====================================================================
- *
- * Copyright 2003-2005 The Apache Software Foundation
- *
- * Licensed 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
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file 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 KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
+ * 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 KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package org.apache.commons.resources.impl;
@@ -38,7 +32,7 @@
import org.xml.sax.SAXException;
/**
- * <p>Concrete implementation of
+ * <p>Concrete implementation of
* {@link org.apache.commons.resources.Resources} that wraps a family
* (one per <code>Locale</code> of XML documents that share a base
* context-relative path for servlet context resources, and have
Modified: commons/sandbox/resources/trunk/src/main/java/org/apache/commons/resources/impl/WebappXMLResourcesFactory.java
URL: http://svn.apache.org/viewvc/commons/sandbox/resources/trunk/src/main/java/org/apache/commons/resources/impl/WebappXMLResourcesFactory.java?rev=775615&r1=775614&r2=775615&view=diff
==============================================================================
--- commons/sandbox/resources/trunk/src/main/java/org/apache/commons/resources/impl/WebappXMLResourcesFactory.java (original)
+++ commons/sandbox/resources/trunk/src/main/java/org/apache/commons/resources/impl/WebappXMLResourcesFactory.java Sun May 17 09:45:58 2009
@@ -1,24 +1,18 @@
/*
- * $Id$
- * $Revision$
- * $Date$
- *
- * ====================================================================
- *
- * Copyright 2003-2005 The Apache Software Foundation
- *
- * Licensed 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
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file 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 KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
+ * 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 KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package org.apache.commons.resources.impl;
Modified: commons/sandbox/resources/trunk/src/main/java/org/apache/commons/resources/impl/XMLResources.java
URL: http://svn.apache.org/viewvc/commons/sandbox/resources/trunk/src/main/java/org/apache/commons/resources/impl/XMLResources.java?rev=775615&r1=775614&r2=775615&view=diff
==============================================================================
--- commons/sandbox/resources/trunk/src/main/java/org/apache/commons/resources/impl/XMLResources.java (original)
+++ commons/sandbox/resources/trunk/src/main/java/org/apache/commons/resources/impl/XMLResources.java Sun May 17 09:45:58 2009
@@ -1,24 +1,18 @@
/*
- * $Id$
- * $Revision$
- * $Date$
- *
- * ====================================================================
- *
- * Copyright 2003-2005 The Apache Software Foundation
- *
- * Licensed 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
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file 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 KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
+ * 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 KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package org.apache.commons.resources.impl;
@@ -37,7 +31,7 @@
import org.xml.sax.SAXException;
/**
- * <p>Concrete implementation of
+ * <p>Concrete implementation of
* {@link org.apache.commons.resources.Resources} that wraps a family
* (one per <code>Locale</code> of XML documents that share a base URL
* and have name suffixes reflecting the <code>Locale</code> for which
Modified: commons/sandbox/resources/trunk/src/main/java/org/apache/commons/resources/impl/XMLResourcesFactory.java
URL: http://svn.apache.org/viewvc/commons/sandbox/resources/trunk/src/main/java/org/apache/commons/resources/impl/XMLResourcesFactory.java?rev=775615&r1=775614&r2=775615&view=diff
==============================================================================
--- commons/sandbox/resources/trunk/src/main/java/org/apache/commons/resources/impl/XMLResourcesFactory.java (original)
+++ commons/sandbox/resources/trunk/src/main/java/org/apache/commons/resources/impl/XMLResourcesFactory.java Sun May 17 09:45:58 2009
@@ -1,24 +1,18 @@
/*
- * $Id$
- * $Revision$
- * $Date$
- *
- * ====================================================================
- *
- * Copyright 2003-2005 The Apache Software Foundation
- *
- * Licensed 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
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file 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 KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
+ * 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 KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package org.apache.commons.resources.impl;
Modified: commons/sandbox/resources/trunk/src/main/java/org/apache/commons/resources/util/IteratorEnumeration.java
URL: http://svn.apache.org/viewvc/commons/sandbox/resources/trunk/src/main/java/org/apache/commons/resources/util/IteratorEnumeration.java?rev=775615&r1=775614&r2=775615&view=diff
==============================================================================
--- commons/sandbox/resources/trunk/src/main/java/org/apache/commons/resources/util/IteratorEnumeration.java (original)
+++ commons/sandbox/resources/trunk/src/main/java/org/apache/commons/resources/util/IteratorEnumeration.java Sun May 17 09:45:58 2009
@@ -1,24 +1,18 @@
/*
- * $Id$
- * $Revision$
- * $Date$
- *
- * ====================================================================
- *
- * Copyright 2005 The Apache Software Foundation
- *
- * Licensed 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
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file 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 KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
+ * 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 KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package org.apache.commons.resources.util;
@@ -30,7 +24,7 @@
* Two way Adaptor class for java.util.Iterator and java.util.Enumeration.
*/
public class IteratorEnumeration implements Iterator, Enumeration {
-
+
private Iterator iterator;
private Enumeration enumeration;
Added: commons/sandbox/resources/trunk/src/site/resources/images/logo.png
URL: http://svn.apache.org/viewvc/commons/sandbox/resources/trunk/src/site/resources/images/logo.png?rev=775615&view=auto
==============================================================================
Binary file - no diff available.
Propchange: commons/sandbox/resources/trunk/src/site/resources/images/logo.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: commons/sandbox/resources/trunk/src/site/site.xml
URL: http://svn.apache.org/viewvc/commons/sandbox/resources/trunk/src/site/site.xml?rev=775615&view=auto
==============================================================================
--- commons/sandbox/resources/trunk/src/site/site.xml (added)
+++ commons/sandbox/resources/trunk/src/site/site.xml Sun May 17 09:45:58 2009
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file 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 KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<project name="Resources">
+ <bannerRight>
+ <name>Commons Resources</name>
+ <src>/images/logo.png</src>
+ <href>/index.html</href>
+ </bannerRight>
+
+ <body>
+ <menu name="Commons Resources">
+ <item name="Overview" href="/index.html"/>
+ <item name="Download" href="http://commons.apache.org/resources/downloads.html"/>
+ </menu>
+
+ <menu name="Documentation">
+ <item name="User Guide" href="http://wiki.apache.org/jakarta-commons/ResourcesUserGuide"/>
+ <item name="Class Diagram" href="http://wiki.apache.org/jakarta-commons/ResourcesClassDiagram"/>
+ </menu>
+
+ <menu name="Development">
+ <item name="Building" href="/building.html"/>
+ <item name="Mailing Lists" href="/mail-lists.html"/>
+ <item name="Issue Tracking" href="/issue-tracking.html"/>
+ <item name="Proposal" href="/proposal.html"/>
+ <item name="Source Repository" href="/source-repository.html"/>
+ <item name="Javadoc (SVN latest)" href="apidocs/index.html"/>
+ </menu>
+
+ </body>
+
+</project>
Modified: commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/MessagesTestCase.java
URL: http://svn.apache.org/viewvc/commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/MessagesTestCase.java?rev=775615&r1=775614&r2=775615&view=diff
==============================================================================
--- commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/MessagesTestCase.java (original)
+++ commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/MessagesTestCase.java Sun May 17 09:45:58 2009
@@ -1,24 +1,18 @@
/*
- * $Id$
- * $Revision$
- * $Date$
- *
- * ====================================================================
- *
- * Copyright 2003-2005 The Apache Software Foundation
- *
- * Licensed 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
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file 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 KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
+ * 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 KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package org.apache.commons.resources;
@@ -96,15 +90,15 @@
*/
public void testLocal() {
String message = null;
-
+
Messages local =
Messages.getMessages(
"org.apache.commons.resources.impl.LocalStrings");
-
+
assertNotNull("Local messages found", local);
message = local.getMessage("local.message");
-
+
assertEquals(
"Correct individual message",
"[Local] REPLACE {0} WITH {1}",
@@ -112,7 +106,7 @@
message =
local.getMessage("local.message", new String[] { "abc", "def" });
-
+
assertEquals(
"Correct replaced message",
"[Local] REPLACE abc WITH def",
@@ -121,14 +115,14 @@
local.getResources().setReturnNull(false);
message = local.getMessage("local.missing");
assertEquals("Correct missing message", "???local.missing???", message);
-
+
Messages messages2 = new MyMessages(null);
Messages messages3 = messages2.getMessages(null);
assertNull("Invalid Messages", messages3);
}
-
+
/**
@@ -139,7 +133,7 @@
message = messages.getMessage("test.missing");
assertEquals("Correct missing message", "???test.missing???", message);
-
+
message = messages.getMessage(Locale.ENGLISH, "test.message");
assertEquals(
"Correct individual message",
@@ -148,7 +142,7 @@
message =
messages.getMessage("test.message", new String[] { "abc", "def" });
-
+
assertEquals(
"Correct replaced message",
"[Base] REPLACE abc WITH def",
@@ -156,7 +150,7 @@
message =
messages.getMessage(Locale.ENGLISH, "test.message", new String[] { "abc", "def" });
-
+
assertEquals(
"Correct replaced message",
"[Base] REPLACE abc WITH def",
@@ -164,27 +158,27 @@
message =
messages.getMessage(Locale.ENGLISH, "test.message.single", "abc");
-
+
assertEquals(
"Correct replaced message",
"[Base] REPLACE abc",
message);
-
+
message =
messages.getMessage("test.message.single", "abc");
-
+
assertEquals(
"Correct replaced message",
"[Base] REPLACE abc",
message);
-
- Resources resources2 =
- factory.getResources(NAME + "-does-not-exist",
+
+ Resources resources2 =
+ factory.getResources(NAME + "-does-not-exist",
CONFIG + "-does-not-exist");
resources2.setReturnNull(false);
Messages messages2 = new Messages(resources2);
message = messages2.getMessage("test.message");
-
+
Exception exception = new Exception("Bad Implementation");
ResourcesException resourcesException = new ResourcesException(exception);
try{
@@ -196,7 +190,7 @@
assertEquals("Check exception cause", e.getRootCause(), exception);
assertEquals("Check exception message", e.getMessage(), exception.getMessage());
}
-
+
}
@@ -214,7 +208,7 @@
message =
messages.getMessage("test.message", new String[] { "abc", "def" });
-
+
assertEquals(
"Correct replaced message",
"[Base] REPLACE abc WITH def",
@@ -222,8 +216,8 @@
message = messages.getMessage("test.missing");
assertEquals("Correct missing message", "???test.missing???", message);
-
-
+
+
}
@@ -263,6 +257,6 @@
};
Messages.setFactory(factory);
}
-
+
}
}
Modified: commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/BasicMessageListTestCase.java
URL: http://svn.apache.org/viewvc/commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/BasicMessageListTestCase.java?rev=775615&r1=775614&r2=775615&view=diff
==============================================================================
--- commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/BasicMessageListTestCase.java (original)
+++ commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/BasicMessageListTestCase.java Sun May 17 09:45:58 2009
@@ -1,24 +1,18 @@
/*
- * $Id$
- * $Revision$
- * $Date$
- *
- * ====================================================================
- *
- * Copyright 2003-2005 The Apache Software Foundation
- *
- * Licensed 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
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file 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 KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
+ * 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 KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package org.apache.commons.resources.impl;
@@ -140,8 +134,8 @@
assertTrue(aMsgs.isAccessed());
}
-
-
+
+
/**
* Tests using the globalMessageKey on the MessageList object.
*/
@@ -149,87 +143,87 @@
BasicMessage foo1 = new BasicMessage("key1");
BasicMessage foo2 = new BasicMessage("key2");
BasicMessage foo3 = new BasicMessage("key3");
-
- MessageList customKeyList =
+
+ MessageList customKeyList =
new BasicMessageList("custom.global.message.key");
-
- MessageList standardKeyList =
+
+ MessageList standardKeyList =
new BasicMessageList();
-
+
customKeyList.add("foo1", foo1);
customKeyList.add("foo2", foo2);
customKeyList.add(foo3);
-
+
standardKeyList.add("foo1", foo1);
standardKeyList.add(foo2);
standardKeyList.add("foo3", foo3);
-
+
assertTrue(customKeyList.size() == 3);
assertTrue(standardKeyList.size() == 3);
-
- assertEquals(customKeyList.getGlobalMessageKey(),
+
+ assertEquals(customKeyList.getGlobalMessageKey(),
"custom.global.message.key");
-
- assertEquals(standardKeyList.getGlobalMessageKey(),
+
+ assertEquals(standardKeyList.getGlobalMessageKey(),
MessageList.GLOBAL_MESSAGE_KEY);
-
- Iterator customKeyListIter =
+
+ Iterator customKeyListIter =
customKeyList.get(MessageList.GLOBAL_MESSAGE_KEY);
while (customKeyListIter.hasNext()) {
fail("List should be empty");
}
-
+
Message msg = null;
- Iterator standardKeyListIter =
+ Iterator standardKeyListIter =
standardKeyList.get(MessageList.GLOBAL_MESSAGE_KEY);
while (standardKeyListIter.hasNext()) {
msg = (Message)standardKeyListIter.next();
assertEquals(msg.getKey(), "key2");
}
msg = null;
-
- MessageList customKeyList2 =
+
+ MessageList customKeyList2 =
new BasicMessageList("custom.global.message.key", customKeyList);
-
- MessageList standardKeyList2 =
+
+ MessageList standardKeyList2 =
new BasicMessageList(standardKeyList);
-
- Iterator customKeyList2Iter =
+
+ Iterator customKeyList2Iter =
customKeyList2.get(MessageList.GLOBAL_MESSAGE_KEY);
while (customKeyList2Iter.hasNext()) {
fail("List should be empty");
}
-
- Iterator standardKeyList2Iter =
+
+ Iterator standardKeyList2Iter =
standardKeyList2.get(MessageList.GLOBAL_MESSAGE_KEY);
while (standardKeyList2Iter.hasNext()) {
msg = (Message)standardKeyList2Iter.next();
assertEquals(msg.getKey(), "key2");
}
msg = null;
-
+
Map map = new HashMap();
assertTrue(map.isEmpty());
-
+
MessageList emptyList = new BasicMessageList();
Iterator emptyListIter = emptyList.get();
while (emptyListIter.hasNext()) {
fail("List should be empty");
}
-
+
MessageList mList = new BasicMessageList("foo");
assertEquals(mList.toString(), "{}");
-
+
}
-
-
-
+
+
+
/**
* Tests adding an MessageList object to an MessageList object.
*/
public void testAddMessages() {
-
+
msg1 = new BasicMessage("key");
msg2 = new BasicMessage("key2");
msg3 = new BasicMessage("key3");
Modified: commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/BasicMessageTestCase.java
URL: http://svn.apache.org/viewvc/commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/BasicMessageTestCase.java?rev=775615&r1=775614&r2=775615&view=diff
==============================================================================
--- commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/BasicMessageTestCase.java (original)
+++ commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/BasicMessageTestCase.java Sun May 17 09:45:58 2009
@@ -1,24 +1,18 @@
/*
- * $Id$
- * $Revision$
- * $Date$
- *
- * ====================================================================
- *
- * Copyright 2003-2005 The Apache Software Foundation
- *
- * Licensed 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
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file 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 KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
+ * 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 KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package org.apache.commons.resources.impl;
@@ -33,13 +27,13 @@
* Orginally based on org.apache.http.action.TestActionMessage, Revision 1.2.
*/
public class BasicMessageTestCase extends TestCase {
-
+
protected BasicMessage amWithNoValue = null;
-
+
protected BasicMessage amWithOneValue = null;
-
+
protected BasicMessage amWithMultipleValues = null;
-
+
/**
* Defines the testcase name for JUnit.
*
@@ -73,31 +67,31 @@
amWithOneValue =
new BasicMessage("amWithOneValue", new String("stringValue"));
amWithMultipleValues =
- new BasicMessage("amWithOneValue",
+ new BasicMessage("amWithOneValue",
new String[]{"stringValue1", "stringValue2", "stringValue3"});
}
public void tearDown() {
amWithNoValue = null;
}
-
+
public void testBasicMessageWithNoValue() {
-
-
+
+
assertTrue(
"testBasicMessageWithNoValue value is not null",
amWithNoValue.getValues() == null);
-
+
assertTrue(
"testBasicMessageWithNoValue key is not amWithNoValue",
amWithNoValue.getKey() == "amWithNoValue");
-
+
amWithNoValue = new BasicMessage();
assertNull(
"testBasicMessageWithNoValue value is not null",
amWithNoValue.getValues());
-
+
}
public void testBasicMessageWithAStringValue() {
@@ -105,19 +99,19 @@
assertTrue(
"testBasicMessageWithAStringValue value is not null",
values != null);
-
+
assertTrue(
"testBasicMessageWithAStringValue value[0] is not the string stringValue",
values[0].equals("stringValue"));
-
+
assertTrue(
"testBasicMessageWithAStringValue key is not amWithOneValue",
amWithOneValue.getKey() == "amWithOneValue");
-
+
assertEquals("Test toString", amWithOneValue.toString(), "amWithOneValue[stringValue]");
-
- assertEquals("Test toString() (multiple)",
+
+ assertEquals("Test toString() (multiple)",
amWithMultipleValues.toString(), "amWithOneValue[stringValue1, stringValue2, stringValue3]");
-
+
}
}
\ No newline at end of file
Modified: commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/CollResources.java
URL: http://svn.apache.org/viewvc/commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/CollResources.java?rev=775615&r1=775614&r2=775615&view=diff
==============================================================================
--- commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/CollResources.java (original)
+++ commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/CollResources.java Sun May 17 09:45:58 2009
@@ -1,24 +1,18 @@
/*
- * $Id$
- * $Revision$
- * $Date$
- *
- * ====================================================================
- *
- * Copyright 2003-2005 The Apache Software Foundation
- *
- * Licensed 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
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file 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 KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
+ * 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 KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package org.apache.commons.resources.impl;
Modified: commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/CollResourcesFactory.java
URL: http://svn.apache.org/viewvc/commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/CollResourcesFactory.java?rev=775615&r1=775614&r2=775615&view=diff
==============================================================================
--- commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/CollResourcesFactory.java (original)
+++ commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/CollResourcesFactory.java Sun May 17 09:45:58 2009
@@ -1,24 +1,18 @@
/*
- * $Id$
- * $Revision$
- * $Date$
- *
- * ====================================================================
- *
- * Copyright 2003-2005 The Apache Software Foundation
- *
- * Licensed 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
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file 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 KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
+ * 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 KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package org.apache.commons.resources.impl;
@@ -30,7 +24,7 @@
* <p>Concrete implementation of {@link ResourcesFactory} for unit tests.</p>
*/
public class CollResourcesFactory extends ResourcesFactoryBase {
-
+
// --------------------------------------------------------- Public Methods
Modified: commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/CollectionResourcesBaseTestCase.java
URL: http://svn.apache.org/viewvc/commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/CollectionResourcesBaseTestCase.java?rev=775615&r1=775614&r2=775615&view=diff
==============================================================================
--- commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/CollectionResourcesBaseTestCase.java (original)
+++ commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/CollectionResourcesBaseTestCase.java Sun May 17 09:45:58 2009
@@ -1,24 +1,18 @@
/*
- * $Id$
- * $Revision$
- * $Date$
- *
- * ====================================================================
- *
- * Copyright 2003-2005 The Apache Software Foundation
- *
- * Licensed 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
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file 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 KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
+ * 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 KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package org.apache.commons.resources.impl;
@@ -157,7 +151,7 @@
} catch (ResourcesException e) {
fail("Should have returned null");
}
-
+
try {
resources.setReturnNull(false);
resources.getString("test.missing", locale);
Modified: commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/JDBCResourcesTestCase.java
URL: http://svn.apache.org/viewvc/commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/JDBCResourcesTestCase.java?rev=775615&r1=775614&r2=775615&view=diff
==============================================================================
--- commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/JDBCResourcesTestCase.java (original)
+++ commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/JDBCResourcesTestCase.java Sun May 17 09:45:58 2009
@@ -1,25 +1,20 @@
/*
- * $Id$
- * $Revision$
- * $Date$
- *
- * ====================================================================
- *
- * Copyright 2003-2005 The Apache Software Foundation
- *
- * Licensed 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
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file 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 KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
+ * 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 KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
+
package org.apache.commons.resources.impl;
import java.net.URL;
@@ -51,10 +46,10 @@
protected String getBase() throws Exception
{
- URL url =
+ URL url =
JDBCResourcesTestCase.class.getResource
("/org/apache/commons/resources/impl/jdbc.test.config.properties");
-
+
if (url == null) {
fail("URL NOT FOUND");
}
@@ -83,13 +78,13 @@
factory = new JDBCResourcesFactory();
resources = factory.getResources(NAME, getBase());
-
+
// InputStream in = this.getClass().getResourceAsStream("init.sql");
// File file = new File("init.sql");
-
+
// change this to load from init.sql
String[] sql = {""
- + "create table resources ("
+ + "create table resources ("
+ " locale varchar(10) not null,"
+ " msgKey varchar(255) not null,"
+ " val varchar(255),"
@@ -185,7 +180,7 @@
private void runSql(String[] sql) throws SQLException {
String url = "jdbc:hsqldb:.";
-
+
Statement stmt;
try {
Class.forName("org.hsqldb.jdbcDriver");
@@ -199,19 +194,19 @@
if (con == null || con.isClosed())
con = DriverManager.getConnection(url, "sa", "");
stmt = con.createStatement();
-
+
for (int i = 0; i < sql.length; i++) {
stmt.execute(sql[i]);
}
stmt.close();
-
+
} catch(SQLException ex) {
fail("SQLException: " + ex.getMessage());
}
}
private boolean isPre14JVM() {
- // some pre 1.4 JVM have buggy WeakHashMap implementations
+ // some pre 1.4 JVM have buggy WeakHashMap implementations
// this is used to test for those JVM
String version = System.getProperty("java.specification.version");
StringTokenizer tokenizer = new StringTokenizer(version,".");
Modified: commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/PropertyResourcesTestCase.java
URL: http://svn.apache.org/viewvc/commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/PropertyResourcesTestCase.java?rev=775615&r1=775614&r2=775615&view=diff
==============================================================================
--- commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/PropertyResourcesTestCase.java (original)
+++ commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/PropertyResourcesTestCase.java Sun May 17 09:45:58 2009
@@ -1,24 +1,18 @@
/*
- * $Id$
- * $Revision$
- * $Date$
- *
- * ====================================================================
- *
- * Copyright 2003-2005 The Apache Software Foundation
- *
- * Licensed 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
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file 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 KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
+ * 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 KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package org.apache.commons.resources.impl;
@@ -43,10 +37,10 @@
protected String getBase() throws Exception
{
- URL url =
+ URL url =
PropertyResourcesTestCase.class.getResource
("/org/apache/commons/resources/impl/TestResources.properties");
-
+
if (url == null) {
fail("URL NOT FOUND");
}
Modified: commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/ResourceBundleResourcesFactoryTestCase.java
URL: http://svn.apache.org/viewvc/commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/ResourceBundleResourcesFactoryTestCase.java?rev=775615&r1=775614&r2=775615&view=diff
==============================================================================
--- commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/ResourceBundleResourcesFactoryTestCase.java (original)
+++ commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/ResourceBundleResourcesFactoryTestCase.java Sun May 17 09:45:58 2009
@@ -1,24 +1,18 @@
/*
- * $Id$
- * $Revision$
- * $Date$
- *
- * ====================================================================
- *
- * Copyright 2003-2005 The Apache Software Foundation
- *
- * Licensed 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
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file 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 KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
+ * 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 KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package org.apache.commons.resources.impl;
Modified: commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/ResourceBundleResourcesTestCase.java
URL: http://svn.apache.org/viewvc/commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/ResourceBundleResourcesTestCase.java?rev=775615&r1=775614&r2=775615&view=diff
==============================================================================
--- commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/ResourceBundleResourcesTestCase.java (original)
+++ commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/ResourceBundleResourcesTestCase.java Sun May 17 09:45:58 2009
@@ -1,24 +1,18 @@
/*
- * $Id$
- * $Revision$
- * $Date$
- *
- * ====================================================================
- *
- * Copyright 2003-2005 The Apache Software Foundation
- *
- * Licensed 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
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file 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 KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
+ * 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 KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package org.apache.commons.resources.impl;
Modified: commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/ResourcesBaseMethodTestCase.java
URL: http://svn.apache.org/viewvc/commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/ResourcesBaseMethodTestCase.java?rev=775615&r1=775614&r2=775615&view=diff
==============================================================================
--- commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/ResourcesBaseMethodTestCase.java (original)
+++ commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/ResourcesBaseMethodTestCase.java Sun May 17 09:45:58 2009
@@ -1,24 +1,18 @@
/*
- * $Id$
- * $Revision$
- * $Date$
- *
- * ====================================================================
- *
- * Copyright 2005 The Apache Software Foundation
- *
- * Licensed 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
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file 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 KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
+ * 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 KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package org.apache.commons.resources.impl;
@@ -209,7 +203,7 @@
fail("Bytes don't match for key " + keys[i] + " at " + j + " map=" + mapValue.charAt(j) + " resource=" + resValue[j]);
}
}
- assertEquals("Bytes lengths don't match for key " + keys[i], mapValue.length(), resValue.length);
+ assertEquals("Bytes lengths don't match for key " + keys[i], mapValue.length(), resValue.length);
}
}
@@ -228,7 +222,7 @@
if (mapValue.length() == 0 && resValue == null) {
continue;
}
- assertEquals("Strings don't match for key " + keys[i], mapValue, resValue);
+ assertEquals("Strings don't match for key " + keys[i], mapValue, resValue);
}
}
@@ -246,9 +240,9 @@
}
char[] resValue = new char[mapValue.length()];
int reslength = reader.read(resValue);
- if ((mapValue.length() == 0 && reslength > 0) ||
+ if ((mapValue.length() == 0 && reslength > 0) ||
(mapValue.length() > 0 && reslength != mapValue.length())) {
- fail("Error checking Reader for key " + keys[i] +
+ fail("Error checking Reader for key " + keys[i] +
" mapLength="+mapValue.length()+ " resLength="+reslength);
}
if (reader.read(new char[1]) != -1) {
@@ -259,7 +253,7 @@
}
for (int j = 0; j < mapValue.length(); j++) {
if (mapValue.charAt(j) != resValue[j]) {
- fail("Readers don't match for key " + keys[i] + " at " + j +
+ fail("Readers don't match for key " + keys[i] + " at " + j +
" map=" + mapValue.charAt(j) + " resource=" + resValue[j]);
}
}
@@ -283,9 +277,9 @@
}
byte[] resValue = new byte[mapValue.length()];
int reslength = stream.read(resValue);
- if ((mapValue.length() == 0 && reslength > 0) ||
+ if ((mapValue.length() == 0 && reslength > 0) ||
(mapValue.length() > 0 && reslength != mapValue.length())) {
- fail("Error checking Stream for key " + keys[i] +
+ fail("Error checking Stream for key " + keys[i] +
" mapLength="+mapValue.length()+ " resLength="+reslength);
}
if (stream.read(new byte[1]) != -1) {
@@ -296,7 +290,7 @@
}
for (int j = 0; j < mapValue.length(); j++) {
if (mapValue.charAt(j) != resValue[j]) {
- fail("Streams don't match for key " + keys[i] + " at " + j +
+ fail("Streams don't match for key " + keys[i] + " at " + j +
" map=" + mapValue.charAt(j) + " resource=" + resValue[j]);
}
}
Modified: commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/ResourcesBaseTestCase.java
URL: http://svn.apache.org/viewvc/commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/ResourcesBaseTestCase.java?rev=775615&r1=775614&r2=775615&view=diff
==============================================================================
--- commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/ResourcesBaseTestCase.java (original)
+++ commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/ResourcesBaseTestCase.java Sun May 17 09:45:58 2009
@@ -1,24 +1,18 @@
/*
- * $Id$
- * $Revision$
- * $Date$
- *
- * ====================================================================
- *
- * Copyright 2003-2005 The Apache Software Foundation
- *
- * Licensed 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
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file 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 KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
+ * 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 KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package org.apache.commons.resources.impl;
Modified: commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/ResourcesFactoryBaseTestCase.java
URL: http://svn.apache.org/viewvc/commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/ResourcesFactoryBaseTestCase.java?rev=775615&r1=775614&r2=775615&view=diff
==============================================================================
--- commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/ResourcesFactoryBaseTestCase.java (original)
+++ commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/ResourcesFactoryBaseTestCase.java Sun May 17 09:45:58 2009
@@ -1,24 +1,18 @@
/*
- * $Id$
- * $Revision$
- * $Date$
- *
- * ====================================================================
- *
- * Copyright 2003-2005 The Apache Software Foundation
- *
- * Licensed 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
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file 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 KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
+ * 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 KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package org.apache.commons.resources.impl;
Modified: commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/TestResources.java
URL: http://svn.apache.org/viewvc/commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/TestResources.java?rev=775615&r1=775614&r2=775615&view=diff
==============================================================================
--- commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/TestResources.java (original)
+++ commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/TestResources.java Sun May 17 09:45:58 2009
@@ -1,24 +1,18 @@
/*
- * $Id$
- * $Revision$
- * $Date$
- *
- * ====================================================================
- *
- * Copyright 2003-2005 The Apache Software Foundation
- *
- * Licensed 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
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file 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 KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
+ * 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 KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package org.apache.commons.resources.impl;
@@ -34,7 +28,7 @@
import org.apache.commons.resources.ResourcesKeyException;
/**
- * <p>Concrete implementation of {@link org.apache.commons.resources.Resources}
+ * <p>Concrete implementation of {@link org.apache.commons.resources.Resources}
* for unit tests.</p>
*/
public class TestResources extends ResourcesBase {
Modified: commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/TestResourcesFactory.java
URL: http://svn.apache.org/viewvc/commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/TestResourcesFactory.java?rev=775615&r1=775614&r2=775615&view=diff
==============================================================================
--- commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/TestResourcesFactory.java (original)
+++ commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/TestResourcesFactory.java Sun May 17 09:45:58 2009
@@ -1,24 +1,18 @@
/*
- * $Id$
- * $Revision$
- * $Date$
- *
- * ====================================================================
- *
- * Copyright 2003-2005 The Apache Software Foundation
- *
- * Licensed 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
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file 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 KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
+ * 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 KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package org.apache.commons.resources.impl;
Modified: commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/XMLResourcesTestCase.java
URL: http://svn.apache.org/viewvc/commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/XMLResourcesTestCase.java?rev=775615&r1=775614&r2=775615&view=diff
==============================================================================
--- commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/XMLResourcesTestCase.java (original)
+++ commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/impl/XMLResourcesTestCase.java Sun May 17 09:45:58 2009
@@ -1,24 +1,18 @@
/*
- * $Id$
- * $Revision$
- * $Date$
- *
- * ====================================================================
- *
- * Copyright 2003-2005 The Apache Software Foundation
- *
- * Licensed 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
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file 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 KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
+ * 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 KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package org.apache.commons.resources.impl;
@@ -55,7 +49,7 @@
resources = null;
factory = null;
}
-
+
protected String getBase() throws Exception{
URL url =
XMLResourcesTestCase.class.getResource
Modified: commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/util/IteratorEnumerationTestCase.java
URL: http://svn.apache.org/viewvc/commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/util/IteratorEnumerationTestCase.java?rev=775615&r1=775614&r2=775615&view=diff
==============================================================================
--- commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/util/IteratorEnumerationTestCase.java (original)
+++ commons/sandbox/resources/trunk/src/test/java/org/apache/commons/resources/util/IteratorEnumerationTestCase.java Sun May 17 09:45:58 2009
@@ -1,24 +1,18 @@
/*
- * $Id$
- * $Revision$
- * $Date$
- *
- * ====================================================================
- *
- * Copyright 2005 The Apache Software Foundation
- *
- * Licensed 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
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file 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 KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
+ * 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 KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package org.apache.commons.resources.util;
@@ -35,7 +29,7 @@
* Unit tests for the <code>org.apache.commons.resources.util.IteratorEnumeration</code> class.
*/
public class IteratorEnumerationTestCase extends TestCase {
-
+
/**
* Defines the testcase name for JUnit.
*
@@ -114,6 +108,6 @@
// expected result
}
-
+
}
}
\ No newline at end of file