From 58a63d97bef70b599b48b8afc4bc7fd848fb18e6 Mon Sep 17 00:00:00 2001 From: Peter Donald Date: Sat, 16 Mar 2002 04:08:06 +0000 Subject: [PATCH] Ran IDEAs new audit features across codebase to pick up a few anomalies git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271861 13f79535-47bb-0310-9956-ffa450edef68 --- .../myrmidon/components/aspect/DefaultAspectManager.java | 2 +- .../components/configurer/DefaultObjectConfigurer.java | 4 ++-- .../myrmidon/components/deployer/TypeDescriptorBuilder.java | 2 +- .../myrmidon/components/deployer/TypelibDescriptor.java | 2 +- .../myrmidon/components/executor/AspectAwareExecutor.java | 2 +- .../components/extensions/DefaultExtensionManager.java | 2 +- .../myrmidon/components/property/DefaultPropertyResolver.java | 4 ++-- .../apache/myrmidon/components/type/DefaultTypeManager.java | 4 ++-- .../myrmidon/components/type/MultiSourceTypeFactory.java | 4 ++-- .../myrmidon/components/workspace/DefaultTaskContext.java | 2 +- .../apache/myrmidon/framework/conditions/AndCondition.java | 2 +- .../org/apache/myrmidon/framework/conditions/OrCondition.java | 2 +- .../org/apache/myrmidon/interfaces/aspect/AspectManager.java | 2 +- 13 files changed, 17 insertions(+), 17 deletions(-) diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/components/aspect/DefaultAspectManager.java b/proposal/myrmidon/src/java/org/apache/myrmidon/components/aspect/DefaultAspectManager.java index adeee2da1..2546c5c3c 100644 --- a/proposal/myrmidon/src/java/org/apache/myrmidon/components/aspect/DefaultAspectManager.java +++ b/proposal/myrmidon/src/java/org/apache/myrmidon/components/aspect/DefaultAspectManager.java @@ -51,7 +51,7 @@ public class DefaultAspectManager rebuildArrays(); } - public synchronized void removeAspectHandler( final String name, final AspectHandler handler ) + public synchronized void removeAspectHandler( final String name ) throws TaskException { final AspectHandler entry = (AspectHandler)m_aspectMap.remove( name ); diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/DefaultObjectConfigurer.java b/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/DefaultObjectConfigurer.java index 39c6f8078..df4ce15c1 100644 --- a/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/DefaultObjectConfigurer.java +++ b/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/DefaultObjectConfigurer.java @@ -59,7 +59,7 @@ class DefaultObjectConfigurer * created configurer will not handle any attributes, elements, or content. * Use the various enable methods to enable handling of these. */ - public DefaultObjectConfigurer( final Class classInfo ) + private DefaultObjectConfigurer( final Class classInfo ) { m_class = classInfo; } @@ -67,7 +67,7 @@ class DefaultObjectConfigurer /** * Enables all properties and content handling. */ - public void enableAll() + private void enableAll() throws ConfigurationException { enableProperties(); diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/components/deployer/TypeDescriptorBuilder.java b/proposal/myrmidon/src/java/org/apache/myrmidon/components/deployer/TypeDescriptorBuilder.java index b20b3fa93..cae09db32 100644 --- a/proposal/myrmidon/src/java/org/apache/myrmidon/components/deployer/TypeDescriptorBuilder.java +++ b/proposal/myrmidon/src/java/org/apache/myrmidon/components/deployer/TypeDescriptorBuilder.java @@ -72,7 +72,7 @@ class TypeDescriptorBuilder /** * Creates a type definition. */ - public TypeDefinition createTypeDefinition( final Configuration configuration ) + private TypeDefinition createTypeDefinition( final Configuration configuration ) throws ConfigurationException { final String roleShorthand = configuration.getName(); diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/components/deployer/TypelibDescriptor.java b/proposal/myrmidon/src/java/org/apache/myrmidon/components/deployer/TypelibDescriptor.java index 7f0e113cd..b551658b9 100644 --- a/proposal/myrmidon/src/java/org/apache/myrmidon/components/deployer/TypelibDescriptor.java +++ b/proposal/myrmidon/src/java/org/apache/myrmidon/components/deployer/TypelibDescriptor.java @@ -17,7 +17,7 @@ class TypelibDescriptor { private final String m_url; - public TypelibDescriptor( final String url ) + protected TypelibDescriptor( final String url ) { m_url = url; } diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/components/executor/AspectAwareExecutor.java b/proposal/myrmidon/src/java/org/apache/myrmidon/components/executor/AspectAwareExecutor.java index 4c1484981..2ea3786ec 100644 --- a/proposal/myrmidon/src/java/org/apache/myrmidon/components/executor/AspectAwareExecutor.java +++ b/proposal/myrmidon/src/java/org/apache/myrmidon/components/executor/AspectAwareExecutor.java @@ -328,7 +328,7 @@ public class AspectAwareExecutor return parameters; } - protected final AspectManager getAspectManager() + private final AspectManager getAspectManager() { return m_aspectManager; } diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/components/extensions/DefaultExtensionManager.java b/proposal/myrmidon/src/java/org/apache/myrmidon/components/extensions/DefaultExtensionManager.java index e269bcfc8..a70a5c1dd 100644 --- a/proposal/myrmidon/src/java/org/apache/myrmidon/components/extensions/DefaultExtensionManager.java +++ b/proposal/myrmidon/src/java/org/apache/myrmidon/components/extensions/DefaultExtensionManager.java @@ -117,7 +117,7 @@ public class DefaultExtensionManager return tools; } - private Extension createToolsExtension() + private static Extension createToolsExtension() { return new Extension( "com.sun.tools", "1.0", diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/components/property/DefaultPropertyResolver.java b/proposal/myrmidon/src/java/org/apache/myrmidon/components/property/DefaultPropertyResolver.java index d5259c7bb..bf02d690e 100644 --- a/proposal/myrmidon/src/java/org/apache/myrmidon/components/property/DefaultPropertyResolver.java +++ b/proposal/myrmidon/src/java/org/apache/myrmidon/components/property/DefaultPropertyResolver.java @@ -99,8 +99,8 @@ public class DefaultPropertyResolver * @return the reolved property * @exception TaskException if an error occurs */ - protected Object recursiveResolveProperty( final String content, - final Context context ) + private Object recursiveResolveProperty( final String content, + final Context context ) throws TaskException { int start = findNextProperty( content, 0 ); diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/components/type/DefaultTypeManager.java b/proposal/myrmidon/src/java/org/apache/myrmidon/components/type/DefaultTypeManager.java index 9fff4c2cb..d71744014 100644 --- a/proposal/myrmidon/src/java/org/apache/myrmidon/components/type/DefaultTypeManager.java +++ b/proposal/myrmidon/src/java/org/apache/myrmidon/components/type/DefaultTypeManager.java @@ -44,7 +44,7 @@ public class DefaultTypeManager this( null ); } - public DefaultTypeManager( final DefaultTypeManager parent ) + private DefaultTypeManager( final DefaultTypeManager parent ) { m_parent = parent; if( m_parent != null ) @@ -79,7 +79,7 @@ public class DefaultTypeManager return new DefaultTypeManager( this ); } - protected final MultiSourceTypeFactory lookupFactory( final String roleName ) + private final MultiSourceTypeFactory lookupFactory( final String roleName ) { return (MultiSourceTypeFactory)m_roleMap.get( roleName ); } diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/components/type/MultiSourceTypeFactory.java b/proposal/myrmidon/src/java/org/apache/myrmidon/components/type/MultiSourceTypeFactory.java index a24159f65..f1543b81a 100644 --- a/proposal/myrmidon/src/java/org/apache/myrmidon/components/type/MultiSourceTypeFactory.java +++ b/proposal/myrmidon/src/java/org/apache/myrmidon/components/type/MultiSourceTypeFactory.java @@ -111,12 +111,12 @@ public class MultiSourceTypeFactory * * @return the type class */ - protected final Class getType() + private final Class getType() { return m_type; } - protected final TypeFactory getTypeFactory( final String name ) + private final TypeFactory getTypeFactory( final String name ) { return (TypeFactory)m_factories.get( name ); } diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace/DefaultTaskContext.java b/proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace/DefaultTaskContext.java index d4f6267c7..0824c5ba1 100644 --- a/proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace/DefaultTaskContext.java +++ b/proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace/DefaultTaskContext.java @@ -391,7 +391,7 @@ public class DefaultTaskContext * @param value the value of proeprty * @exception TaskException if an error occurs */ - protected void checkPropertyValid( final String name, final Object value ) + private void checkPropertyValid( final String name, final Object value ) throws TaskException { if( BASE_DIRECTORY.equals( name ) && !( value instanceof File ) ) diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/framework/conditions/AndCondition.java b/proposal/myrmidon/src/java/org/apache/myrmidon/framework/conditions/AndCondition.java index 71a53651b..1261145c8 100644 --- a/proposal/myrmidon/src/java/org/apache/myrmidon/framework/conditions/AndCondition.java +++ b/proposal/myrmidon/src/java/org/apache/myrmidon/framework/conditions/AndCondition.java @@ -26,7 +26,7 @@ import org.apache.myrmidon.api.TaskContext; public class AndCondition implements Condition { - final ArrayList m_conditions = new ArrayList(); + private final ArrayList m_conditions = new ArrayList(); /** * Adds a condition. diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/framework/conditions/OrCondition.java b/proposal/myrmidon/src/java/org/apache/myrmidon/framework/conditions/OrCondition.java index 107988ed5..030769537 100644 --- a/proposal/myrmidon/src/java/org/apache/myrmidon/framework/conditions/OrCondition.java +++ b/proposal/myrmidon/src/java/org/apache/myrmidon/framework/conditions/OrCondition.java @@ -26,7 +26,7 @@ import org.apache.myrmidon.api.TaskContext; public class OrCondition implements Condition { - final ArrayList m_conditions = new ArrayList(); + private final ArrayList m_conditions = new ArrayList(); /** * Adds a condition. diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/aspect/AspectManager.java b/proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/aspect/AspectManager.java index 0e418d415..49c6f666a 100644 --- a/proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/aspect/AspectManager.java +++ b/proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/aspect/AspectManager.java @@ -31,6 +31,6 @@ public interface AspectManager void addAspectHandler( String name, AspectHandler handler ) throws TaskException; - void removeAspectHandler( String name, AspectHandler handler ) + void removeAspectHandler( String name ) throws TaskException; }