Skip to content

Commit 609a874

Browse files
committed
Reformat
1 parent cb5bf77 commit 609a874

30 files changed

+506
-542
lines changed

pom.xml

Lines changed: 91 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -31,53 +31,61 @@
3131
<name>Jansi</name>
3232
<description>Jansi is a java library for generating and interpreting ANSI escape sequences.</description>
3333

34-
<properties>
35-
<javadocSource>7</javadocSource>
36-
<jdkTarget>1.7</jdkTarget>
37-
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
38-
<slf4j-version>1.6.1</slf4j-version>
39-
<project.build.outputTimestamp>2021-10-14T05:42:06Z</project.build.outputTimestamp>
40-
</properties>
41-
4234
<url>http://fusesource.github.io/jansi</url>
4335
<inceptionYear>2009</inceptionYear>
4436

45-
<issueManagement>
46-
<system>jira</system>
47-
<url>https://github.com/fusesource/jansi/issues</url>
48-
</issueManagement>
37+
<licenses>
38+
<license>
39+
<name>Apache License, Version 2.0</name>
40+
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
41+
<distribution>repo</distribution>
42+
</license>
43+
</licenses>
44+
45+
<developers>
46+
<developer>
47+
<id>chirino</id>
48+
<name>Hiram Chirino</name>
49+
<email>[email protected]</email>
50+
<url>http://hiramchirino.com</url>
51+
<timezone>GMT-5</timezone>
52+
</developer>
53+
<developer>
54+
<id>gnodet</id>
55+
<name>Guillaume Nodet</name>
56+
<email>[email protected]</email>
57+
<timezone>GMT+1</timezone>
58+
</developer>
59+
</developers>
4960

5061
<mailingLists>
5162
<mailingList>
5263
<name>Discussion List</name>
53-
<archive>http://groups.google.com/group/jansi</archive>
54-
<post>[email protected]</post>
5564
<subscribe>[email protected]</subscribe>
5665
<unsubscribe>[email protected]</unsubscribe>
66+
<post>[email protected]</post>
67+
<archive>http://groups.google.com/group/jansi</archive>
5768
</mailingList>
5869
<mailingList>
5970
<name>Commits and Issue Tracker List</name>
60-
<archive>http://groups.google.com/group/jansi-commits</archive>
61-
<post>[email protected]</post>
6271
<subscribe>[email protected]</subscribe>
6372
<unsubscribe>[email protected]</unsubscribe>
73+
<post>[email protected]</post>
74+
<archive>http://groups.google.com/group/jansi-commits</archive>
6475
</mailingList>
6576
</mailingLists>
6677

67-
<licenses>
68-
<license>
69-
<name>Apache License, Version 2.0</name>
70-
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
71-
<distribution>repo</distribution>
72-
</license>
73-
</licenses>
74-
7578
<scm>
76-
<url>https://github.com/fusesource/jansi</url>
7779
<connection>scm:git:git://github.com/fusesource/jansi.git</connection>
7880
<developerConnection>scm:git:ssh://[email protected]/fusesource/jansi.git</developerConnection>
79-
<tag>HEAD</tag>
80-
</scm>
81+
<tag>HEAD</tag>
82+
<url>https://github.com/fusesource/jansi</url>
83+
</scm>
84+
85+
<issueManagement>
86+
<system>jira</system>
87+
<url>https://github.com/fusesource/jansi/issues</url>
88+
</issueManagement>
8189

8290
<distributionManagement>
8391
<repository>
@@ -92,53 +100,59 @@
92100
</snapshotRepository>
93101
</distributionManagement>
94102

