Skip to content

Commit

Permalink
Reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
gnodet committed Aug 25, 2023
1 parent cb5bf77 commit 609a874
Show file tree
Hide file tree
Showing 30 changed files with 506 additions and 542 deletions.
186 changes: 91 additions & 95 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,53 +31,61 @@
<name>Jansi</name>
<description>Jansi is a java library for generating and interpreting ANSI escape sequences.</description>

<properties>
<javadocSource>7</javadocSource>
<jdkTarget>1.7</jdkTarget>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<slf4j-version>1.6.1</slf4j-version>
<project.build.outputTimestamp>2021-10-14T05:42:06Z</project.build.outputTimestamp>
</properties>

<url>http://fusesource.github.io/jansi</url>
<inceptionYear>2009</inceptionYear>

<issueManagement>
<system>jira</system>
<url>https://github.com/fusesource/jansi/issues</url>
</issueManagement>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>

<developers>
<developer>
<id>chirino</id>
<name>Hiram Chirino</name>
<email>hiram@hiramchirino.com</email>
<url>http://hiramchirino.com</url>
<timezone>GMT-5</timezone>
</developer>
<developer>
<id>gnodet</id>
<name>Guillaume Nodet</name>
<email>gnodet@gmail.com</email>
<timezone>GMT+1</timezone>
</developer>
</developers>

<mailingLists>
<mailingList>
<name>Discussion List</name>
<archive>http://groups.google.com/group/jansi</archive>
<post>jansi-dev@googlegroups.com</post>
<subscribe>jansi-dev+subscribe@googlegroups.com</subscribe>
<unsubscribe>jansi-dev+unsubscribe@googlegroups.com</unsubscribe>
<post>jansi-dev@googlegroups.com</post>
<archive>http://groups.google.com/group/jansi</archive>
</mailingList>
<mailingList>
<name>Commits and Issue Tracker List</name>
<archive>http://groups.google.com/group/jansi-commits</archive>
<post>jansi-commits@googlegroups.com</post>
<subscribe>jansi-commits+subscribe@googlegroups.com</subscribe>
<unsubscribe>jansi-commisots+unsubscribe@googlegroups.com</unsubscribe>
<post>jansi-commits@googlegroups.com</post>
<archive>http://groups.google.com/group/jansi-commits</archive>
</mailingList>
</mailingLists>

<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>

<scm>
<url>https://github.com/fusesource/jansi</url>
<connection>scm:git:git://github.com/fusesource/jansi.git</connection>
<developerConnection>scm:git:ssh://git@github.com/fusesource/jansi.git</developerConnection>
<tag>HEAD</tag>
</scm>
<tag>HEAD</tag>
<url>https://github.com/fusesource/jansi</url>
</scm>

<issueManagement>
<system>jira</system>
<url>https://github.com/fusesource/jansi/issues</url>
</issueManagement>

<distributionManagement>
<repository>
Expand All @@ -92,53 +100,59 @@
</snapshotRepository>
</distributionManagement>

<properties>
<javadocSource>7</javadocSource>
<jdkTarget>1.7</jdkTarget>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<slf4j-version>1.6.1</slf4j-version>
<project.build.outputTimestamp>2021-10-14T05:42:06Z</project.build.outputTimestamp>
</properties>

<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.7.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>5.7.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>info.picocli</groupId>
<artifactId>picocli-codegen</artifactId>
<version>4.5.2</version>
<scope>test</scope>
</dependency>
</dependencies>

<repositories>
<repository>
<id>sonatype-nexus-snapshots</id>
<name>Sonatype Snapshot Repository</name>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<id>sonatype-nexus-snapshots</id>
<name>Sonatype Snapshot Repository</name>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</repository>
</repositories>

<developers>
<developer>
<id>chirino</id>
<name>Hiram Chirino</name>
<email>hiram@hiramchirino.com</email>
<url>http://hiramchirino.com</url>
<timezone>GMT-5</timezone>
</developer>
<developer>
<id>gnodet</id>
<name>Guillaume Nodet</name>
<email>gnodet@gmail.com</email>
<timezone>GMT+1</timezone>
</developer>
</developers>

<build>
<extensions>
<extension>
<groupId>org.fusesource.mvnplugins</groupId>
<artifactId>fuse-jxr-skin</artifactId>
<version>1.9</version>
</extension>
</extensions>

