Skip to content

Commit

Permalink
Merge pull request #1869 from wwtamu/create-deposit-location
Browse files Browse the repository at this point in the history
Cast Object timeout property as Integer
  • Loading branch information
cstarcher authored Jan 8, 2024
2 parents 345d6fd + 7df1050 commit 1fed8ad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,9 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptor>assembly.xml</descriptor>
<descriptors>
<descriptor>assembly.xml</descriptor>
</descriptors>
<finalName>${project.artifactId}-${project.version}</finalName>
</configuration>
<executions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public DepositLocation create(Map<String, Object> depositLocationJson) {
onBehalfOf = (String) depositLocationJson.get("onBehalfOf");
}

Integer timeout = Integer.valueOf((String) depositLocationJson.getOrDefault("timeout", "240"));
Integer timeout = (Integer) depositLocationJson.getOrDefault("timeout", "240");

return create((String) depositLocationJson.get("name"), (String) depositLocationJson.get("repository"), (String) depositLocationJson.get("collection"), (String) depositLocationJson.get("username"), (String) depositLocationJson.get("password"), onBehalfOf, packager, (String) depositLocationJson.get("depositorName"), timeout);
}
Expand Down

0 comments on commit 1fed8ad

Please sign in to comment.