Skip to content

Commit

Permalink
[WAGON-634] Apply formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
slachiewicz committed Oct 21, 2023
1 parent 8d3395e commit d73ad81
Show file tree
Hide file tree
Showing 188 changed files with 9,683 additions and 14,160 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
package org.apache.maven.wagon;

/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
Expand All @@ -18,31 +16,27 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.maven.wagon;

/**
* Exception which should be thrown when a command fails to execute on the repository.
*
* @author <a href="brett@apache.org">Brett Porter</a>
*
*/
public class CommandExecutionException
extends WagonException
{
public class CommandExecutionException extends WagonException {

/**
* @see org.apache.maven.wagon.WagonException
*/
public CommandExecutionException( String message )
{
super( message );
public CommandExecutionException(String message) {
super(message);
}

/**
* @see org.apache.maven.wagon.WagonException
*/
public CommandExecutionException( String message, Throwable cause )
{
super( message, cause );
public CommandExecutionException(String message, Throwable cause) {
super(message, cause);
}

}
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
package org.apache.maven.wagon;

/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
Expand All @@ -18,19 +16,16 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.maven.wagon;

/**
* @author <a href="mailto:brett@apache.org">Brett Porter</a>
*
*/
public interface CommandExecutor
extends Wagon
{
public interface CommandExecutor extends Wagon {
String ROLE = CommandExecutor.class.getName();

void executeCommand( String command )
throws CommandExecutionException;
void executeCommand(String command) throws CommandExecutionException;

Streams executeCommand( String command, boolean ignoreFailures )
throws CommandExecutionException;
Streams executeCommand(String command, boolean ignoreFailures) throws CommandExecutionException;
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
package org.apache.maven.wagon;

/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
Expand All @@ -18,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.maven.wagon;

/**
* The exception is thrown when a connection
Expand All @@ -26,25 +25,19 @@
* @author <a href="michal.maczka@dimatics.com">Michal Maczka</a>
*
*/
public class ConnectionException
extends WagonException
{

public class ConnectionException extends WagonException {

/**
* @see org.apache.maven.wagon.WagonException
*/
public ConnectionException( final String message )
{
super( message );
public ConnectionException(final String message) {
super(message);
}

/**
* @see org.apache.maven.wagon.WagonException
*/
public ConnectionException( final String message, final Throwable cause )
{
super( message, cause );
public ConnectionException(final String message, final Throwable cause) {
super(message, cause);
}

}
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
package org.apache.maven.wagon;

/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
Expand All @@ -18,39 +16,34 @@
* specific language governing permissions and limitations
* under the License.
*/

import org.apache.maven.wagon.resource.Resource;
package org.apache.maven.wagon;

import java.io.InputStream;

import org.apache.maven.wagon.resource.Resource;

/**
* @author <a href="mailto:michal@codehaus.org">Michal Maczka</a>
*
*/
public class InputData
{
public class InputData {
private InputStream inputStream;

private Resource resource;

public InputStream getInputStream()
{
public InputStream getInputStream() {
return inputStream;
}

public void setInputStream( InputStream inputStream )
{
public void setInputStream(InputStream inputStream) {
this.inputStream = inputStream;
}

public Resource getResource()
{
public Resource getResource() {
return resource;
}

public void setResource( Resource resource )
{
public void setResource(Resource resource) {
this.resource = resource;
}

}
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
package org.apache.maven.wagon;

/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
Expand All @@ -18,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.maven.wagon;

import java.io.File;
import java.io.FileDescriptor;
Expand All @@ -27,130 +26,94 @@
import java.io.OutputStream;
import java.nio.channels.FileChannel;


/**
* Variant of FileOutputStream which creates the file only when first portion
* of data is written.
*
* @author <a href="mailto:mmaczka@interia.pl">Michal Maczka</a>
*
*/
public class LazyFileOutputStream
extends OutputStream
{
public class LazyFileOutputStream extends OutputStream {

private File file;

private FileOutputStream delegee;


public LazyFileOutputStream( String filename )
{
this.file = new File( filename );
public LazyFileOutputStream(String filename) {
this.file = new File(filename);
}

public LazyFileOutputStream( File file )
{
public LazyFileOutputStream(File file) {
this.file = file;
}


public void close()
throws IOException
{
if ( delegee != null )
{
public void close() throws IOException {
if (delegee != null) {
delegee.close();
}
}


public boolean equals( Object obj )
{
return delegee.equals( obj );
public boolean equals(Object obj) {
return delegee.equals(obj);
}


public void flush()
throws IOException
{
if ( delegee != null )
{
public void flush() throws IOException {
if (delegee != null) {
delegee.flush();
}
}


public FileChannel getChannel()
{
public FileChannel getChannel() {
return delegee.getChannel();
}


public FileDescriptor getFD()
throws IOException
{
public FileDescriptor getFD() throws IOException {
return delegee.getFD();
}

public int hashCode()
{
public int hashCode() {
return delegee.hashCode();
}


public String toString()
{
public String toString() {
return delegee.toString();
}

public void write( byte[] b )
throws IOException
{
if ( delegee == null )
{
public void write(byte[] b) throws IOException {
if (delegee == null) {
initialize();
}

delegee.write( b );
delegee.write(b);
}

/**
* @see java.io.OutputStream#write(byte[], int, int)
*/
public void write( byte[] b, int off, int len )
throws IOException
{
if ( delegee == null )
{
public void write(byte[] b, int off, int len) throws IOException {
if (delegee == null) {
initialize();
}

delegee.write( b, off, len );
delegee.write(b, off, len);
}

/**
* @param b
* @throws java.io.IOException
*/
public void write( int b )
throws IOException
{
if ( delegee == null )
{
public void write(int b) throws IOException {
if (delegee == null) {
initialize();
}

delegee.write( b );
delegee.write(b);
}


/**
*
*
*/
private void initialize()
throws FileNotFoundException
{
delegee = new FileOutputStream( file );
private void initialize() throws FileNotFoundException {
delegee = new FileOutputStream(file);
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
package org.apache.maven.wagon;

/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
Expand All @@ -18,38 +16,34 @@
* specific language governing permissions and limitations
* under the License.
*/

import org.apache.maven.wagon.resource.Resource;
package org.apache.maven.wagon;

import java.io.OutputStream;

import org.apache.maven.wagon.resource.Resource;

/**
* @author <a href="mailto:michal@codehaus.org">Michal Maczka</a>
*
*/
public class OutputData
{
public class OutputData {
private OutputStream outputStream;

private Resource resource;

public OutputStream getOutputStream()
{
public OutputStream getOutputStream() {
return outputStream;
}

public void setOutputStream( OutputStream outputStream )
{
public void setOutputStream(OutputStream outputStream) {
this.outputStream = outputStream;
}

public Resource getResource()
{
public Resource getResource() {
return resource;
}

public void setResource( Resource resource )
{
public void setResource(Resource resource) {
this.resource = resource;
}
}
Loading

0 comments on commit d73ad81

Please sign in to comment.