Skip to content

Commit

Permalink
Update dependency versions
Browse files Browse the repository at this point in the history
  • Loading branch information
ctubbsii committed Nov 23, 2022
1 parent 58ecbb6 commit cb54f89
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 25 deletions.
38 changes: 19 additions & 19 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<parent>
<groupId>org.apache</groupId>
<artifactId>apache</artifactId>
<version>26</version>
<version>28</version>
<relativePath />
</parent>
<groupId>net.revelc.code</groupId>
Expand Down Expand Up @@ -81,20 +81,20 @@
<formatterConfigFile>src/tools/modified-google-style.xml</formatterConfigFile>
<github.site.repositoryName>impsort-maven-plugin</github.site.repositoryName>
<github.site.repositoryOwner>revelc</github.site.repositoryOwner>
<javaparser.version>3.24.2</javaparser.version>
<javaparser.version>3.24.8</javaparser.version>
<maven.compiler.release>11</maven.compiler.release>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<!-- skip standard site deployment, because site is deployed using github plugin instead -->
<maven.site.deploy.skip>true</maven.site.deploy.skip>
<maven.tools-version>3.8.5</maven.tools-version>
<mavenPluginToolsVersion>3.6.4</mavenPluginToolsVersion>
<maven.tools-version>3.8.6</maven.tools-version>
<mavenPluginToolsVersion>3.7.0</mavenPluginToolsVersion>
<minimalJavaBuildVersion>11</minimalJavaBuildVersion>
<minimalMavenBuildVersion>3.5.0</minimalMavenBuildVersion>
<project.build.outputTimestamp>2022-05-24T21:51:27Z</project.build.outputTimestamp>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<projectInfoReportsVersion>3.1.2</projectInfoReportsVersion>
<projectInfoReportsVersion>3.4.1</projectInfoReportsVersion>
<sourceReleaseAssemblyDescriptor>source-release-tar</sourceReleaseAssemblyDescriptor>
<surefire.version>3.0.0-M5</surefire.version>
</properties>
Expand Down Expand Up @@ -128,12 +128,12 @@
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>3.4.2</version>
<version>3.5.0</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.9.0-M1</version>
<version>5.9.1</version>
</dependency>
</dependencies>
</dependencyManagement>
Expand Down Expand Up @@ -178,12 +178,12 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>2.8.1</version>
<version>2.13.0</version>
</plugin>
<plugin>
<groupId>org.gaul</groupId>
<artifactId>modernizer-maven-plugin</artifactId>
<version>2.3.0</version>
<version>2.5.0</version>
<configuration>
<javaVersion>${maven.compiler.target}</javaVersion>
</configuration>
Expand All @@ -196,7 +196,7 @@
<plugin>
<groupId>com.github.ekryd.sortpom</groupId>
<artifactId>sortpom-maven-plugin</artifactId>
<version>3.0.1</version>
<version>3.2.0</version>
<configuration>
<createBackupFile>false</createBackupFile>
<expandEmptyElements>false</expandEmptyElements>
Expand All @@ -211,7 +211,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.9.0</version>
<version>3.10.1</version>
<configuration>
<optimize>true</optimize>
<showDeprecation>true</showDeprecation>
Expand All @@ -227,12 +227,12 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.0.0</version>
<version>3.1.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.3.1</version>
<version>3.4.1</version>
<configuration>
<quiet>true</quiet>
<doclint>all,-missing</doclint>
Expand All @@ -241,7 +241,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>3.0.0-M5</version>
<version>3.0.0-M7</version>
<configuration>
<useReleaseProfile>false</useReleaseProfile>
<pushChanges>false</pushChanges>
Expand All @@ -251,7 +251,7 @@
<plugin>
<groupId>net.revelc.code.formatter</groupId>
<artifactId>formatter-maven-plugin</artifactId>
<version>2.18.0</version>
<version>2.21.0</version>
<configuration>
<compilerCompliance>${maven.compiler.source}</compilerCompliance>
<compilerSource>${maven.compiler.source}</compilerSource>
Expand All @@ -269,27 +269,27 @@
<plugin>
<groupId>net.revelc.code</groupId>
<artifactId>impsort-maven-plugin</artifactId>
<version>1.6.2</version>
<version>1.7.0</version>
<configuration>
<groups>java.,javax.,org.,com.</groups>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.1.2</version>
<version>3.2.0</version>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>10.2</version>
<version>10.4</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>4.5.3.0</version>
<version>4.7.3.0</version>
<configuration>
<xmlOutput>true</xmlOutput>
<effort>Max</effort>
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/net/revelc/code/impsort/ImpSort.java
Original file line number Diff line number Diff line change
Expand Up @@ -234,14 +234,14 @@ private static void convertAndAddImport(LinkedHashSet<Import> allImports, List<N
String eol) {
boolean isStatic = false;
String importItem = null;
String prefix = "";
String suffix = "";
StringBuilder prefixBuilder = new StringBuilder();
StringBuilder suffixBuilder = new StringBuilder();
for (Node n : thisImport) {
if (n instanceof Comment) {
if (importItem == null) {
prefix += n.toString();
prefixBuilder.append(n.toString());
} else {
suffix += n.toString();
suffixBuilder.append(n.toString());
}
}
if (n instanceof ImportDeclaration) {
Expand All @@ -250,11 +250,11 @@ private static void convertAndAddImport(LinkedHashSet<Import> allImports, List<N
importItem = i.getName().asString() + (i.isAsterisk() ? ".*" : "");
}
}
suffix = suffix.trim();
String suffix = suffixBuilder.toString().trim();
if (!suffix.isEmpty()) {
suffix = " " + suffix;
}
Import imp = new Import(isStatic, importItem, prefix.trim(), suffix, eol);
Import imp = new Import(isStatic, importItem, prefixBuilder.toString().trim(), suffix, eol);
Iterator<Import> iter = allImports.iterator();
// this de-duplication can probably be made more efficient by doing it all at the end
while (iter.hasNext()) {
Expand Down

0 comments on commit cb54f89

Please sign in to comment.