Skip to content

Update parent pom to plexus 16 #48

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions plexus-interactivity-api/pom.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<artifactId>plexus-interactivity</artifactId>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-interactivity</artifactId>
<version>1.2-SNAPSHOT</version>
</parent>

Expand All @@ -15,11 +16,11 @@
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>4.0.0</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.10.1</version>
<scope>test</scope>
</dependency>
<!--
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,27 +24,22 @@
* SOFTWARE.
*/

import java.util.List;
import java.util.ArrayList;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

/**
* Base input handler, implements a default <code>readMultipleLines</code>.
*
* @author Brett Porter
* @version $Id$
*/
public abstract class AbstractInputHandler
implements InputHandler
{
public List<String> readMultipleLines()
throws IOException
{
public abstract class AbstractInputHandler implements InputHandler {
public List<String> readMultipleLines() throws IOException {
List<String> lines = new ArrayList<>();
String line = readLine();
while ( line != null && line.length() > 0 )
{
lines.add( line );
while (line != null && line.length() > 0) {
lines.add(line);
line = readLine();
}
return lines;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
*/

import javax.annotation.PostConstruct;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
Expand All @@ -35,26 +36,19 @@
* @author Brett Porter
* @version $Id$
*/
public class DefaultInputHandler
extends AbstractInputHandler
{
public class DefaultInputHandler extends AbstractInputHandler {
private BufferedReader consoleReader;

public String readLine()
throws IOException
{
public String readLine() throws IOException {
return consoleReader.readLine();
}

public String readPassword()
throws IOException
{
public String readPassword() throws IOException {
return consoleReader.readLine();
}

@PostConstruct
public void initialize()
{
consoleReader = new BufferedReader( new InputStreamReader( System.in ) );
public void initialize() {
consoleReader = new BufferedReader(new InputStreamReader(System.in));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
*/

import javax.annotation.PostConstruct;

import java.io.IOException;
import java.io.PrintWriter;

Expand All @@ -34,27 +35,20 @@
* @author Brett Porter
* @version $Id$
*/
public class DefaultOutputHandler
implements OutputHandler
{
public class DefaultOutputHandler implements OutputHandler {
private PrintWriter consoleWriter;

@PostConstruct
public void initialize()
{
consoleWriter = new PrintWriter( System.out );
public void initialize() {
consoleWriter = new PrintWriter(System.out);
}

public void write( String line )
throws IOException
{
consoleWriter.print( line );
public void write(String line) throws IOException {
consoleWriter.print(line);
consoleWriter.flush();
}

public void writeLine( String line )
throws IOException
{
public void writeLine(String line) throws IOException {
consoleWriter.println();
}
}
Loading