gnodet commented on code in PR #1194:
URL: https://github.com/apache/maven/pull/1194#discussion_r1251330034
##########
api/maven-api-settings/src/main/mdo/settings.mdo:
##########
@@ -535,6 +539,62 @@
<type>String</type>
</field>
</fields>
+ <codeSegments>
+ <codeSegment>
+ <version>1.0.0/1.3.0</version>
+ <code>
+ <![CDATA[
+ public boolean isActive() {
+ return (getActiveString() != null) ?
Boolean.parseBoolean(getActiveString()) : true;
+ }
+
+ public void setActive(boolean active) {
+ setActiveString(String.valueOf(active));
+ }
+
+ public int getPort() {
+ return (getPortString() != null) ? Integer.parseInt(getPortString()) :
8080;
+ }
+
+ public void setPort(int port) {
+ setPortString(String.valueOf(port));
Review Comment:
We don't do any validation in the model afaik, it is done later using custom
components such as `SettingsValidator` or `ModelValidator`. Although the goal
of those methods is to provide compatibility with the ones that are currently
automatically generated which look like:
```
/**
* Get the proxy port.
*
* @return int
*/
public int getPort()
{
return this.port;
} //-- int getPort()
```
and
```
/**
* Set the proxy port.
*
* @param port a port object.
*/
public void setPort( int port )
{
this.port = port;
} //-- void setPort( int )
```
--
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]