laeubi commented on code in PR #242:
URL: https://github.com/apache/maven-resolver/pull/242#discussion_r1105586669
##########
maven-resolver-util/src/main/java/org/eclipse/aether/util/version/GenericVersion.java:
##########
@@ -55,6 +55,26 @@
hash = Arrays.hashCode( items );
}
+ /**
+ * Returns this instance backing string representation.
+ *
+ * @since 1.9.5
+ */
+ String asString()
+ {
+ return version;
+ }
+
+ /**
+ * Returns this instance tokenized representation.
+ *
+ * @since 1.9.5
+ */
+ Item[] asItems()
+ {
+ return items;
Review Comment:
This will still allow to modify the array, just wanted to note that ... As
mentioned elsewhere, using streams is much safer, e.g. Arrays.stream(items),
then one can collect it to list, array, whatever without the risk of modify the
underlying array.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]