Skip to content

Commit a32b9ed

Browse files
committed
Replace deprecated constructors with valueOf(String)
1 parent ba35f99 commit a32b9ed

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/main/java/edu/harvard/iq/dataverse/util/SystemConfig.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ public Integer getSearchHighlightFragmentSize() {
473473
String fragSize = settingsService.getValueForKey(SettingsServiceBean.Key.SearchHighlightFragmentSize);
474474
if (fragSize != null) {
475475
try {
476-
return new Integer(fragSize);
476+
return Integer.valueOf(fragSize);
477477
} catch (NumberFormatException nfe) {
478478
logger.info("Could not convert " + SettingsServiceBean.Key.SearchHighlightFragmentSize + " to int: " + nfe);
479479
}
@@ -490,7 +490,7 @@ public long getTabularIngestSizeLimit() {
490490

491491
if (limitEntry != null) {
492492
try {
493-
Long sizeOption = new Long(limitEntry);
493+
Long sizeOption = Long.valueOf(limitEntry);
494494
return sizeOption;
495495
} catch (NumberFormatException nfe) {
496496
logger.warning("Invalid value for TabularIngestSizeLimit option? - " + limitEntry);
@@ -515,7 +515,7 @@ public long getTabularIngestSizeLimit(String formatName) {
515515

516516
if (limitEntry != null) {
517517
try {
518-
Long sizeOption = new Long(limitEntry);
518+
Long sizeOption = Long.valueOf(limitEntry);
519519
return sizeOption;
520520
} catch (NumberFormatException nfe) {
521521
logger.warning("Invalid value for TabularIngestSizeLimit:" + formatName + "? - " + limitEntry );
@@ -1061,7 +1061,7 @@ public long getDatasetValidationSizeLimit() {
10611061

10621062
if (limitEntry != null) {
10631063
try {
1064-
Long sizeOption = new Long(limitEntry);
1064+
Long sizeOption = Long.valueOf(limitEntry);
10651065
return sizeOption;
10661066
} catch (NumberFormatException nfe) {
10671067
logger.warning("Invalid value for DatasetValidationSizeLimit option? - " + limitEntry);
@@ -1076,7 +1076,7 @@ public long getFileValidationSizeLimit() {
10761076

10771077
if (limitEntry != null) {
10781078
try {
1079-
Long sizeOption = new Long(limitEntry);
1079+
Long sizeOption = Long.valueOf(limitEntry);
10801080
return sizeOption;
10811081
} catch (NumberFormatException nfe) {
10821082
logger.warning("Invalid value for FileValidationSizeLimit option? - " + limitEntry);

0 commit comments

Comments
 (0)