This is an automated email from the ASF dual-hosted git repository. gk pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/turbine-fulcrum-factory.git
commit e4fd291da111aab99b03cb225a59b1dfa15dbc28 Author: Thomas Vandahl <[email protected]> AuthorDate: Sun Nov 27 13:36:13 2016 +0000 Some cleanup before release git-svn-id: https://svn.apache.org/repos/asf/turbine/fulcrum/trunk/factory@1771590 13f79535-47bb-0310-9956-ffa450edef68 --- src/changes/changes.xml | 4 ++- .../fulcrum/factory/DefaultFactoryService.java | 1 + .../apache/fulcrum/factory/FactoryException.java | 31 +++++++++++++++++++--- .../org/apache/fulcrum/factory/FactoryService.java | 17 +++++------- .../factory/utils/ObjectInputStreamForContext.java | 2 +- 5 files changed, 38 insertions(+), 17 deletions(-) diff --git a/src/changes/changes.xml b/src/changes/changes.xml index b86d5ba..c471df9 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -24,7 +24,9 @@ </properties> <body> - <release version="1.0.5" date="in SVN"> + <release version="1.1.1" date="in SVN"> + </release> + <release version="1.1.0" date="2016-11-27"> <action dev="tv" type="add"> Added generics </action> diff --git a/src/java/org/apache/fulcrum/factory/DefaultFactoryService.java b/src/java/org/apache/fulcrum/factory/DefaultFactoryService.java index f058372..221f65f 100644 --- a/src/java/org/apache/fulcrum/factory/DefaultFactoryService.java +++ b/src/java/org/apache/fulcrum/factory/DefaultFactoryService.java @@ -82,6 +82,7 @@ public class DefaultFactoryService primitiveClasses.put(Float.TYPE.toString(), Float.TYPE); primitiveClasses.put(Double.TYPE.toString(), Double.TYPE); } + /** * temporary storage of class names between configure and initialize */ diff --git a/src/java/org/apache/fulcrum/factory/FactoryException.java b/src/java/org/apache/fulcrum/factory/FactoryException.java index 63c1ee0..7865d90 100644 --- a/src/java/org/apache/fulcrum/factory/FactoryException.java +++ b/src/java/org/apache/fulcrum/factory/FactoryException.java @@ -32,12 +32,35 @@ public class FactoryException extends Exception */ private static final long serialVersionUID = 8954422192583295720L; - public FactoryException(String msg) + /** + * Default constructor + */ + public FactoryException() { - super(msg); + super(); } - public FactoryException(String msg, Exception ex) + + /** + * @see java.lang.Exception(String, Throwable) + */ + public FactoryException(String message, Throwable e) { - super(msg, ex); + super(message, e); + } + + /** + * @see java.lang.Exception(Throwable) + */ + public FactoryException(Throwable e) + { + super(e); + } + + /** + * @see java.lang.Exception(String) + */ + public FactoryException(String msg) + { + super(msg); } } diff --git a/src/java/org/apache/fulcrum/factory/FactoryService.java b/src/java/org/apache/fulcrum/factory/FactoryService.java index 9c42e19..a289bf3 100644 --- a/src/java/org/apache/fulcrum/factory/FactoryService.java +++ b/src/java/org/apache/fulcrum/factory/FactoryService.java @@ -1,8 +1,5 @@ package org.apache.fulcrum.factory; -import org.apache.avalon.framework.service.ServiceException; - - /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -22,8 +19,6 @@ import org.apache.avalon.framework.service.ServiceException; * under the License. */ - - /** * The Factory Service instantiates objects using either default * class loaders or a specified one. Whether specified class @@ -47,7 +42,7 @@ public interface FactoryService * * @param clazz the name of the class. * @return the instance. - * @throws ServiceException if instantiation fails. + * @throws FactoryException if instantiation fails. */ <T> T getInstance(Class<T> clazz) throws FactoryException; @@ -57,7 +52,7 @@ public interface FactoryService * * @param className the name of the class. * @return the instance. - * @throws ServiceException if instantiation fails. + * @throws FactoryException if instantiation fails. */ <T> T getInstance(String className) throws FactoryException; @@ -71,7 +66,7 @@ public interface FactoryService * @param className the name of the class. * @param loader the class loader. * @return the instance. - * @throws ServiceException if instantiation fails. + * @throws FactoryException if instantiation fails. */ <T> T getInstance(String className, ClassLoader loader) @@ -86,7 +81,7 @@ public interface FactoryService * @param params an array containing the parameters of the constructor. * @param signature an array containing the signature of the constructor. * @return the instance. - * @throws ServiceException if instantiation fails. + * @throws FactoryException if instantiation fails. */ <T> T getInstance(String className, Object[] params, @@ -106,7 +101,7 @@ public interface FactoryService * @param params an array containing the parameters of the constructor. * @param signature an array containing the signature of the constructor. * @return the instance. - * @throws ServiceException if instantiation fails. + * @throws FactoryException if instantiation fails. */ <T> T getInstance(String className, ClassLoader loader, @@ -119,7 +114,7 @@ public interface FactoryService * * @param className the name of the class. * @return true if class loaders are supported, false otherwise. - * @throws ServiceException if test fails. + * @throws FactoryException if test fails. */ boolean isLoaderSupported(String className) throws FactoryException; diff --git a/src/java/org/apache/fulcrum/factory/utils/ObjectInputStreamForContext.java b/src/java/org/apache/fulcrum/factory/utils/ObjectInputStreamForContext.java index 513448f..21eae4a 100644 --- a/src/java/org/apache/fulcrum/factory/utils/ObjectInputStreamForContext.java +++ b/src/java/org/apache/fulcrum/factory/utils/ObjectInputStreamForContext.java @@ -60,7 +60,7 @@ public class ObjectInputStreamForContext extends ObjectInputStream } /** - * @see java.io.ObjectInputStream#resolveClass() + * @see java.io.ObjectInputStream#resolveClass(ObjectStreamClass) */ @Override protected Class<?> resolveClass(ObjectStreamClass v)
