Skip to content

Commit e1224a6

Browse files
bucky-boyArtem Lukyanau
authored andcommitted
SDK-2486: Amended Java Doc comments / helper methods should always use the builder method
1 parent ec18bef commit e1224a6

File tree

1 file changed

+7
-10
lines changed
  • yoti-sdk-api/src/main/java/com/yoti/api/client/docs/session/create

1 file changed

+7
-10
lines changed

yoti-sdk-api/src/main/java/com/yoti/api/client/docs/session/create/SdkConfig.java

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public String getPrimaryColour() {
109109
}
110110

111111
/**
112-
* The primary colour for dark mode, configured for the session
112+
* The primary colour to use when in dark mode
113113
*
114114
* @return the primary colour
115115
*/
@@ -145,7 +145,7 @@ public String getLocale() {
145145
}
146146

147147
/**
148-
* The dark mode option configured for the session
148+
* Whether to use dark mode - may be 'ON', 'OFF', or 'AUTO'
149149
*
150150
* @return the dark mode
151151
*/
@@ -289,7 +289,7 @@ public Builder withPrimaryColour(String primaryColour) {
289289
}
290290

291291
/**
292-
* Sets the primary colour for the dark mode to be used by the web/native client
292+
* Sets the primary colour to be used by the web/native client when in dark mode
293293
*
294294
* @param primaryColourDarkMode the primary colour for the dark mode, hexadecimal value e.g. #ff0000
295295
* @return the builder
@@ -333,7 +333,7 @@ public Builder withLocale(String locale) {
333333
}
334334

335335
/**
336-
* Sets the dark mode to be used by the web/native client
336+
* Whether to use dark mode on the web/native client - may be 'ON', 'OFF', or 'AUTO'
337337
*
338338
* @param darkMode the dark mode, e.g. "ON"
339339
* @return the builder
@@ -349,8 +349,7 @@ public Builder withDarkMode(String darkMode) {
349349
* @return the builder
350350
*/
351351
public Builder withDarkModeOn() {
352-
this.darkMode = DocScanConstants.ON;
353-
return this;
352+
return withDarkMode(DocScanConstants.ON);
354353
}
355354

356355
/**
@@ -359,8 +358,7 @@ public Builder withDarkModeOn() {
359358
* @return the builder
360359
*/
361360
public Builder withDarkModeOff() {
362-
this.darkMode = DocScanConstants.OFF;
363-
return this;
361+
return withDarkMode(DocScanConstants.OFF);
364362
}
365363

366364
/**
@@ -369,8 +367,7 @@ public Builder withDarkModeOff() {
369367
* @return the builder
370368
*/
371369
public Builder withDarkModeAuto() {
372-
this.darkMode = DocScanConstants.AUTO;
373-
return this;
370+
return withDarkMode(DocScanConstants.AUTO);
374371
}
375372

376373
/**

0 commit comments

Comments
 (0)