gnodet commented on code in PR #14067:
URL: https://github.com/apache/maven/pull/14067#discussion_r4617863704
##########
src/mdo/model.vm:
##########
@@ -204,14 +204,40 @@ public class ${class.name}
#end
#if ( $class == $root )
- public String getNamespaceUri() {
+ /**
+ * The namespace URI of the model.
+ *
+ * @return a {@code String}
+ */
+ public String namespaceUri() {
return namespaceUri;
}
- public String getModelEncoding() {
+ /**
+ * @deprecated Use {@link #namespaceUri()} instead.
+ */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ public String getNamespaceUri() {
Review Comment:
`since = "4.0.0"` is intentional — this PR will be backported to 4.0.x, so
the deprecation lands in both 4.0 and 4.2 (no 4.1 is planned). `"4.0.0"` is the
correct value. <!-- reviewer: gnodet-bot -->
##########
src/mdo/model.vm:
##########
@@ -204,14 +204,40 @@ public class ${class.name}
#end
#if ( $class == $root )
- public String getNamespaceUri() {
+ /**
+ * The namespace URI of the model.
+ *
+ * @return a {@code String}
+ */
+ public String namespaceUri() {
return namespaceUri;
}
- public String getModelEncoding() {
+ /**
+ * @deprecated Use {@link #namespaceUri()} instead.
+ */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ public String getNamespaceUri() {
+ return namespaceUri();
+ }
+
+ /**
+ * The encoding used for the model.
+ *
+ * @return a {@code String}
+ */
+ public String modelEncoding() {
return modelEncoding;
}
+ /**
+ * @deprecated Use {@link #modelEncoding()} instead.
+ */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ public String getModelEncoding() {
Review Comment:
`since = "4.0.0"` is intentional — this PR will be backported to 4.0.x, so
the deprecation lands in both 4.0 and 4.2 (no 4.1 is planned). `"4.0.0"` is the
correct value. <!-- reviewer: gnodet-bot -->
##########
src/mdo/model.vm:
##########
@@ -235,10 +261,21 @@ public class ${class.name}
#if ( $field.type == "java.util.List" || $field.type ==
"java.util.Properties" )
@Nonnull
#end
- public ${type} ${pfx}${cap}() {
+ public ${type} ${field.name}() {
return this.${field.name};
}
+ /**
+ * @deprecated Use {@link #${field.name}()} instead.
+ */
+ @Deprecated(since = "4.0.0", forRemoval = true)
+ #if ( $field.type == "java.util.List" || $field.type ==
"java.util.Properties" )
Review Comment:
`since = "4.0.0"` is intentional — this PR will be backported to 4.0.x, so
the deprecation lands in both 4.0 and 4.2 (no 4.1 is planned). `"4.0.0"` is the
correct value. <!-- reviewer: gnodet-bot -->
--
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]