Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 4c53e5d

Browse files
author
Alex Johnson
committed
BUGFIX - Resolve serialised SupportedVersions objects being returned by getSupportedVersionStrings instead of version strings
1 parent 99dca93 commit 4c53e5d

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

‎src/main/java/com/magento/idea/magento2uct/packages/IndexRegistry.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,16 @@ public enum IndexRegistry {
3838
private final String key;
3939
private final Class<?> type;
4040
private final IndexProcessor processor;
41-
private final String[] versions;
41+
private final List<String> versions;
4242

4343
IndexRegistry(
4444
final Class<?> type,
4545
final IndexProcessor processor,
46-
final String... versions
46+
final List<String> versions
4747
) {
4848
this.type = type;
4949
this.processor = processor;
50-
this.versions = Arrays.copyOf(versions, versions.length);
50+
this.versions = versions;
5151
key = this.toString();
5252
}
5353

@@ -84,7 +84,7 @@ public IndexProcessor getProcessor() {
8484
* @return List[String]
8585
*/
8686
public List<String> getVersions() {
87-
return Arrays.asList(versions);
87+
return versions;
8888
}
8989

9090
/**

‎src/main/java/com/magento/idea/magento2uct/packages/SupportedVersion.java

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,14 @@ private SupportedVersion(final String version) {
5151
return versions;
5252
}
5353

54-
public static String[] getSupportedVersionStrings() {
55-
return getSupportedVersions()
56-
.stream()
57-
.map(SupportedVersion::toString)
58-
.toArray(String[]::new);
54+
public static List<String> getSupportedVersionStrings() {
55+
final List<String> versions = new ArrayList<>();
56+
57+
for (final SupportedVersion version : getSupportedVersions()) {
58+
versions.add(version.getVersion());
59+
}
60+
61+
return versions;
5962
}
6063

6164
public static @Nullable SupportedVersion getVersion(final @NotNull String versionCandidate) {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /