|
From: <tri...@us...> - 2008-12-04 15:25:13
|
Revision: 900
http://equanda.svn.sourceforge.net/equanda/?rev=900&view=rev
Author: triathlon98
Date: 2008-12-04 15:25:02 +0000 (Thu, 04 Dec 2008)
Log Message:
-----------
EQ-299 remove checkstyle errors and warnings
Modified Paths:
--------------
trunk/equanda-maven-plugin/src/main/java/org/equanda/plugin/DdltoolPlugin.java
trunk/equanda-maven-plugin/src/main/java/org/equanda/plugin/JarUtil.java
trunk/equanda-maven-plugin/src/main/java/org/equanda/plugin/TemplatePlugin.java
trunk/equanda-maven-plugin/src/main/java/org/equanda/plugin/TranslatePlugin.java
trunk/equanda-maven-plugin/src/main/java/org/equanda/plugin/archetype/EquandaArchetype.java
trunk/equanda-maven-plugin/src/main/java/org/equanda/plugin/archetype/EquandaArchetypeDescriptor.java
trunk/equanda-maven-plugin/src/main/java/org/equanda/plugin/archetype/EquandaArchetypeDescriptorBuilder.java
Modified: trunk/equanda-maven-plugin/src/main/java/org/equanda/plugin/DdltoolPlugin.java
===================================================================
--- trunk/equanda-maven-plugin/src/main/java/org/equanda/plugin/DdltoolPlugin.java 2008-12-04 13:10:11 UTC (rev 899)
+++ trunk/equanda-maven-plugin/src/main/java/org/equanda/plugin/DdltoolPlugin.java 2008-12-04 15:25:02 UTC (rev 900)
@@ -62,9 +62,7 @@
*/
private String database;
- /**
- * @parameter expression="org.firebirdsql.jdbc.FBDriver"
- */
+ /** @parameter expression="org.firebirdsql.jdbc.FBDriver" */
private String dbclass;
/**
@@ -74,19 +72,13 @@
*/
private String dbmap;
- /**
- * @parameter expression="sysdba"
- */
+ /** @parameter expression="sysdba" */
private String dblogin;
- /**
- * @parameter expression="masterkey"
- */
+ /** @parameter expression="masterkey" */
private String dbpassword;
- /**
- * @parameter expression="update defaults indexes"
- */
+ /** @parameter expression="update defaults indexes" */
private String ddltargets;
/**
Modified: trunk/equanda-maven-plugin/src/main/java/org/equanda/plugin/JarUtil.java
===================================================================
--- trunk/equanda-maven-plugin/src/main/java/org/equanda/plugin/JarUtil.java 2008-12-04 13:10:11 UTC (rev 899)
+++ trunk/equanda-maven-plugin/src/main/java/org/equanda/plugin/JarUtil.java 2008-12-04 15:25:02 UTC (rev 900)
@@ -33,8 +33,10 @@
*
* @author <a href="mailto:jo...@pr...">Joachim Van der Auwera</a>
*/
-public class JarUtil
+public final class JarUtil
{
+ private JarUtil() {}
+
/**
* Unjar a jar file to a directory, avoiding creation of file which are "overwritten".
*
Modified: trunk/equanda-maven-plugin/src/main/java/org/equanda/plugin/TemplatePlugin.java
===================================================================
--- trunk/equanda-maven-plugin/src/main/java/org/equanda/plugin/TemplatePlugin.java 2008-12-04 13:10:11 UTC (rev 899)
+++ trunk/equanda-maven-plugin/src/main/java/org/equanda/plugin/TemplatePlugin.java 2008-12-04 15:25:02 UTC (rev 900)
@@ -24,18 +24,17 @@
package org.equanda.plugin;
+import org.apache.maven.model.Dependency;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.project.MavenProject;
import org.apache.maven.project.MavenProjectHelper;
-import org.apache.maven.model.Dependency;
-import org.apache.maven.model.Repository;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
-import java.util.List;
import java.util.Collection;
+import java.util.List;
/**
* Maven plugin for equanda code generation.
Modified: trunk/equanda-maven-plugin/src/main/java/org/equanda/plugin/TranslatePlugin.java
===================================================================
--- trunk/equanda-maven-plugin/src/main/java/org/equanda/plugin/TranslatePlugin.java 2008-12-04 13:10:11 UTC (rev 899)
+++ trunk/equanda-maven-plugin/src/main/java/org/equanda/plugin/TranslatePlugin.java 2008-12-04 15:25:02 UTC (rev 900)
@@ -40,39 +40,25 @@
public class TranslatePlugin
extends AbstractMojo
{
- /**
- * @parameter expression="dm.xml"
- */
+ /** @parameter expression="dm.xml" */
private String definition;
- /**
- * @parameter expression="${basedir}/../src/main/dm"
- */
+ /** @parameter expression="${basedir}/../src/main/dm" */
private String sourceDirectory;
- /**
- * @parameter expression="true"
- */
+ /** @parameter expression="true" */
private boolean importDbKeysOnly;
- /**
- * @parameter expression="true"
- */
+ /** @parameter expression="true" */
private boolean infrastructure;
- /**
- * @parameter expression="equanda-table"
- */
+ /** @parameter expression="equanda-table" */
private String context;
- /**
- * @parameter expression="equanda-table"
- */
+ /** @parameter expression="equanda-table" */
private String keyPrefixesToKeep;
- /**
- * @parameter expression="${basedir}/src/main/resources/translations.txt"
- */
+ /** @parameter expression="${basedir}/src/main/resources/translations.txt" */
private String translateTarget;
/**
@@ -82,14 +68,10 @@
*/
private String verifyLanguages;
- /**
- * @parameter expression="1000"
- */
+ /** @parameter expression="1000" */
private int width;
- /**
- * @parameter expression="600"
- */
+ /** @parameter expression="600" */
private int height;
public void execute()
@@ -104,10 +86,10 @@
public void uncaughtException( Thread thread, Throwable throwable )
{
SaveException.saveException( throwable, "during equanda:translate" );
- synchronized ( waitFor )
- {
- waitFor.notifyAll();
- }
+ synchronized ( waitFor )
+ {
+ waitFor.notifyAll();
+ }
}
} );
@@ -118,10 +100,10 @@
catch ( Exception ex )
{
SaveException.saveException( ex, "problems while editing translations" );
- synchronized ( waitFor )
- {
- waitFor.notifyAll();
- }
+ synchronized ( waitFor )
+ {
+ waitFor.notifyAll();
+ }
throw new MojoExecutionException( "problems while editing translations", ex );
}
synchronized ( waitFor )
Modified: trunk/equanda-maven-plugin/src/main/java/org/equanda/plugin/archetype/EquandaArchetype.java
===================================================================
--- trunk/equanda-maven-plugin/src/main/java/org/equanda/plugin/archetype/EquandaArchetype.java 2008-12-04 13:10:11 UTC (rev 899)
+++ trunk/equanda-maven-plugin/src/main/java/org/equanda/plugin/archetype/EquandaArchetype.java 2008-12-04 15:25:02 UTC (rev 900)
@@ -24,14 +24,6 @@
package org.equanda.plugin.archetype;
-import java.io.*;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
import org.apache.maven.archetype.Archetype;
import org.apache.maven.archetype.ArchetypeDescriptorException;
import org.apache.maven.archetype.ArchetypeNotFoundException;
@@ -62,6 +54,14 @@
import org.dom4j.io.SAXReader;
import org.dom4j.io.XMLWriter;
+import java.io.*;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
/**
* Default Equanda Archetype
*
@@ -79,19 +79,15 @@
private static final String DEFAULT_SOURCE_DIR = "/src/main/java";
- /**
- * @plexus.requirement
- */
+ /** @plexus.requirement */
private VelocityComponent velocity;
- /**
- * @plexus.requirement
- */
+ /** @plexus.requirement */
private Downloader downloader;
public void createArchetype( String archetypeGroupId, String archetypeArtifactId, String archetypeVersion,
- ArtifactRepository localRepository, List remoteRepositories, Map parameters )
- throws ArchetypeNotFoundException, ArchetypeDescriptorException, ArchetypeTemplateProcessingException
+ ArtifactRepository localRepository, List remoteRepositories, Map parameters )
+ throws ArchetypeNotFoundException, ArchetypeDescriptorException, ArchetypeTemplateProcessingException
{
String packageName = (String) parameters.get( "package" );
@@ -118,7 +114,7 @@
try
{
archetype = downloader.download( archetypeGroupId, archetypeArtifactId, archetypeVersion, localRepository,
- remoteRepositories );
+ remoteRepositories );
}
catch ( DownloadException e )
{
@@ -136,8 +132,8 @@
{
getLogger().info( "----------------------------------------------------------------------------" );
getLogger().info(
- "Using following parameters for creating Archetype: " + archetypeArtifactId + ":"
- + archetypeVersion );
+ "Using following parameters for creating Archetype: " + archetypeArtifactId + ":"
+ + archetypeVersion );
getLogger().info( "----------------------------------------------------------------------------" );
Set keys = parameters.keySet();
@@ -174,7 +170,7 @@
if ( is == null )
{
throw new ArchetypeDescriptorException( "The " + ARCHETYPE_DESCRIPTOR
- + " descriptor cannot be found." );
+ + " descriptor cannot be found." );
}
}
String content = IOUtil.toString( is );
@@ -226,7 +222,7 @@
else
{
throw new ArchetypeTemplateProcessingException( outputDirectoryFile.getName()
- + " already exists - please run from a clean directory" );
+ + " already exists - please run from a clean directory" );
}
}
pomFile = new File( outputDirectoryFile, ARCHETYPE_POM );
@@ -339,7 +335,7 @@
}
static boolean addModuleToParentPom( String artifactId, Reader fileReader, Writer fileWriter )
- throws DocumentException, IOException, ArchetypeTemplateProcessingException
+ throws DocumentException, IOException, ArchetypeTemplateProcessingException
{
SAXReader reader = new SAXReader();
Document document = reader.read( fileReader );
@@ -365,7 +361,7 @@
project.addText( "\n" );
}
boolean found = false;
- for ( Iterator i = modules.elementIterator( "module" ); i.hasNext() && !found; )
+ for ( Iterator i = modules.elementIterator( "module" ); i.hasNext() && !found ; )
{
Element module = (Element) i.next();
if ( module.getText().equals( artifactId ) )
@@ -376,7 +372,7 @@
if ( !found )
{
Node lastTextNode = null;
- for ( Iterator i = modules.nodeIterator(); i.hasNext(); )
+ for ( Iterator i = modules.nodeIterator(); i.hasNext() ; )
{
Node node = (Node) i.next();
if ( node.getNodeType() == Node.ELEMENT_NODE )
@@ -405,8 +401,8 @@
}
private void processTemplates( File pomFile, String outputDirectory, Context context,
- EquandaArchetypeDescriptor descriptor, String packageName, Model parentModel )
- throws ArchetypeTemplateProcessingException
+ EquandaArchetypeDescriptor descriptor, String packageName, Model parentModel )
+ throws ArchetypeTemplateProcessingException
{
if ( !pomFile.exists() )
{
@@ -481,8 +477,8 @@
if ( getLogger().isDebugEnabled() )
{
getLogger()
- .debug(
- "********************* Debug info for resources created from generated Model ***********************" );
+ .debug(
+ "********************* Debug info for resources created from generated Model ***********************" );
}
if ( getLogger().isDebugEnabled() )
@@ -567,7 +563,7 @@
}
getLogger().info(
- "********************* End of debug info from resources from generated POM ***********************" );
+ "********************* End of debug info from resources from generated POM ***********************" );
// Main
@@ -628,8 +624,8 @@
}
private void processTemplate( String outputDirectory, Context context, String template,
- EquandaTemplateDescriptor descriptor, boolean packageInFileName, String packageName )
- throws ArchetypeTemplateProcessingException
+ EquandaTemplateDescriptor descriptor, boolean packageInFileName, String packageName )
+ throws ArchetypeTemplateProcessingException
{
processTemplate( outputDirectory, context, template, descriptor, packageInFileName, packageName, null );
}
@@ -637,11 +633,12 @@
private String getOutputDirectory( String outputDirectory, String testResourceDirectory )
{
return outputDirectory
- + ( testResourceDirectory.startsWith( "/" ) ? testResourceDirectory : "/" + testResourceDirectory );
+ + ( testResourceDirectory.startsWith( "/" ) ? testResourceDirectory : "/" + testResourceDirectory );
}
protected void processSources( String outputDirectory, Context context, EquandaArchetypeDescriptor descriptor,
- String packageName, String sourceDirectory ) throws ArchetypeTemplateProcessingException
+ String packageName, String sourceDirectory )
+ throws ArchetypeTemplateProcessingException
{
for ( String template : descriptor.getSources() )
{
@@ -651,7 +648,8 @@
}
protected void processTestSources( String outputDirectory, Context context, EquandaArchetypeDescriptor descriptor,
- String packageName, String testSourceDirectory ) throws ArchetypeTemplateProcessingException
+ String packageName, String testSourceDirectory )
+ throws ArchetypeTemplateProcessingException
{
for ( String template : descriptor.getTestSources() )
{
@@ -661,7 +659,8 @@
}
protected void processResources( String outputDirectory, Context context, EquandaArchetypeDescriptor descriptor,
- String packageName ) throws ArchetypeTemplateProcessingException
+ String packageName )
+ throws ArchetypeTemplateProcessingException
{
for ( String template : descriptor.getResources() )
{
@@ -671,7 +670,8 @@
}
protected void processTestResources( String outputDirectory, Context context,
- EquandaArchetypeDescriptor descriptor, String packageName ) throws ArchetypeTemplateProcessingException
+ EquandaArchetypeDescriptor descriptor, String packageName )
+ throws ArchetypeTemplateProcessingException
{
for ( String template : descriptor.getTestResources() )
{
@@ -681,7 +681,8 @@
}
protected void processSiteResources( String outputDirectory, Context context,
- EquandaArchetypeDescriptor descriptor, String packageName ) throws ArchetypeTemplateProcessingException
+ EquandaArchetypeDescriptor descriptor, String packageName )
+ throws ArchetypeTemplateProcessingException
{
for ( String template : descriptor.getSiteResources() )
{
@@ -691,8 +692,9 @@
}
protected void processTemplate( String outputDirectory, Context context, String template,
- EquandaTemplateDescriptor descriptor, boolean packageInFileName, String packageName, String sourceDirectory )
- throws ArchetypeTemplateProcessingException
+ EquandaTemplateDescriptor descriptor, boolean packageInFileName, String packageName,
+ String sourceDirectory )
+ throws ArchetypeTemplateProcessingException
{
template = StringUtils.replace( template, "\\", "/" );
File f;
@@ -751,7 +753,7 @@
if ( !dirname.startsWith( sourceDirectory ) )
{
throw new ArchetypeTemplateProcessingException( "Template '" + template + "' not in directory '"
- + sourceDirectory + "'" );
+ + sourceDirectory + "'" );
}
String extraPackages = dirname.substring( sourceDirectory.length() );
if ( extraPackages.startsWith( "/" ) )
Modified: trunk/equanda-maven-plugin/src/main/java/org/equanda/plugin/archetype/EquandaArchetypeDescriptor.java
===================================================================
--- trunk/equanda-maven-plugin/src/main/java/org/equanda/plugin/archetype/EquandaArchetypeDescriptor.java 2008-12-04 13:10:11 UTC (rev 899)
+++ trunk/equanda-maven-plugin/src/main/java/org/equanda/plugin/archetype/EquandaArchetypeDescriptor.java 2008-12-04 15:25:02 UTC (rev 900)
@@ -21,6 +21,7 @@
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*/
+
package org.equanda.plugin.archetype;
import java.util.ArrayList;
@@ -30,7 +31,7 @@
/**
* Archetype descriptor
- *
+ *
* @author <a href="mailto:vla...@gm...">Vladimir Tkachenko</a>
*/
public class EquandaArchetypeDescriptor
@@ -50,7 +51,7 @@
private Map<String, EquandaTemplateDescriptor> testResourcesDescriptors;
private Map<String, EquandaTemplateDescriptor> siteResourcesDescriptors;
- public EquandaArchetypeDescriptor ( )
+ public EquandaArchetypeDescriptor()
{
super();
Modified: trunk/equanda-maven-plugin/src/main/java/org/equanda/plugin/archetype/EquandaArchetypeDescriptorBuilder.java
===================================================================
--- trunk/equanda-maven-plugin/src/main/java/org/equanda/plugin/archetype/EquandaArchetypeDescriptorBuilder.java 2008-12-04 13:10:11 UTC (rev 899)
+++ trunk/equanda-maven-plugin/src/main/java/org/equanda/plugin/archetype/EquandaArchetypeDescriptorBuilder.java 2008-12-04 15:25:02 UTC (rev 900)
@@ -21,20 +21,21 @@
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*/
+
package org.equanda.plugin.archetype;
+import org.codehaus.plexus.util.xml.Xpp3Dom;
+import org.codehaus.plexus.util.xml.Xpp3DomBuilder;
+import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
+
import java.io.IOException;
import java.io.Reader;
import java.nio.charset.IllegalCharsetNameException;
import java.nio.charset.UnsupportedCharsetException;
-import org.codehaus.plexus.util.xml.Xpp3Dom;
-import org.codehaus.plexus.util.xml.Xpp3DomBuilder;
-import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
-
/**
* Equanda Archetype Description Builder
- *
+ *
* @author <a href="mailto:vla...@gm...">Vladimir Tkachenko</a>
*/
public class EquandaArchetypeDescriptorBuilder
@@ -42,12 +43,14 @@
/**
* Builds archetype descriptor
+ *
* @param reader reader
* @return archetype descriptor
- * @throws IOException
- * @throws XmlPullParserException
+ * @throws IOException oops
+ * @throws XmlPullParserException oops
*/
- public EquandaArchetypeDescriptor build( Reader reader ) throws IOException, XmlPullParserException
+ public EquandaArchetypeDescriptor build( Reader reader )
+ throws IOException, XmlPullParserException
{
EquandaArchetypeDescriptor descriptor = new EquandaArchetypeDescriptor();
Xpp3Dom dom = Xpp3DomBuilder.build( reader );
@@ -68,7 +71,7 @@
if ( sources != null )
{
Xpp3Dom[] sourceList = sources.getChildren( "source" );
- for ( int i = 0; i < sourceList.length; i++ )
+ for ( int i = 0; i < sourceList.length ; i++ )
{
addSourceToDescriptor( sourceList[ i ], descriptor );
}
@@ -79,7 +82,7 @@
if ( resources != null )
{
Xpp3Dom[] resourceList = resources.getChildren( "resource" );
- for ( int i = 0; i < resourceList.length; i++ )
+ for ( int i = 0; i < resourceList.length ; i++ )
{
addResourceToDescriptor( resourceList[ i ], descriptor );
}
@@ -90,7 +93,7 @@
if ( testSources != null )
{
Xpp3Dom[] testSourceList = testSources.getChildren( "source" );
- for ( int i = 0; i < testSourceList.length; i++ )
+ for ( int i = 0; i < testSourceList.length ; i++ )
{
addTestSourceToDescriptor( testSourceList[ i ], descriptor );
}
@@ -102,7 +105,7 @@
{
Xpp3Dom[] testResourceList = testResources.getChildren( "resource" );
- for ( int i = 0; i < testResourceList.length; i++ )
+ for ( int i = 0; i < testResourceList.length ; i++ )
{
addTestResourceToDescriptor( testResourceList[ i ], descriptor );
}
@@ -114,7 +117,7 @@
{
Xpp3Dom[] siteResourceList = siteResources.getChildren( "resource" );
- for ( int i = 0; i < siteResourceList.length; i++ )
+ for ( int i = 0; i < siteResourceList.length ; i++ )
{
addSiteResourceToDescriptor( siteResourceList[ i ], descriptor );
}
@@ -127,13 +130,13 @@
* Adds the source element <code>source</code> to the list of sources in the <code>descriptor</code> and sets
* its <code>EquandaTemplateDescriptor</code> to <i>filtered</i> and with the encoding specified in the
* <code>encoding</code> attribute or the Java virtual machine's default if it is not defined.
- *
+ *
* @param source a <code><source></code> element from the <code><sources></code>
* @param descriptor the <code>ArchetypeDescriptor</code> to add the source template to.
* @throws XmlPullParserException if the encoding specified is not valid or supported.
*/
private static void addSourceToDescriptor( Xpp3Dom source, EquandaArchetypeDescriptor descriptor )
- throws XmlPullParserException
+ throws XmlPullParserException
{
descriptor.addSource( source.getValue() );
EquandaTemplateDescriptor sourceDesc = descriptor.getSourceDescriptor( source.getValue() );
@@ -166,14 +169,14 @@
* Java virtual machine's default if it is not defined. If the <code>resource</code> is a property file (ends in
* <code>.properties</code>) its encoding will be set to <code>iso-8859-1</code> even if some other encoding is
* specified in the attribute.
- *
+ *
* @param resource a <code><resource></code> element from the <code><resources></code>
* @param descriptor the <code>ArchetypeDescriptor</code> to add the resource template to.
* @throws XmlPullParserException if the encoding specified is not valid or supported or if the value of the
- * attribute <code>filtered</code> is no valid.
+ * attribute <code>filtered</code> is no valid.
*/
private static void addResourceToDescriptor( Xpp3Dom resource, EquandaArchetypeDescriptor descriptor )
- throws XmlPullParserException
+ throws XmlPullParserException
{
descriptor.addResource( resource.getValue() );
@@ -203,7 +206,8 @@
}
catch ( UnsupportedCharsetException uce )
{
- throw new XmlPullParserException( resource.getAttribute( "encoding" ) + " is not a supported encoding." );
+ throw new XmlPullParserException(
+ resource.getAttribute( "encoding" ) + " is not a supported encoding." );
}
}
@@ -219,13 +223,13 @@
* Adds the test-source element <code>source</code> to the list of sources in the <code>descriptor</code> and
* sets its <code>EquandaTemplateDescriptor</code> to <i>filtered</i> and with the encoding specified in the
* <code>encoding</code> attribute or the Java virtual machine's default if it is not defined.
- *
+ *
* @param testSource a <code><source></code> element from the <code><testSources></code>
* @param descriptor the <code>ArchetypeDescriptor</code> to add the test-source template to.
* @throws XmlPullParserException if the encoding specified is not valid or supported.
*/
private static void addTestSourceToDescriptor( Xpp3Dom testSource, EquandaArchetypeDescriptor descriptor )
- throws XmlPullParserException
+ throws XmlPullParserException
{
descriptor.addTestSource( testSource.getValue() );
@@ -246,7 +250,7 @@
catch ( UnsupportedCharsetException uce )
{
throw new XmlPullParserException( testSource.getAttribute( "encoding" )
- + " is not a supported encoding." );
+ + " is not a supported encoding." );
}
}
@@ -261,14 +265,14 @@
* <code>encoding</code> attribute or the Java virtual machine's default if it is not defined. If the
* <code>resource</code> is a property file (ends in <code>.properties</code>) its encoding will be set to
* <code>iso-8859-1</code> even if some other encoding is specified in the attribute.
- *
+ *
* @param testResource a <code><resource></code> element from the <code><testResources></code>
* @param descriptor the <code>ArchetypeDescriptor</code> to add the test-resource template to.
* @throws XmlPullParserException if the encoding specified is not valid or supported or if the value of the
- * attribute <code>filtered</code> is no valid.
+ * attribute <code>filtered</code> is no valid.
*/
private static void addTestResourceToDescriptor( Xpp3Dom testResource, EquandaArchetypeDescriptor descriptor )
- throws XmlPullParserException
+ throws XmlPullParserException
{
descriptor.addTestResource( testResource.getValue() );
@@ -294,12 +298,13 @@
}
catch ( IllegalCharsetNameException icne )
{
- throw new XmlPullParserException( testResource.getAttribute( "encoding" ) + " is not a valid encoding." );
+ throw new XmlPullParserException(
+ testResource.getAttribute( "encoding" ) + " is not a valid encoding." );
}
catch ( UnsupportedCharsetException uce )
{
throw new XmlPullParserException( testResource.getAttribute( "encoding" )
- + " is not a supported encoding." );
+ + " is not a supported encoding." );
}
}
@@ -319,14 +324,14 @@
* <code>encoding</code> attribute or the Java virtual machine's default if it is not defined. If the
* <code>resource</code> is a property file (ends in <code>.properties</code>) its encoding will be set to
* <code>iso-8859-1</code> even if some other encoding is specified in the attribute.
- *
+ *
* @param siteResource a <code><resource></code> element from the <code><siteResources></code>
* @param descriptor the <code>ArchetypeDescriptor</code> to add the site-resource template to.
* @throws XmlPullParserException if the encoding specified is not valid or supported or if the value of the
- * attribute <code>filtered</code> is no valid.
+ * attribute <code>filtered</code> is no valid.
*/
private static void addSiteResourceToDescriptor( Xpp3Dom siteResource, EquandaArchetypeDescriptor descriptor )
- throws XmlPullParserException
+ throws XmlPullParserException
{
descriptor.addSiteResource( siteResource.getValue() );
@@ -352,12 +357,13 @@
}
catch ( IllegalCharsetNameException icne )
{
- throw new XmlPullParserException( siteResource.getAttribute( "encoding" ) + " is not a valid encoding." );
+ throw new XmlPullParserException(
+ siteResource.getAttribute( "encoding" ) + " is not a valid encoding." );
}
catch ( UnsupportedCharsetException uce )
{
throw new XmlPullParserException( siteResource.getAttribute( "encoding" )
- + " is not a supported encoding." );
+ + " is not a supported encoding." );
}
}
@@ -381,9 +387,10 @@
}
}
- private static boolean getValueFilteredAttribute( String str ) throws IllegalArgumentException
+ private static boolean getValueFilteredAttribute( String str )
+ throws IllegalArgumentException
{
- boolean ret = false;
+ boolean ret;
if ( str.equals( "true" ) )
{
ret = true;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|