Skip to content

Commit

Permalink
refactor: clean unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
akardapolov committed Dec 22, 2019
1 parent ad7a1e6 commit 2f8c071
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions ashv/src/main/java/gui/connect/ConnectToDbArea.java
Original file line number Diff line number Diff line change
Expand Up @@ -590,19 +590,6 @@ private class JdialogComponentListener implements ComponentListener{
}
}

private int getNumForRawDataDaysRetainTF(){
int curValue = 101;

try {
curValue = Integer.parseInt(rawDataDaysRetainTF.getText());
} catch (NumberFormatException ex) {
log.info("Raw data days retain text field contains char data or empty");
return curValue;
}

return curValue;
}

private void setNumForRawDataDaysRetainTF() {
if (rawDataDaysRetainTF.getText().equalsIgnoreCase(String.valueOf(ConstantManager.RetainRawData.Never))){
rawDataDaysRetainTF.setText(String.valueOf(DAYS_RETAIN_MIN));
Expand All @@ -612,9 +599,9 @@ private void setNumForRawDataDaysRetainTF() {
}

private void setTextRawDataDaysRetainTF(){
if (getNumForRawDataDaysRetainTF() <= DAYS_RETAIN_MIN) {
if (connectionManager.getRetainDays() <= DAYS_RETAIN_MIN) {
rawDataDaysRetainTF.setText(String.valueOf(ConstantManager.RetainRawData.Never));
} else if (getNumForRawDataDaysRetainTF() >= DAYS_RETAIN_MAX) {
} else if (connectionManager.getRetainDays() >= DAYS_RETAIN_MAX) {
rawDataDaysRetainTF.setText(String.valueOf(ConstantManager.RetainRawData.Always));
}
}
Expand Down

0 comments on commit 2f8c071

Please sign in to comment.