Skip to content

Commit f69f33d

Browse files
authored
Update GetterIT.java (#883)
Convert String Object to String Litrels
1 parent 3d4c178 commit f69f33d

1 file changed

Lines changed: 16 additions & 16 deletions

File tree

src/it/java/dbProcs/GetterIT.java

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
public class GetterIT {
3535

3636
private static final Logger log = LogManager.getLogger(GetterIT.class);
37-
private static String lang = new String("en_GB");
37+
private static String lang = "en_GB";
3838
private static Locale locale = new Locale(lang);
3939
private static String applicationRoot = new String();
4040
private static final int totalNumberOfModulesInShepherd = 58;
@@ -230,8 +230,8 @@ public void setUp() {
230230

231231
@Test
232232
public void testAuthUserCorrectUpperCaseCredentials() {
233-
String userName = new String("authWithGoodUpperCaseCreds");
234-
String password = new String("goodPassword");
233+
String userName = "authWithGoodUpperCaseCreds";
234+
String password = "goodPassword";
235235

236236
try {
237237
String user[] = Getter.authUser(applicationRoot, userName, password);
@@ -257,8 +257,8 @@ public void testAuthUserCorrectUpperCaseCredentials() {
257257
@Test
258258
public void testAuthUserCorrectLongUsername() {
259259
// Here is a pretty long username
260-
String userName = new String("göödUsernämeWithÅDecentOKLengthÖ");
261-
String password = new String("goodPassword");
260+
String userName = "göödUsernämeWithÅDecentOKLengthÖ";
261+
String password = "goodPassword";
262262

263263
try {
264264
String user[] = Getter.authUser(applicationRoot, userName, password);
@@ -284,8 +284,8 @@ public void testAuthUserCorrectLongUsername() {
284284
@Test
285285
public void testAuthUserBadLongUsername() {
286286
// Here is a pretty long username
287-
String userName = new String("badUsernameWithAnIncrediblyLongLengthWhicIsTooMuch");
288-
String password = new String("goodPassword");
287+
String userName = "badUsernameWithAnIncrediblyLongLengthWhicIsTooMuch";
288+
String password = "goodPassword";
289289

290290
String user[] = Getter.authUser(applicationRoot, userName, password);
291291
if (user == null || user[0].isEmpty()) {
@@ -313,8 +313,8 @@ public void testAuthUserBadLongUsername() {
313313
@Test
314314
public void testAuthUserCorrectNonLatinUsername() {
315315
// Here is a non-latin username
316-
String userName = new String("nonLatinåäöÅÄÖ");
317-
String password = new String("goodPassword");
316+
String userName = "nonLatinåäöÅÄÖ";
317+
String password = "goodPassword";
318318

319319
log.debug("Attempting to authenticate as " + userName);
320320
String user[] = Getter.authUser(applicationRoot, userName, password);
@@ -345,8 +345,8 @@ public void testAuthUserCorrectNonLatinUsername() {
345345
@Disabled
346346
public void testAuthUserCorrectEmojiUsername() {
347347
// Here is a very non-latin username
348-
String userName = new String("😃😅😍💩👍‌𝑓ᶃ我璃မ္ယက္‌");
349-
String password = new String("goodEmojiPassword");
348+
String userName = "😃😅😍💩👍‌𝑓ᶃ我璃မ္ယက္‌";
349+
String password = "goodEmojiPassword";
350350

351351
log.debug("Attempting to authenticate as " + userName);
352352
String user[] = Getter.authUser(applicationRoot, userName, password);
@@ -375,9 +375,9 @@ public void testAuthUserCorrectEmojiUsername() {
375375

376376
@Test
377377
public void testAuthUserCorrectNonLatinPassword() {
378-
String userName = new String("NonLatinPass");
378+
String userName = "NonLatinPass";
379379
// Here is a very non-latin password
380-
String password = new String("אذاसтьᚩᚾåäö123ÅÄÖǎ𝓫𝚌Ⴛḗ𝑓ᶃ");
380+
String password = "אذاसтьᚩᚾåäö123ÅÄÖǎ𝓫𝚌Ⴛḗ𝑓ᶃ";
381381

382382
try {
383383
String user[] = Getter.authUser(applicationRoot, userName, password);
@@ -402,7 +402,7 @@ public void testAuthUserCorrectNonLatinPassword() {
402402

403403
@Test
404404
public void testAuthUserCorrectCredentialsLongPassword() {
405-
String userName = new String("authWithGoodCredsLongPass");
405+
String userName = "authWithGoodCredsLongPass";
406406

407407
// A 160 character password should work!
408408
String password =
@@ -3202,8 +3202,8 @@ public void testSSOAuthSuspended() {
32023202
*/
32033203
@Test
32043204
public void testSSOAuthExistingUserRelogin() {
3205-
String userName = new String("SSOReloginUser Lastname");
3206-
String ssoName = new String("ssoreloginuser@example.com");
3205+
String userName = "SSOReloginUser Lastname";
3206+
String ssoName = "ssoreloginuser@example.com";
32073207

32083208
String[] first = Getter.authUserSSO(applicationRoot, null, userName, ssoName, "player");
32093209
assertNotNull(first, "First SSO auth (user creation) should succeed");

0 commit comments

Comments
 (0)