Skip to content

Commit 7733263

Browse files
committed
KnownPlatforms: generalize name of utility method
The name nativeClassifierPatterns() suggests the SubdirectoryPattern list will always only consist of patterns that match particular classifiers. While this is currently the case, in future it could be that patterns besides *:*:*:C are possible, so a better name to use is nativeSubdirectoryPatterns(). This will also avoid confusion with another method we will need shortly: nativeClassifiers().
1 parent d99e14b commit 7733263

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/main/java/org/scijava/maven/plugin/install/AbstractInstallMojo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ private static boolean isIJ1Plugin(final File file) {
292292
private String subdirectory(final Artifact artifact) {
293293
if (subdirectoryPatterns == null || subdirectoryPatterns.isEmpty()) {
294294
getLog().debug("Using default subdirectory patterns");
295-
subdirectoryPatterns = KnownPlatforms.nativeClassifierPatterns();
295+
subdirectoryPatterns = KnownPlatforms.nativeSubdirectoryPatterns();
296296
}
297297
getLog().debug("Checking artifact: " + artifact.getGroupId() +
298298
":" + artifact.getArtifactId() + ":" + artifact.getVersion() + ":" +

src/main/java/org/scijava/maven/plugin/install/KnownPlatforms.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public static String shortName(final String family, final String arch) {
8787
* <li>linux64 &rarr; linux-x86_64, natives-linux-amd64, etc.</li>
8888
* </ul>
8989
*/
90-
public static List<SubdirectoryPattern> nativeClassifierPatterns() {
90+
public static List<SubdirectoryPattern> nativeSubdirectoryPatterns() {
9191
final Map<String, List<String>> patterns = new HashMap<>();
9292

9393
for (final String family : FAMILIES) {

0 commit comments

Comments
 (0)