svn commit: r961646 - /commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/AnnotationRuleProviderFactory.java

2010-07-08 Thread simonetripodi
Author: simonetripodi
Date: Thu Jul  8 08:59:34 2010
New Revision: 961646

URL: http://svn.apache.org/viewvc?rev=961646view=rev
Log:
first checkin of AnnotationRuleProviderFactory class

Added:

commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/AnnotationRuleProviderFactory.java
   (with props)

Added: 
commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/AnnotationRuleProviderFactory.java
URL: 
http://svn.apache.org/viewvc/commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/AnnotationRuleProviderFactory.java?rev=961646view=auto
==
--- 
commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/AnnotationRuleProviderFactory.java
 (added)
+++ 
commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/AnnotationRuleProviderFactory.java
 Thu Jul  8 08:59:34 2010
@@ -0,0 +1,44 @@
+/*
+ * 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.
+ */
+package org.apache.commons.digester.annotations;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.AnnotatedElement;
+
+import org.apache.commons.digester.Rule;
+
+/**
+ * An object capable of providing instances of {...@link 
AnnotationRuleProvider}.
+ *
+ * @version $Id$
+ * @since 2.1
+ */
+public interface AnnotationRuleProviderFactory {
+
+/**
+ * Return an instance of the specified type.
+ *
+ * @param A
+ * @param E
+ * @param R
+ * @param type
+ * @return
+ */
+A extends Annotation, E extends AnnotatedElement, R extends Rule
+AnnotationRuleProviderA, E, R newInstance(Class? extends 
AnnotationRuleProviderA, E, R type);
+
+}

Propchange: 
commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/AnnotationRuleProviderFactory.java
--
svn:eol-style = native

Propchange: 
commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/AnnotationRuleProviderFactory.java
--
svn:keywords = Date Author Id Revision HeadURL

Propchange: 
commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/AnnotationRuleProviderFactory.java
--
svn:mime-type = text/plain




svn commit: r961648 - /commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/AnnotationRuleProviderFactory.java

2010-07-08 Thread simonetripodi
Author: simonetripodi
Date: Thu Jul  8 09:04:07 2010
New Revision: 961648

URL: http://svn.apache.org/viewvc?rev=961648view=rev
Log:
added exception on method signature
minor javadoc

Modified:

commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/AnnotationRuleProviderFactory.java

Modified: 
commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/AnnotationRuleProviderFactory.java
URL: 
http://svn.apache.org/viewvc/commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/AnnotationRuleProviderFactory.java?rev=961648r1=961647r2=961648view=diff
==
--- 
commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/AnnotationRuleProviderFactory.java
 (original)
+++ 
commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/AnnotationRuleProviderFactory.java
 Thu Jul  8 09:04:07 2010
@@ -35,10 +35,12 @@ public interface AnnotationRuleProviderF
  * @param A
  * @param E
  * @param R
- * @param type
- * @return
+ * @param type the class of the object to be returned.
+ * @return an instance of the specified class.
+ * @throws DigesterLoadingException if any error occurs while creating the
+ * {...@code type} instance.
  */
 A extends Annotation, E extends AnnotatedElement, R extends Rule
-AnnotationRuleProviderA, E, R newInstance(Class? extends 
AnnotationRuleProviderA, E, R type);
+AnnotationRuleProviderA, E, R newInstance(Class? extends 
AnnotationRuleProviderA, E, R type) throws DigesterLoadingException;
 
 }




svn commit: r961749 - /commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/AnnotationRuleProvider.java

2010-07-08 Thread simonetripodi
Author: simonetripodi
Date: Thu Jul  8 13:03:31 2010
New Revision: 961749

URL: http://svn.apache.org/viewvc?rev=961749view=rev
Log:
no need to define an interface method as abstract 

Modified:

commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/AnnotationRuleProvider.java

Modified: 
commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/AnnotationRuleProvider.java
URL: 
http://svn.apache.org/viewvc/commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/AnnotationRuleProvider.java?rev=961749r1=961748r2=961749view=diff
==
--- 
commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/AnnotationRuleProvider.java
 (original)
