Skip to content

Commit ca1d9a4

Browse files
committed
code formatting
1 parent 4ae98dd commit ca1d9a4

40 files changed

+198
-297
lines changed

src/main/java/org/codehaus/plexus/archiver/ArchiveEntry.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,16 @@ public File getFile()
9191
{
9292
if ( resource instanceof PlexusIoFileResource )
9393
{
94-
return ((PlexusIoFileResource) resource).getFile();
94+
return ( (PlexusIoFileResource) resource ).getFile();
9595
}
9696
return null;
9797
}
9898

9999
/**
100100
* @return The resource contents.
101101
*/
102-
public InputStream getInputStream() throws IOException
102+
public InputStream getInputStream()
103+
throws IOException
103104
{
104105
return resource.getContents();
105106
}
@@ -129,8 +130,8 @@ public int getMode()
129130
return attributes.getOctalMode();
130131
}
131132

132-
return ( ( type == FILE ? Archiver.DEFAULT_FILE_MODE : Archiver.DEFAULT_DIR_MODE ) & UnixStat.PERM_MASK ) |
133-
( type == FILE ? UnixStat.FILE_FLAG : UnixStat.DIR_FLAG );
133+
return ( ( type == FILE ? Archiver.DEFAULT_FILE_MODE : Archiver.DEFAULT_DIR_MODE ) & UnixStat.PERM_MASK )
134+
| ( type == FILE ? UnixStat.FILE_FLAG : UnixStat.DIR_FLAG );
134135
}
135136

