55import com .teamscale .client .StringUtils ;
66import com .teamscale .jacoco .agent .options .ProjectAndCommit ;
77import com .teamscale .report .util .BashFileSkippingInputStream ;
8- import org . conqat . lib . commons . collections .Pair ;
8+ import kotlin .Pair ;
99import org .jetbrains .annotations .NotNull ;
1010import org .jetbrains .annotations .Nullable ;
1111
@@ -127,14 +127,14 @@ public static Pair<File, Boolean> extractGitPropertiesSearchRoot(
127127 case "file" :
128128 File jarOrClassFolderFile = new File (jarOrClassFolderUrl .toURI ());
129129 if (jarOrClassFolderFile .isDirectory () || isJarLikeFile (jarOrClassFolderUrl .getPath ())) {
130- return Pair . createPair (new File (jarOrClassFolderUrl .toURI ()), !jarOrClassFolderFile .isDirectory ());
130+ return new Pair <> (new File (jarOrClassFolderUrl .toURI ()), !jarOrClassFolderFile .isDirectory ());
131131 }
132132 break ;
133133 case "jar" :
134134 // Used e.g. by Spring Boot. Example: jar:file:/home/k/demo.jar!/BOOT-INF/classes!/
135135 Matcher jarMatcher = JAR_URL_REGEX .matcher (jarOrClassFolderUrl .toString ());
136136 if (jarMatcher .matches ()) {
137- return Pair . createPair (new File (jarMatcher .group (1 )), true );
137+ return new Pair <> (new File (jarMatcher .group (1 )), true );
138138 }
139139 // Intentionally no break to handle ear and war files
140140 case "war" :
@@ -143,7 +143,7 @@ public static Pair<File, Boolean> extractGitPropertiesSearchRoot(
143143 // Example: war:file:/Users/example/apache-tomcat/webapps/demo.war*/WEB-INF/lib/demoLib-1.0-SNAPSHOT.jar
144144 Matcher nestedMatcher = NESTED_JAR_REGEX .matcher (jarOrClassFolderUrl .toString ());
145145 if (nestedMatcher .matches ()) {
146- return Pair . createPair (new File (nestedMatcher .group (1 )), true );
146+ return new Pair <> (new File (nestedMatcher .group (1 )), true );
147147 }
148148 break ;
149149 case "vfs" :
@@ -170,7 +170,7 @@ private static Pair<File, Boolean> getVfsContentFolder(
170170 // obtain the physical location of the class file. It is created on demand in <jboss-installation-dir>/standalone/tmp/vfs
171171 Method getPhysicalFileMethod = virtualFileClass .getMethod ("getPhysicalFile" );
172172 File file = (File ) getPhysicalFileMethod .invoke (virtualFile );
173- return Pair . createPair (file , !file .isDirectory ());
173+ return new Pair <> (file , !file .isDirectory ());
174174 }
175175
176176 /**
@@ -198,7 +198,7 @@ private static String extractArtefactUrl(URL jarOrClassFolderUrl) {
198198 }
199199
200200 private static boolean isJarLikeFile (String segment ) {
201- return org . conqat . lib . commons . string . StringUtils .endsWithOneOf (
201+ return StringUtils .endsWithOneOf (
202202 segment .toLowerCase (), ".jar" , ".war" , ".ear" , ".aar" );
203203 }
204204
@@ -224,7 +224,6 @@ public static List<ProjectAndCommit> getProjectRevisionsFromGitProperties(
224224 "No entry or empty value for both '" + GIT_PROPERTIES_GIT_COMMIT_ID + "'/'" + GIT_PROPERTIES_GIT_COMMIT_ID_FULL +
225225 "' and '" + GIT_PROPERTIES_TEAMSCALE_PROJECT + "' in " + file + "." +
226226 "\n Contents of " + GIT_PROPERTIES_FILE_NAME + ": " + entryWithProperties .getSecond ()
227- .toString ()
228227 );
229228 }
230229 result .add (new ProjectAndCommit (project , commitInfo ));
@@ -304,7 +303,7 @@ private static List<Pair<String, Properties>> findGitPropertiesInFolder(File dir
304303 gitProperties .load (is );
305304 String relativeFilePath = directoryFile .getName () + File .separator + directoryFile .toPath ()
306305 .relativize (gitPropertiesFile .toPath ());
307- result .add (Pair . createPair (relativeFilePath , gitProperties ));
306+ result .add (new Pair <> (relativeFilePath , gitProperties ));
308307 } catch (IOException e ) {
309308 throw new IOException (
310309 "Reading directory " + gitPropertiesFile .getAbsolutePath () + " for obtaining commit " +
@@ -330,7 +329,7 @@ static List<Pair<String, Properties>> findGitPropertiesInArchive(
330329 if (Paths .get (entry .getName ()).getFileName ().toString ().equalsIgnoreCase (GIT_PROPERTIES_FILE_NAME )) {
331330 Properties gitProperties = new Properties ();
332331 gitProperties .load (in );
333- result .add (Pair . createPair (fullEntryName , gitProperties ));
332+ result .add (new Pair <> (fullEntryName , gitProperties ));
334333 } else if (isJarLikeFile (entry .getName ()) && recursiveSearch ) {
335334 result .addAll (findGitPropertiesInArchive (new JarInputStream (in ), fullEntryName , true ));
336335 }
@@ -343,9 +342,9 @@ static List<Pair<String, Properties>> findGitPropertiesInArchive(
343342 }
344343
345344 /**
346- * Returns the CommitInfo (revision and branch + timestmap) from a git properties file. The revision can be either in
347- * {@link #GIT_PROPERTIES_GIT_COMMIT_ID} or {@link #GIT_PROPERTIES_GIT_COMMIT_ID_FULL}. The branch and timestamp in
348- * {@link #GIT_PROPERTIES_GIT_BRANCH} + {@link #GIT_PROPERTIES_GIT_COMMIT_TIME} or in
345+ * Returns the CommitInfo (revision and branch + timestmap) from a git properties file. The revision can be either
346+ * in {@link #GIT_PROPERTIES_GIT_COMMIT_ID} or {@link #GIT_PROPERTIES_GIT_COMMIT_ID_FULL}. The branch and timestamp
347+ * in {@link #GIT_PROPERTIES_GIT_BRANCH} + {@link #GIT_PROPERTIES_GIT_COMMIT_TIME} or in
349348 * {@link #GIT_PROPERTIES_TEAMSCALE_COMMIT_BRANCH} + {@link #GIT_PROPERTIES_TEAMSCALE_COMMIT_TIME}. By default,
350349 * times will be parsed with {@link #GIT_PROPERTIES_DEFAULT_GRADLE_DATE_FORMAT} and
351350 * {@link #GIT_PROPERTIES_DEFAULT_MAVEN_DATE_FORMAT}. An additional format can be given with
0 commit comments