103+
<properties>
104+
<javadocSource>7</javadocSource>
105+
<jdkTarget>1.7</jdkTarget>
106+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
107+
<slf4j-version>1.6.1</slf4j-version>
108+
<project.build.outputTimestamp>2021-10-14T05:42:06Z</project.build.outputTimestamp>
109+
</properties>
110+
111+
<dependencies>
112+
<dependency>
113+
<groupId>org.junit.jupiter</groupId>
114+
<artifactId>junit-jupiter</artifactId>
115+
<version>5.7.0</version>
116+
<scope>test</scope>
117+
</dependency>
118+
<dependency>
119+
<groupId>org.junit.jupiter</groupId>
120+
<artifactId>junit-jupiter-params</artifactId>
121+
<version>5.7.0</version>
122+
<scope>test</scope>
123+
</dependency>
124+
<dependency>
125+
<groupId>info.picocli</groupId>
126+
<artifactId>picocli-codegen</artifactId>
127+
<version>4.5.2</version>
128+
<scope>test</scope>
129+
</dependency>
130+
</dependencies>
131+
95132
<repositories>
96133
<repository>
97-
<id>sonatype-nexus-snapshots</id>
98-
<name>Sonatype Snapshot Repository</name>
99-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
100134
<snapshots>
101135
<enabled>true</enabled>
102136
</snapshots>
137+
<id>sonatype-nexus-snapshots</id>
138+
<name>Sonatype Snapshot Repository</name>
139+
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
103140
</repository>
104141
</repositories>
105142

106-
<developers>
107-
<developer>
108-
<id>chirino</id>
109-
<name>Hiram Chirino</name>
110-
<email>[email protected]</email>
111-
<url>http://hiramchirino.com</url>
112-
<timezone>GMT-5</timezone>
113-
</developer>
114-
<developer>
115-
<id>gnodet</id>
116-
<name>Guillaume Nodet</name>
117-
<email>[email protected]</email>
118-
<timezone>GMT+1</timezone>
119-
</developer>
120-
</developers>
121-
122143
<build>
123-
<extensions>
124-
<extension>
125-
<groupId>org.fusesource.mvnplugins</groupId>
126-
<artifactId>fuse-jxr-skin</artifactId>
127-
<version>1.9</version>
128-
</extension>
129-
</extensions>
130144

131145
<resources>
132146
<resource>
133-
<directory>src/main/resources</directory>
134147
<filtering>true</filtering>
148+
<directory>src/main/resources</directory>
135149
<includes>
136150
<include>**/*.properties</include>
137151
</includes>
138152
</resource>
139153
<resource>
140-
<directory>src/main/resources</directory>
141154
<filtering>false</filtering>
155+
<directory>src/main/resources</directory>
142156
<excludes>
143157
<exclude>**/*.properties</exclude>
144158
</excludes>
@@ -178,18 +192,16 @@
178192
<executions>
179193
<execution>
180194
<id>bundle-manifest</id>
181-
<phase>process-classes</phase>
182195
<goals>
183196
<goal>manifest</goal>
184197
</goals>
198+
<phase>process-classes</phase>
185199
<configuration>
186200
<instructions>
187201
<Main-Class>org.fusesource.jansi.AnsiMain</Main-Class>
188-
<Export-Package>
189-
!org.fusesource.jansi.internal.native.*;
202+
<Export-Package>!org.fusesource.jansi.internal.native.*;
190203
org.fusesource.jansi.*;
191-
-noimport:=true
192-
</Export-Package>
204+
-noimport:=true</Export-Package>
193205
<_removeheaders>Bnd-LastModified,Include-Resource,Private-Package,Originally-Created-By</_removeheaders>
194206
<_reproducible>true</_reproducible>
195207
</instructions>
@@ -204,19 +216,17 @@
204216
<executions>
205217
<execution>
206218
<id>add-module-infos</id>
207-
<phase>package</phase>
208219
<goals>
209220
<goal>add-module-info</goal>
210221
</goals>
222+
<phase>package</phase>
211223
<configuration>
212224
<jvmVersion>9</jvmVersion>
213225
<module>
214226
<moduleInfo>
215227
<name>org.fusesource.jansi</name>
216-
<exports>
217-
org.fusesource.jansi;
218-
org.fusesource.jansi.io;
219-
</exports>
228+
<exports>org.fusesource.jansi;
229+
org.fusesource.jansi.io;</exports>
220230
</moduleInfo>
221231
</module>
222232
</configuration>
@@ -228,13 +238,20 @@
228238
<groupId>org.codehaus.mojo</groupId>
229239
<artifactId>exec-maven-plugin</artifactId>
230240
<version>3.0.0</version>
241+
<dependencies>
242+
<dependency>
243+
<groupId>info.picocli</groupId>
244+
<artifactId>picocli-codegen</artifactId>
245+
<version>4.5.2</version>
246+
</dependency>
247+
</dependencies>
231248
<executions>
232249
<execution>
233250
<id>generate-graalvm-info</id>
234-
<phase>process-classes</phase>
235251
<goals>
236252
<goal>java</goal>
237253
</goals>
254+
<phase>process-classes</phase>
238255
<configuration>
239256
<includeProjectDependencies>true</includeProjectDependencies>
240257
<classpathScope>test</classpathScope>
@@ -251,13 +268,6 @@
251268
</configuration>
252269
</execution>
253270
</executions>
254-
<dependencies>
255-
<dependency>
256-
<groupId>info.picocli</groupId>
257-
<artifactId>picocli-codegen</artifactId>
258-
<version>4.5.2</version>
259-
</dependency>
260-
</dependencies>
261271
</plugin>
262272
<plugin>
263273
<groupId>org.apache.maven.plugins</groupId>
@@ -338,10 +348,10 @@
338348
<executions>
339349
<execution>
340350
<id>sign-artifacts</id>
341-
<phase>verify</phase>
342351
<goals>
343352
<goal>sign</goal>
344353
</goals>
354+
<phase>verify</phase>
345355
</execution>
346356
</executions>
347357
</plugin>
@@ -408,27 +418,13 @@
408418
</executions>
409419
</plugin>
410420
</plugins>
421+
<extensions>
422+
<extension>
423+
<groupId>org.fusesource.mvnplugins</groupId>
424+
<artifactId>fuse-jxr-skin</artifactId>
425+
<version>1.9</version>
426+
</extension>
427+
</extensions>
411428
</build>
412429