+++ 
commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/AnnotationRuleProvider.java
 Thu Jul  8 13:03:31 2010
@@ -27,17 +27,7 @@ import org.apache.commons.digester.Rule;
  * @version $Id$
  * @since 2.1
  */
-public abstract class AnnotationRuleProviderA extends Annotation, E extends 
AnnotatedElement, R extends Rule {
-
-/**
- * The annotation instance reference.
- */
-private final A annotation;
-
-/**
- * The annotated element reference.
- */
-private final E element;
+public interface AnnotationRuleProviderA extends Annotation, E extends 
AnnotatedElement, R extends Rule {
 
 /**
  * Initializes the provider.
@@ -45,28 +35,7 @@ public abstract class AnnotationRuleProv
  * @param annotation the annotation instance.
  * @param element the annotated element reference.
  */
-public AnnotationRuleProvider(A annotation, E element) {
-this.annotation = annotation;
-this.element = element;
-}
-
-/**
- * Returns the annotation instance.
- *
- * @return the annotation instance.
- */
-public A getAnnotation() {
-return this.annotation;
-}
-
-/**
- * Returns the annotation instance.
- *
- * @return the annotation instance.
- */
-public E getElement() {
-return this.element;
-}
+void init(A annotation, E element);
 
 /**
  * Provides an instance of {...@link Rule}.
@@ -75,6 +44,6 @@ public abstract class AnnotationRuleProv
  *
  * @return an instance of {...@link Rule}.
  */
-public abstract R get();
+public R get();
 
 }




svn commit: r961750 - /commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/AnnotationRuleProvider.java

2010-07-08 Thread simonetripodi
Author: simonetripodi
Date: Thu Jul  8 13:04:13 2010
New Revision: 961750

URL: http://svn.apache.org/viewvc?rev=961750view=rev
Log:
no need to define an interface method as public 

Modified:

commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/AnnotationRuleProvider.java

Modified: 
commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/AnnotationRuleProvider.java
URL: 
http://svn.apache.org/viewvc/commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/AnnotationRuleProvider.java?rev=961750r1=961749r2=961750view=diff
==
--- 
commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/AnnotationRuleProvider.java
 (original)
+++ 
commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/AnnotationRuleProvider.java
 Thu Jul  8 13:04:13 2010
@@ -44,6 +44,6 @@ public interface AnnotationRuleProvider
  *
  * @return an instance of {...@link Rule}.
  */
-public R get();
+R get();
 
 }




Nexus: Staging Repository Dropped.

2010-07-08 Thread Nexus Repository Manager
Description:Vote was cancelled due to COMMONSSITE-57Details:The org.apache.commons-007 (u:sebb, a:80.176.146.62) staging repository has been dropped.

Nexus: Promotion Completed.

2010-07-08 Thread Nexus Repository Manager
Description:Commons Parent V16 vote succeededDetails:The following artifacts have been promoted to the Releases repository.commons-parent-16.pom.asccommons-parent-16.pomcommons-parent-16-site.xml

svn commit: r961806 - in /commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations: ./ handlers/ providers/

2010-07-08 Thread simonetripodi
Author: simonetripodi
Date: Thu Jul  8 15:29:21 2010
New Revision: 961806

URL: http://svn.apache.org/viewvc?rev=961806view=rev
Log:
Handlers/Providers refactored to be interfaces rather than abstract classes

Removed:

commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/handlers/DefaultLoaderHandler.java
Modified:

commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/DigesterLoader.java

commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/DigesterLoaderHandler.java

commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/DigesterRule.java

commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/FromAnnotationsRuleSet.java

commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/handlers/MethodHandler.java

commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/handlers/SetPropertiesLoaderHandler.java

commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/providers/AttributeCallParamRuleProvider.java

commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/providers/BeanPropertySetterRuleProvider.java

commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/providers/CallMethodRuleProvider.java

commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/providers/CallParamRuleProvider.java

commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/providers/FactoryCreateRuleProvider.java

commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/providers/ObjectCreateRuleProvider.java

commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/providers/PathCallParamRuleProvider.java

commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/providers/SetNextRuleProvider.java

commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/providers/SetPropertiesRuleProvider.java

commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/providers/SetRootRuleProvider.java

commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/providers/SetTopRuleProvider.java

commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/providers/StackCallParamRuleProvider.java

Modified: 
commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/DigesterLoader.java
URL: 
http://svn.apache.org/viewvc/commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/DigesterLoader.java?rev=961806r1=961805r2=961806view=diff
==
--- 
commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/DigesterLoader.java
 (original)
+++ 
commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/DigesterLoader.java
 Thu Jul  8 15:29:21 2010
@@ -22,7 +22,9 @@ import java.lang.reflect.Field;
 import java.lang.reflect.Method;
 
 import org.apache.commons.digester.Digester;
+import org.apache.commons.digester.Rule;
 import org.apache.commons.digester.RuleSet;
+import 
org.apache.commons.digester.annotations.DigesterLoaderHandler.DefaultLoaderHandler;
 import org.apache.commons.digester.annotations.reflect.MethodArgument;
 import org.apache.commons.digester.annotations.utils.AnnotationUtils;
 import org.apache.commons.digester.annotations.utils.InMemoryLRUCache;
@@ -47,13 +49,6 @@ public final class DigesterLoader {
 new InMemoryLRUCacheClass?, FromAnnotationsRuleSet();
 
 /**
- * In-memory LRU cache that stores already analyzed instantiated handlers
- * and relative instance.
- */
-private static final InMemoryLRUCacheClass? extends 
DigesterLoaderHandler? extends Annotation, ? extends AnnotatedElement, 
DigesterLoaderHandlerAnnotation, AnnotatedElement CACHED_HANDLERS =
-new InMemoryLRUCacheClass? extends DigesterLoaderHandler? extends 
Annotation, ? extends AnnotatedElement, 
DigesterLoaderHandlerAnnotation,AnnotatedElement();
-
-/**
  * This class can't be instantiated.
  */
 private DigesterLoader() {
@@ -172,7 +167,7 @@ public final class DigesterLoader {
  * @param element the current visited element.
  */
 @SuppressWarnings(unchecked)
-private static void handle(Annotation annotation, AnnotatedElement 
element, FromAnnotationsRuleSet ruleSet) {
+private static A extends Annotation, E extends AnnotatedElement void 
handle(A annotation, E element, FromAnnotationsRuleSet ruleSet) {
 Class? annotationType = annotation.annotationType();
 
 // check if it is one of the @*.List annotation
@@ -186,25 +181,27 @@ public final 

svn commit: r961810 - in /commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations: DigesterLoader.java internal/ internal/InMemoryLRUCache.java utils/InMemoryLRUCache.java

2010-07-08 Thread simonetripodi
Author: simonetripodi
Date: Thu Jul  8 15:32:00 2010
New Revision: 961810

URL: http://svn.apache.org/viewvc?rev=961810view=rev
Log:
moved the LRU cache to a proper internal package

Added:

commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/internal/

commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/internal/InMemoryLRUCache.java
  - copied, changed from r961627, 
commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/utils/InMemoryLRUCache.java
Removed:

commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/utils/InMemoryLRUCache.java
Modified:

commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/DigesterLoader.java

Modified: 
commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/DigesterLoader.java
URL: 
http://svn.apache.org/viewvc/commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/DigesterLoader.java?rev=961810r1=961809r2=961810view=diff
==
--- 
commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/DigesterLoader.java
 (original)
+++ 
commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/DigesterLoader.java
 Thu Jul  8 15:32:00 2010
@@ -25,9 +25,9 @@ import org.apache.commons.digester.Diges
 import org.apache.commons.digester.Rule;
 import org.apache.commons.digester.RuleSet;
 import 
org.apache.commons.digester.annotations.DigesterLoaderHandler.DefaultLoaderHandler;
+import org.apache.commons.digester.annotations.internal.InMemoryLRUCache;
 import org.apache.commons.digester.annotations.reflect.MethodArgument;
 import org.apache.commons.digester.annotations.utils.AnnotationUtils;
-import org.apache.commons.digester.annotations.utils.InMemoryLRUCache;
 
 /**
  * This class manages the creation of Digester instances analyzing target 
classes

Copied: 
commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/internal/InMemoryLRUCache.java
 (from r961627, 
commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/utils/InMemoryLRUCache.java)
URL: 
http://svn.apache.org/viewvc/commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/internal/InMemoryLRUCache.java?p2=commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/internal/InMemoryLRUCache.javap1=commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/utils/InMemoryLRUCache.javar1=961627r2=961810rev=961810view=diff
==
--- 
commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/utils/InMemoryLRUCache.java
 (original)
+++ 
commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/internal/InMemoryLRUCache.java
 Thu Jul  8 15:32:00 2010
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.digester.annotations.utils;
+package org.apache.commons.digester.annotations.internal;
 
 import java.io.Serializable;
 import java.util.LinkedHashMap;




svn commit: r961816 - /commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/internal/DefaultAnnotationRuleProviderFactory.java

2010-07-08 Thread simonetripodi
Author: simonetripodi
Date: Thu Jul  8 15:41:29 2010
New Revision: 961816

URL: http://svn.apache.org/viewvc?rev=961816view=rev
Log:
minor javadoc

Modified:

commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/internal/DefaultAnnotationRuleProviderFactory.java

Modified: 
commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/internal/DefaultAnnotationRuleProviderFactory.java
URL: 
http://svn.apache.org/viewvc/commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/internal/DefaultAnnotationRuleProviderFactory.java?rev=961816r1=961815r2=961816view=diff
==
--- 
commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/internal/DefaultAnnotationRuleProviderFactory.java
 (original)
+++ 
commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/internal/DefaultAnnotationRuleProviderFactory.java
 Thu Jul  8 15:41:29 2010
@@ -25,7 +25,7 @@ import org.apache.commons.digester.annot
 import 
org.apache.commons.digester.annotations.spi.AnnotationRuleProviderFactory;
 
 /**
- * 
+ * Default {...@link AnnotationRuleProviderFactory} inplementation.
  *
  * @version $Id$
  * @since 2.1




svn commit: r961817 - /commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/internal/DefaultDigesterLoaderHandlerFactory.java

2010-07-08 Thread simonetripodi
Author: simonetripodi
Date: Thu Jul  8 15:42:29 2010
New Revision: 961817

URL: http://svn.apache.org/viewvc?rev=961817view=rev
Log:
first checkin of DefaultDigesterLoaderHandlerFactory class

Added:

commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/internal/DefaultDigesterLoaderHandlerFactory.java
   (with props)

Added: 
commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/internal/DefaultDigesterLoaderHandlerFactory.java
URL: 
http://svn.apache.org/viewvc/commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/internal/DefaultDigesterLoaderHandlerFactory.java?rev=961817view=auto
==
--- 
commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/internal/DefaultDigesterLoaderHandlerFactory.java
 (added)
+++ 
commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/internal/DefaultDigesterLoaderHandlerFactory.java
 Thu Jul  8 15:42:29 2010
@@ -0,0 +1,49 @@
+/*
+ * 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.
+ */
+package org.apache.commons.digester.annotations.internal;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.AnnotatedElement;
+
+import org.apache.commons.digester.annotations.DigesterLoaderHandler;
+import org.apache.commons.digester.annotations.DigesterLoadingException;
+import 
org.apache.commons.digester.annotations.spi.DigesterLoaderHandlerFactory;
+
+/**
+ * Default {...@link DigesterLoaderHandlerFactory} implementation.
+ *
+ * @version $Id$
+ * @since 2.1
+ */
+public final class DefaultDigesterLoaderHandlerFactory implements 
DigesterLoaderHandlerFactory {
+
+/**
+ * {...@inheritdoc}
+ */
+public A extends Annotation, E extends AnnotatedElement 
DigesterLoaderHandlerA, E newInstance(
+Class? extends DigesterLoaderHandlerA, E type)
+throws DigesterLoadingException {
+try {
+return type.newInstance();
+} catch (Exception e) {
+throw new DigesterLoadingException(An error occurred while 
creating '
++ type
++ ' instance, e);
+}
+}
+
+}

Propchange: 
commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/internal/DefaultDigesterLoaderHandlerFactory.java
--
svn:eol-style = native

Propchange: 
commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/internal/DefaultDigesterLoaderHandlerFactory.java
--
svn:keywords = Date Author Id Revision HeadURL

Propchange: 
commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/internal/DefaultDigesterLoaderHandlerFactory.java
--
svn:mime-type = text/plain




svn commit: r961832 - in /commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations: internal/ spi/

2010-07-08 Thread simonetripodi
Author: simonetripodi
Date: Thu Jul  8 16:20:17 2010
New Revision: 961832

URL: http://svn.apache.org/viewvc?rev=961832view=rev
Log:
fixed spi methods signatures

Modified:

commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/internal/DefaultAnnotationRuleProviderFactory.java

commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/internal/DefaultDigesterLoaderHandlerFactory.java

commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/spi/AnnotationRuleProviderFactory.java

commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/spi/DigesterLoaderHandlerFactory.java

Modified: 
commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/internal/DefaultAnnotationRuleProviderFactory.java
URL: 
http://svn.apache.org/viewvc/commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/internal/DefaultAnnotationRuleProviderFactory.java?rev=961832r1=961831r2=961832view=diff
==
--- 
commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/internal/DefaultAnnotationRuleProviderFactory.java
 (original)
+++ 
commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/internal/DefaultAnnotationRuleProviderFactory.java
 Thu Jul  8 16:20:17 2010
@@ -35,9 +35,8 @@ public final class DefaultAnnotationRule
 /**
  * {...@inheritdoc}
  */
-public A extends Annotation, E extends AnnotatedElement, R extends Rule 
AnnotationRuleProviderA, E, R newInstance(
-Class? extends AnnotationRuleProviderA, E, R type)
-throws DigesterLoadingException {
+public T extends AnnotationRuleProvider? extends Annotation, ? extends 
AnnotatedElement, ? extends Rule
+T newInstance(ClassT type) throws DigesterLoadingException {
 try {
 return type.newInstance();
 } catch (Exception e) {

Modified: 
commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/internal/DefaultDigesterLoaderHandlerFactory.java
URL: 
http://svn.apache.org/viewvc/commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/internal/DefaultDigesterLoaderHandlerFactory.java?rev=961832r1=961831r2=961832view=diff
==
--- 
commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/internal/DefaultDigesterLoaderHandlerFactory.java
 (original)
+++ 
commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/internal/DefaultDigesterLoaderHandlerFactory.java
 Thu Jul  8 16:20:17 2010
@@ -34,9 +34,8 @@ public final class DefaultDigesterLoader
 /**
  * {...@inheritdoc}
  */
-public A extends Annotation, E extends AnnotatedElement 
DigesterLoaderHandlerA, E newInstance(
-Class? extends DigesterLoaderHandlerA, E type)
-throws DigesterLoadingException {
+public L extends DigesterLoaderHandler? extends Annotation, ? extends 
AnnotatedElement L newInstance(
+ClassL type) throws DigesterLoadingException {
 try {
 return type.newInstance();
 } catch (Exception e) {

Modified: 
commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/spi/AnnotationRuleProviderFactory.java
URL: 
http://svn.apache.org/viewvc/commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/spi/AnnotationRuleProviderFactory.java?rev=961832r1=961831r2=961832view=diff
==
--- 
commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/spi/AnnotationRuleProviderFactory.java
 (original)
+++ 
commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/spi/AnnotationRuleProviderFactory.java
 Thu Jul  8 16:20:17 2010
@@ -42,7 +42,7 @@ public interface AnnotationRuleProviderF
  * @throws DigesterLoadingException if any error occurs while creating the
  * {...@code type} instance.
  */
-A extends Annotation, E extends AnnotatedElement, R extends Rule
-AnnotationRuleProviderA, E, R newInstance(Class? extends 
AnnotationRuleProviderA, E, R type) throws DigesterLoadingException;
+T extends AnnotationRuleProvider? extends Annotation, ? extends 
AnnotatedElement, ? extends Rule
+T newInstance(ClassT type) throws DigesterLoadingException;
 
 }

Modified: 
commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/spi/DigesterLoaderHandlerFactory.java
URL: 
http://svn.apache.org/viewvc/commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/spi/DigesterLoaderHandlerFactory.java?rev=961832r1=961831r2=961832view=diff

svn commit: r961841 - in /commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations: DigesterLoader.java internal/InMemoryLRUCache.java internal/RuleSetCache.java

2010-07-08 Thread simonetripodi
Author: simonetripodi
Date: Thu Jul  8 17:10:00 2010
New Revision: 961841

URL: http://svn.apache.org/viewvc?rev=961841view=rev
Log:
InMemoryLRUCache is a too generic name, since its tasks is just store RuleSet, 
makes more sense calling it properly

Added:

commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/internal/RuleSetCache.java
  - copied, changed from r961839, 
commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/internal/InMemoryLRUCache.java
Removed:

commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/internal/InMemoryLRUCache.java
Modified:

commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/DigesterLoader.java

Modified: 
commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/DigesterLoader.java
URL: 
http://svn.apache.org/viewvc/commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/DigesterLoader.java?rev=961841r1=961840r2=961841view=diff
==
--- 
commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/DigesterLoader.java
 (original)
+++ 
commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/DigesterLoader.java
 Thu Jul  8 17:10:00 2010
@@ -27,7 +27,7 @@ import org.apache.commons.digester.RuleS
 import 
org.apache.commons.digester.annotations.DigesterLoaderHandler.DefaultLoaderHandler;
 import 
org.apache.commons.digester.annotations.internal.DefaultAnnotationRuleProviderFactory;
 import 
org.apache.commons.digester.annotations.internal.DefaultDigesterLoaderHandlerFactory;
-import org.apache.commons.digester.annotations.internal.InMemoryLRUCache;
+import org.apache.commons.digester.annotations.internal.RuleSetCache;
 import org.apache.commons.digester.annotations.reflect.MethodArgument;
 import 
org.apache.commons.digester.annotations.spi.AnnotationRuleProviderFactory;
 import 
org.apache.commons.digester.annotations.spi.DigesterLoaderHandlerFactory;
@@ -46,7 +46,7 @@ public final class DigesterLoader {
  * In-memory LRU cache that stores already analyzed classes and relative
  * {...@link RuleSet}.
  */
-private final InMemoryLRUCache cachedRuleSet = 
InMemoryLRUCache.getInstance();
+private final RuleSetCache cachedRuleSet = RuleSetCache.getInstance();
 
 private final AnnotationRuleProviderFactory annotationRuleProviderFactory;
 

Copied: 
commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/internal/RuleSetCache.java
 (from r961839, 
commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/internal/InMemoryLRUCache.java)
URL: 
http://svn.apache.org/viewvc/commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/internal/RuleSetCache.java?p2=commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/internal/RuleSetCache.javap1=commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/internal/InMemoryLRUCache.javar1=961839r2=961841rev=961841view=diff
==
--- 
commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/internal/InMemoryLRUCache.java
 (original)
+++ 
commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/internal/RuleSetCache.java
 Thu Jul  8 17:10:00 2010
@@ -28,7 +28,7 @@ import org.apache.commons.digester.annot
  * @version $Id$
  * @since 2.1
  */
-public final class InMemoryLRUCache implements Serializable {
+public final class RuleSetCache implements Serializable {
 
 /**
  * This class serialVersionUID.
@@ -38,14 +38,14 @@ public final class InMemoryLRUCache impl
 /**
  * The static instance reference.
  */
-private final static InMemoryLRUCache INSTANCE = new InMemoryLRUCache();
+private final static RuleSetCache INSTANCE = new RuleSetCache();
 
 /**
  * Returns the static instance reference.
  *
  * @return the static instance reference.
  */
-public static InMemoryLRUCache getInstance() {
+public static RuleSetCache getInstance() {
 return INSTANCE;
 }
 
@@ -85,7 +85,7 @@ public final class InMemoryLRUCache impl
 /**
  * This class can't be instantiated.
  */
-private InMemoryLRUCache() {
+private RuleSetCache() {
 // do nothing
 }
 




svn commit: r962306 - in /commons/proper/math/trunk/src/main: java/org/apache/commons/math/analysis/interpolation/ java/org/apache/commons/math/exception/ java/org/apache/commons/math/util/ resources/

2010-07-08 Thread erans
Author: erans
Date: Thu Jul  8 23:45:06 2010
New Revision: 962306

URL: http://svn.apache.org/viewvc?rev=962306view=rev
Log:
MATH-361

Modified:

commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/interpolation/LinearInterpolator.java

commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/interpolation/SplineInterpolator.java

commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathIllegalArgumentException.java

commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathIllegalNumberException.java

commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/NumberIsTooSmallException.java

commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/LocalizedFormats.java

commons/proper/math/trunk/src/main/resources/META-INF/localization/LocalizedFormats_fr.properties

Modified: 
commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/interpolation/LinearInterpolator.java
URL: 
http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/interpolation/LinearInterpolator.java?rev=962306r1=962305r2=962306view=diff
==
--- 
commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/interpolation/LinearInterpolator.java
 (original)
+++ 
commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/interpolation/LinearInterpolator.java
 Thu Jul  8 23:45:06 2010
@@ -21,6 +21,7 @@ import org.apache.commons.math.exception
 import org.apache.commons.math.analysis.polynomials.PolynomialFunction;
 import org.apache.commons.math.analysis.polynomials.PolynomialSplineFunction;
 import org.apache.commons.math.util.MathUtils;
+import org.apache.commons.math.util.LocalizedFormats;
 
 /**
  * Implements a linear function for interpolation of real univariate functions.
@@ -44,7 +45,8 @@ public class LinearInterpolator implemen
 }
 
 if (x.length  2) {
-throw new NumberIsTooSmallException(x.length, 2, true);
+throw new 
NumberIsTooSmallException(LocalizedFormats.NUMBER_OF_POINTS,
+x.length, 2, true);
 }
 
 // Number of intervals.  The number of data points is n + 1.
@@ -68,5 +70,4 @@ public class LinearInterpolator implemen
 
 return new PolynomialSplineFunction(x, polynomials);
 }
-
 }

Modified: 
commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/interpolation/SplineInterpolator.java
URL: 
http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/interpolation/SplineInterpolator.java?rev=962306r1=962305r2=962306view=diff
==
--- 
commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/interpolation/SplineInterpolator.java
 (original)
+++ 
commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/interpolation/SplineInterpolator.java
 Thu Jul  8 23:45:06 2010
@@ -21,6 +21,7 @@ import org.apache.commons.math.exception
 import org.apache.commons.math.analysis.polynomials.PolynomialFunction;
 import org.apache.commons.math.analysis.polynomials.PolynomialSplineFunction;
 import org.apache.commons.math.util.MathUtils;
+import org.apache.commons.math.util.LocalizedFormats;
 
 /**
  * Computes a natural (also known as free, unclamped) cubic spline 
interpolation for the data set.
@@ -69,7 +70,8 @@ public class SplineInterpolator implemen
 }
 
 if (x.length  3) {
-throw new NumberIsTooSmallException(x.length, 3, true);
+throw new 
NumberIsTooSmallException(LocalizedFormats.NUMBER_OF_POINTS,
+x.length, 3, true);
 }
 
 // Number of intervals.  The number of data points is n + 1.

Modified: 
commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathIllegalArgumentException.java
URL: 
http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathIllegalArgumentException.java?rev=962306r1=962305r2=962306view=diff
==
--- 
commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathIllegalArgumentException.java
 (original)
+++ 
commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/MathIllegalArgumentException.java
 Thu Jul  8 23:45:06 2010
@@ -33,34 +33,66 @@ import org.apache.commons.math.util.Loca
  */
 public class MathIllegalArgumentException extends IllegalArgumentException {
 /**
- * Pattern used to build the message.
+ * Pattern used to build the message (specific context).
  */
-private final Localizable pattern;
+private final Localizable specific;
+/**
+