Skip to content

Commit 38f26a2

Browse files
o Updated to reformat all files to a common code style and to remove obsolete
Subversion/CVS keywords.
1 parent 6f94eab commit 38f26a2

File tree

95 files changed

+1770
-1361
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+1770
-1361
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
public abstract class AbstractArchiveFinalizer
44
implements ArchiveFinalizer
55
{
6-
6+
77
protected AbstractArchiveFinalizer()
88
{
99
}

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

+14-20
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
1-
package org.codehaus.plexus.archiver;
2-
31
/**
42
*
53
* Copyright 2004 The Apache Software Foundation
64
*
7-
* Licensed under the Apache License, Version 2.0 (the "License");
8-
* you may not use this file except in compliance with the License.
9-
* You may obtain a copy of the License at
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
108
*
11-
* http://www.apache.org/licenses/LICENSE-2.0
9+
* http://www.apache.org/licenses/LICENSE-2.0
1210
*
13-
* Unless required by applicable law or agreed to in writing, software
14-
* distributed under the License is distributed on an "AS IS" BASIS,
15-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16-
* See the License for the specific language governing permissions and
17-
* limitations under the License.
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
1816
*/
17+
package org.codehaus.plexus.archiver;
1918

2019
import java.io.Closeable;
2120
import java.io.File;
@@ -56,9 +55,6 @@
5655
import static org.codehaus.plexus.archiver.util.DefaultArchivedFileSet.archivedFileSet;
5756
import static org.codehaus.plexus.archiver.util.DefaultFileSet.fileSet;
5857

59-
/**
60-
* @version $Id$
61-
*/
6258
public abstract class AbstractArchiver
6359
extends AbstractLogEnabled
6460
implements Archiver, Contextualizable, FinalizerEnabled
@@ -114,6 +110,7 @@ public abstract class AbstractArchiver
114110

115111
private static class AddedResourceCollection
116112
{
113+
117114
private final PlexusIoResourceCollection resources;
118115

119116
private final int forcedFileMode;
@@ -435,7 +432,6 @@ private ArchiveEntry asArchiveEntry( final AddedResourceCollection collection, f
435432
collection.resources );
436433
}
437434

438-
439435
@Override
440436
public void addResource( final PlexusIoResource resource, final String destFileName, final int permissions )
441437
throws ArchiverException
@@ -465,8 +461,7 @@ public void addFile( @Nonnull final File inputFile, @Nonnull String destFileName
465461
try
466462
{
467463
// do a null check here, to avoid creating a file stream if there are no filters...
468-
doAddResource(
469-
ArchiveEntry.createFileEntry( destFileName, inputFile, permissions, getDirectoryMode() ) );
464+
doAddResource( ArchiveEntry.createFileEntry( destFileName, inputFile, permissions, getDirectoryMode() ) );
470465
}
471466
catch ( final IOException e )
472467
{
@@ -481,6 +476,7 @@ public ResourceIterator getResources()
481476
{
482477
return new ResourceIterator()
483478
{
479+
484480
private final Iterator addedResourceIter = resources.iterator();
485481

486482
private AddedResourceCollection currentResourceCollection;
@@ -555,7 +551,7 @@ else if ( o instanceof AddedResourceCollection )
555551
final String path = nextEntry.getName();
556552

557553
if ( Archiver.DUPLICATES_PRESERVE.equals( duplicateBehavior )
558-
|| Archiver.DUPLICATES_SKIP.equals( duplicateBehavior ) )
554+
|| Archiver.DUPLICATES_SKIP.equals( duplicateBehavior ) )
559555
{
560556
if ( nextEntry.getType() == ArchiveEntry.FILE )
561557
{
@@ -645,7 +641,6 @@ private static void closeQuietlyIfCloseable( Object resource )
645641
}
646642
}
647643

648-
649644
@Override
650645
public Map<String, ArchiveEntry> getFiles()
651646
{
@@ -1087,7 +1082,6 @@ protected void cleanUp()
10871082
resources.clear();
10881083
}
10891084

1090-
10911085
protected abstract void execute()
10921086
throws ArchiverException, IOException;
10931087

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

+22-19
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
1-
package org.codehaus.plexus.archiver;
2-
31
/**
42
*
53
* Copyright 2004 The Apache Software Foundation
64
*
7-
* Licensed under the Apache License, Version 2.0 (the "License");
8-
* you may not use this file except in compliance with the License.
9-
* You may obtain a copy of the License at
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
108
*
11-
* http://www.apache.org/licenses/LICENSE-2.0
9+
* http://www.apache.org/licenses/LICENSE-2.0
1210
*
13-
* Unless required by applicable law or agreed to in writing, software
14-
* distributed under the License is distributed on an "AS IS" BASIS,
15-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16-
* See the License for the specific language governing permissions and
17-
* limitations under the License.
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
1816
*/
17+
package org.codehaus.plexus.archiver;
1918

2019
import java.io.File;
2120
import java.io.FileNotFoundException;
@@ -37,13 +36,13 @@
3736

3837
/**
3938
* @author <a href="mailto:[email protected]">Emmanuel Venisse</a>
40-
* @version $Revision$ $Date$
4139
* @todo there should really be constructors which take the source file.
4240
*/
4341
public abstract class AbstractUnArchiver
4442
extends AbstractLogEnabled
4543
implements UnArchiver, FinalizerEnabled
4644
{
45+
4746
private File destDirectory;
4847

4948
private File destFile;
@@ -58,6 +57,7 @@ public abstract class AbstractUnArchiver
5857

5958
/**
6059
* since 2.3 is on by default
60+
*
6161
* @since 1.1
6262
*/
6363
private boolean useJvmChmod = true;
@@ -165,11 +165,12 @@ private void runArchiveFinalizers()
165165
{
166166
if ( finalizers != null )
167167
{
168-
for (Object finalizer1 : finalizers) {
169-
final ArchiveFinalizer finalizer = (ArchiveFinalizer) finalizer1;
168+
for ( Object finalizer1 : finalizers )
169+
{
170+
final ArchiveFinalizer finalizer = (ArchiveFinalizer) finalizer1;
170171

171-
finalizer.finalizeArchiveExtraction(this);
172-
}
172+
finalizer.finalizeArchiveExtraction( this );
173+
}
173174
}
174175
}
175176

@@ -272,6 +273,7 @@ public boolean isUseJvmChmod()
272273

273274
/**
274275
* <b>jvm chmod won't set group level permissions !</b>
276+
*
275277
* @since 1.1
276278
*/
277279
@Override
@@ -320,8 +322,9 @@ protected void extractFile( final File srcF, final File dir, final InputStream c
320322
dirF.mkdirs();
321323
}
322324

323-
if ( !StringUtils.isEmpty( symlinkDestination )){
324-
SymlinkUtils.createSymbolicLink( f, new File( symlinkDestination) );
325+
if ( !StringUtils.isEmpty( symlinkDestination ) )
326+
{
327+
SymlinkUtils.createSymbolicLink( f, new File( symlinkDestination ) );
325328
}
326329
else if ( isDirectory )
327330
{
@@ -346,7 +349,7 @@ else if ( isDirectory )
346349

347350
f.setLastModified( entryDate.getTime() );
348351

349-
if ( !isIgnorePermissions() && mode != null && !isDirectory)
352+
if ( !isIgnorePermissions() && mode != null && !isDirectory )
350353
{
351354
ArchiveEntryUtils.chmod( f, mode, getLogger(), isUseJvmChmod() );
352355
}

0 commit comments

Comments
 (0)