413-
<dependencies>
414-
<dependency>
415-
<groupId>org.junit.jupiter</groupId>
416-
<artifactId>junit-jupiter</artifactId>
417-
<version>5.7.0</version>
418-
<scope>test</scope>
419-
</dependency>
420-
<dependency>
421-
<groupId>org.junit.jupiter</groupId>
422-
<artifactId>junit-jupiter-params</artifactId>
423-
<version>5.7.0</version>
424-
<scope>test</scope>
425-
</dependency>
426-
<dependency>
427-
<groupId>info.picocli</groupId>
428-
<artifactId>picocli-codegen</artifactId>
429-
<version>4.5.2</version>
430-
<scope>test</scope>
431-
</dependency>
432-
</dependencies>
433-
434430
</project>

src/main/java/org/fusesource/jansi/Ansi.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2009-2017 the original author(s).
2+
* Copyright (C) 2009-2023 the original author(s).
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -119,7 +119,6 @@ public String toString() {
119119
public int value() {
120120
return value;
121121
}
122-
123122
}
124123

125124
/**
@@ -215,8 +214,7 @@ public static Ansi ansi(int size) {
215214
}
216215
}
217216

218-
private static class NoAnsi
219-
extends Ansi {
217+
private static class NoAnsi extends Ansi {
220218
public NoAnsi() {
221219
super();
222220
}
@@ -900,8 +898,7 @@ private Ansi appendEscapeSequence(char command, Object... options) {
900898
}
901899

902900
private void flushAttributes() {
903-
if (attributeOptions.isEmpty())
904-
return;
901+
if (attributeOptions.isEmpty()) return;
905902
if (attributeOptions.size() == 1 && attributeOptions.get(0) == 0) {
906903
builder.append(FIRST_ESC_CHAR);
907904
builder.append(SECOND_ESC_CHAR);

src/main/java/org/fusesource/jansi/AnsiColors.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2009-2017 the original author(s).
2+
* Copyright (C) 2009-2023 the original author(s).
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -21,7 +21,6 @@
2121
* @since 2.1
2222
*/
2323
public enum AnsiColors {
24-
2524
Colors16("16 colors"),
2625
Colors256("256 colors"),
2726
TrueColor("24-bit colors");

0 commit comments

Comments
 (0)