136137
public static ArchiveEntry createFileEntry( String target, PlexusIoResource resource, int permissions )
@@ -146,7 +147,7 @@ public static ArchiveEntry createFileEntry( String target, PlexusIoResource reso
146147
public static ArchiveEntry createFileEntry( String target, File file, int permissions )
147148
throws ArchiverException
148149
{
149-
if ( ! file.isFile() )
150+
if ( !file.isFile() )
150151
{
151152
throw new ArchiverException( "Not a file: " + file );
152153
}
@@ -168,7 +169,7 @@ public static ArchiveEntry createFileEntry( String target, File file, int permis
168169
public static ArchiveEntry createDirectoryEntry( String target, PlexusIoResource resource, int permissions )
169170
throws ArchiverException
170171
{
171-
if ( ! resource.isDirectory() )
172+
if ( !resource.isDirectory() )
172173
{
173174
throw new ArchiverException( "Not a directory: " + resource.getName() );
174175
}
@@ -178,7 +179,7 @@ public static ArchiveEntry createDirectoryEntry( String target, PlexusIoResource
178179
public static ArchiveEntry createDirectoryEntry( String target, final File file, int permissions )
179180
throws ArchiverException
180181
{
181-
if ( ! file.isDirectory() )
182+
if ( !file.isDirectory() )
182183
{
183184
throw new ArchiverException( "Not a directory: " + file );
184185
}

src/main/java/org/codehaus/plexus/archiver/ArchiveFile.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,12 @@ public interface Entry
4444
* Any element returned by the enumeration is an instance
4545
* of {@link Entry}.
4646
*/
47-
public Enumeration getEntries() throws IOException;
47+
public Enumeration getEntries()
48+
throws IOException;
4849

4950
/**
5051
* Returns an {@link InputStream} with the given entries contents.
5152
*/
52-
InputStream getInputStream( Entry entry ) throws IOException;
53+
InputStream getInputStream( Entry entry )
54+
throws IOException;
5355
}

src/main/java/org/codehaus/plexus/archiver/ArchivedFileSet.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
* an archive.
99
* @since 1.0-alpha-9
1010
*/
11-
public interface ArchivedFileSet extends BaseFileSet
11+
public interface ArchivedFileSet
12+
extends BaseFileSet
1213
{
1314
/**
1415
* Returns the archive file.

src/main/java/org/codehaus/plexus/archiver/DotDirectiveArchiveFinalizer.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ public DotDirectiveArchiveFinalizer( File dotFileDirectory )
3333
this( dotFileDirectory, DEFAULT_DOT_FILE_PREFIX );
3434
}
3535

36-
public DotDirectiveArchiveFinalizer( File dotFileDirectory,
37-
String dotFilePrefix )
36+
public DotDirectiveArchiveFinalizer( File dotFileDirectory, String dotFilePrefix )
3837
{
3938
this.dotFileDirectory = dotFileDirectory;
4039

@@ -98,6 +97,5 @@ public void finalizeArchiveCreation( Archiver archiver )
9897
public List getVirtualFiles()
9998
{
10099
return Collections.EMPTY_LIST;
101-
102100
}
103101
}

src/main/java/org/codehaus/plexus/archiver/FileSet.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
* a common base directory.
99
* @since 1.0-alpha-9
1010
*/
11-
public interface FileSet extends BaseFileSet
11+
public interface FileSet
12+
extends BaseFileSet
1213
{
1314
/**
1415
* Returns the file sets base directory.
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
/**
2-
*
3-
*/
41
package org.codehaus.plexus.archiver;
52

63
public interface ResourceIterator
74
{
8-
boolean hasNext() throws ArchiverException;
5+
boolean hasNext()
6+
throws ArchiverException;
97

10-
ArchiveEntry next() throws ArchiverException;
8+
ArchiveEntry next()
9+
throws ArchiverException;
1110
}

src/main/java/org/codehaus/plexus/archiver/UnArchiverException.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@
66
public class UnArchiverException
77
extends Exception
88
{
9-
public UnArchiverException( String string )
9+
public UnArchiverException( String string )
1010
{
1111
super( string );
1212
}
1313

14-
public UnArchiverException( String string,
15-
Throwable throwable )
14+
public UnArchiverException( String string, Throwable throwable )
1615
{
1716
super( string, throwable );
1817
}

src/main/java/org/codehaus/plexus/archiver/bzip2/BZip2Archiver.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public class BZip2Archiver
3535
public void execute()
3636
throws ArchiverException, IOException
3737
{
38-
if ( ! checkForced() )
38+
if ( !checkForced() )
3939
{
4040
return;
4141
}

src/main/java/org/codehaus/plexus/archiver/ear/EarArchiver.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,7 @@ public void setAppxml( File descr )
5555
deploymentDescriptor = descr;
5656
if ( !deploymentDescriptor.exists() )
5757
{
58-
throw new ArchiverException( "Deployment descriptor: "
59-
+ deploymentDescriptor
60-
+ " does not exist." );
58+
throw new ArchiverException( "Deployment descriptor: " + deploymentDescriptor + " does not exist." );
6159
}
6260

6361
addFile( descr, "META-INF/application.xml" );
@@ -111,9 +109,8 @@ protected void zipFile( ArchiveEntry entry, ZipOutputStream zOut, String vPath,
111109
|| descriptorAdded )
112110
{
113111
getLogger().warn( "Warning: selected " + archiveType
114-
+ " files include a META-INF/application.xml which will"
115-
+ " be ignored (please use appxml attribute to "
116-
+ archiveType + " task)" );
112+
+ " files include a META-INF/application.xml which will be ignored "
113+
+ "(please use appxml attribute to " + archiveType + " task)" );
117114
}
118115
else
119116
{

src/main/java/org/codehaus/plexus/archiver/filters/JarSecurityFileFilter.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,21 @@
1313
public class JarSecurityFileFilter
1414
implements ArchiveFileFilter
1515
{
16-
1716
public static final String[] SECURITY_FILE_PATTERNS = JarSecurityFileSelector.SECURITY_FILE_PATTERNS;
18-
17+
1918
public boolean include( InputStream dataStream, String entryName )
2019
throws ArchiveFilterException
2120
{
2221
for ( int i = 0; i < SECURITY_FILE_PATTERNS.length; i++ )
2322
{
2423
String pattern = SECURITY_FILE_PATTERNS[i];
25-
24+
2625
if ( SelectorUtils.match( pattern, entryName ) )
2726
{
2827
return false;
2928
}
3029
}
31-
30+
3231
return true;
3332
}
3433
}

src/main/java/org/codehaus/plexus/archiver/gzip/GZipArchiver.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public class GZipArchiver
3535
protected void execute()
3636
throws ArchiverException, IOException
3737
{
38-
if ( ! checkForced() )
38+
if ( !checkForced() )
3939
{
4040
return;
4141
}
@@ -51,7 +51,8 @@ protected void execute()
5151
compressor.compress();
5252
}
5353

54-
public boolean isSupportingForced() {
54+
public boolean isSupportingForced()
55+
{
5556
return true;
5657
}
5758

0 commit comments

Comments
 (0)