<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<directory>src/main/resources</directory>
<includes>
<include>**/*.properties</include>
</includes>
</resource>
<resource>
<directory>src/main/resources</directory>
<filtering>false</filtering>
<directory>src/main/resources</directory>
<excludes>
<exclude>**/*.properties</exclude>
</excludes>
Expand Down Expand Up @@ -178,18 +192,16 @@
<executions>
<execution>
<id>bundle-manifest</id>
<phase>process-classes</phase>
<goals>
<goal>manifest</goal>
</goals>
<phase>process-classes</phase>
<configuration>
<instructions>
<Main-Class>org.fusesource.jansi.AnsiMain</Main-Class>
<Export-Package>
!org.fusesource.jansi.internal.native.*;
<Export-Package>!org.fusesource.jansi.internal.native.*;
org.fusesource.jansi.*;
-noimport:=true
</Export-Package>
-noimport:=true</Export-Package>
<_removeheaders>Bnd-LastModified,Include-Resource,Private-Package,Originally-Created-By</_removeheaders>
<_reproducible>true</_reproducible>
</instructions>
Expand All @@ -204,19 +216,17 @@
<executions>
<execution>
<id>add-module-infos</id>
<phase>package</phase>
<goals>
<goal>add-module-info</goal>
</goals>
<phase>package</phase>
<configuration>
<jvmVersion>9</jvmVersion>
<module>
<moduleInfo>
<name>org.fusesource.jansi</name>
<exports>
org.fusesource.jansi;
org.fusesource.jansi.io;
</exports>
<exports>org.fusesource.jansi;
org.fusesource.jansi.io;</exports>
</moduleInfo>
</module>
</configuration>
Expand All @@ -228,13 +238,20 @@
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.0.0</version>
<dependencies>
<dependency>
<groupId>info.picocli</groupId>
<artifactId>picocli-codegen</artifactId>
<version>4.5.2</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>generate-graalvm-info</id>
<phase>process-classes</phase>
<goals>
<goal>java</goal>
</goals>
<phase>process-classes</phase>
<configuration>
<includeProjectDependencies>true</includeProjectDependencies>
<classpathScope>test</classpathScope>
Expand All @@ -251,13 +268,6 @@
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>info.picocli</groupId>
<artifactId>picocli-codegen</artifactId>
<version>4.5.2</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -338,10 +348,10 @@
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
<phase>verify</phase>
</execution>
</executions>
</plugin>
Expand Down Expand Up @@ -408,27 +418,13 @@
</executions>
</plugin>
</plugins>
<extensions>
<extension>
<groupId>org.fusesource.mvnplugins</groupId>
<artifactId>fuse-jxr-skin</artifactId>
<version>1.9</version>
</extension>
</extensions>
</build>

<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.7.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>5.7.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>info.picocli</groupId>
<artifactId>picocli-codegen</artifactId>
<version>4.5.2</version>
<scope>test</scope>
</dependency>
</dependencies>

</project>
9 changes: 3 additions & 6 deletions src/main/java/org/fusesource/jansi/Ansi.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2009-2017 the original author(s).
* Copyright (C) 2009-2023 the original author(s).
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -119,7 +119,6 @@ public String toString() {
public int value() {
return value;
}

}

/**
Expand Down Expand Up @@ -215,8 +214,7 @@ public static Ansi ansi(int size) {
}
}

private static class NoAnsi
extends Ansi {
private static class NoAnsi extends Ansi {
public NoAnsi() {
super();
}
Expand Down Expand Up @@ -900,8 +898,7 @@ private Ansi appendEscapeSequence(char command, Object... options) {
}

private void flushAttributes() {
if (attributeOptions.isEmpty())
return;
if (attributeOptions.isEmpty()) return;
if (attributeOptions.size() == 1 && attributeOptions.get(0) == 0) {
builder.append(FIRST_ESC_CHAR);
builder.append(SECOND_ESC_CHAR);
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/org/fusesource/jansi/AnsiColors.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2009-2017 the original author(s).
* Copyright (C) 2009-2023 the original author(s).
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -21,7 +21,6 @@
* @since 2.1
*/
public enum AnsiColors {

Colors16("16 colors"),
Colors256("256 colors"),
TrueColor("24-bit colors");
Expand Down
Loading

0 comments on commit 609a874

Please sign in to comment.