Skip to content

Commit 82026ef

Browse files
committed
Fixed issue on poolsize value preventing creation or modification of applications.
1 parent 5c2672a commit 82026ef

File tree

3 files changed

+4
-28
lines changed

3 files changed

+4
-28
lines changed

source/src/main/java/org/cerberus/core/servlet/crud/countryenvironment/CreateApplication.java

+1-13
Original file line numberDiff line numberDiff line change
@@ -246,22 +246,10 @@ private List<CountryEnvironmentParameters> getCountryEnvironmentApplicationFromP
246246
String var4 = tcsaJson.getString("var4");
247247
String secret1 = tcsaJson.getString("secret1");
248248
String secret2 = tcsaJson.getString("secret2");
249-
String strPoolSize = tcsaJson.getString("poolSize");
249+
int poolSize = tcsaJson.getInt("poolSize");
250250
String mobileActivity = tcsaJson.getString("mobileActivity");
251251
String mobilePackage = tcsaJson.getString("mobilePackage");
252252

253-
int poolSize;
254-
if (strPoolSize.isEmpty()) {
255-
poolSize = CountryEnvironmentParameters.DEFAULT_POOLSIZE;
256-
} else {
257-
try {
258-
poolSize = Integer.parseInt(strPoolSize);
259-
} catch (NumberFormatException e) {
260-
LOG.warn("Unable to parse pool size: " + strPoolSize + ". Applying default value");
261-
poolSize = CountryEnvironmentParameters.DEFAULT_POOLSIZE;
262-
}
263-
}
264-
265253
if (!delete) {
266254
CountryEnvironmentParameters ced = cedFactory.create(system, country, environment, application, isActive, ip, domain, url, urlLogin, var1, var2, var3, var4, secret1, secret2, poolSize, mobileActivity, mobilePackage, request.getRemoteUser(), null, request.getRemoteUser(), null);
267255
cedList.add(ced);

source/src/main/java/org/cerberus/core/servlet/crud/countryenvironment/UpdateApplication.java

+1-13
Original file line numberDiff line numberDiff line change
@@ -258,22 +258,10 @@ private List<CountryEnvironmentParameters> getCountryEnvironmentApplicationFromP
258258
String var4 = tcsaJson.getString("var4");
259259
String secret1 = tcsaJson.getString("secret1");
260260
String secret2 = tcsaJson.getString("secret2");
261-
String strPoolSize = tcsaJson.getString("poolSize");
261+
int poolSize = tcsaJson.getInt("poolSize");
262262
String mobileActivity = tcsaJson.getString("mobileActivity");
263263
String mobilePackage = tcsaJson.getString("mobilePackage");
264264

265-
int poolSize;
266-
if (strPoolSize.isEmpty()) {
267-
poolSize = CountryEnvironmentParameters.DEFAULT_POOLSIZE;
268-
} else {
269-
try {
270-
poolSize = Integer.parseInt(strPoolSize);
271-
} catch (NumberFormatException e) {
272-
LOG.warn("Unable to parse pool size: " + strPoolSize + ". Applying default value");
273-
poolSize = CountryEnvironmentParameters.DEFAULT_POOLSIZE;
274-
}
275-
}
276-
277265
if (!delete) {
278266
CountryEnvironmentParameters ced = cedFactory.create(system, country, environment, application, isActive, ip, domain, url, urlLogin, var1, var2, var3, var4, secret1, secret2, poolSize, mobileActivity, mobilePackage, request.getRemoteUser(), null, request.getRemoteUser(), null);
279267
cedList.add(ced);

source/src/main/webapp/js/transversalobject/Application.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ function feedApplicationModal(application, mode, system) {
280280
appObj1.type = "NONE";
281281
appObj1.system = getUser().defaultSystem;
282282
appObj1.subsystem = "";
283-
appObj1.poolSize = "";
283+
appObj1.poolSize = 10;
284284
appObj1.repourl = "";
285285
appObj1.bugTrackerUrl = "";
286286
appObj1.bugTrackerConnector = "";
@@ -604,7 +604,7 @@ function addNewEnvironmentRow() {
604604
var4: "",
605605
secret1: "",
606606
secret2: "",
607-
poolSize: "",
607+
poolSize: 10,
608608
mobileActivity: "",
609609
mobilePackage: "",
610610
toDelete: false

0 commit comments

Comments
 (0)