Fixed issue where DashboardState was saved with partial details
This commit is contained in:
parent
aab5c2d8f8
commit
921654200d
2 changed files with 20 additions and 19 deletions
2
pom.xml
2
pom.xml
|
@ -16,7 +16,7 @@
|
|||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
<version>2.4</version>
|
||||
<version>3.1.0</version>
|
||||
<executions>
|
||||
<!-- Run shade goal on package phase -->
|
||||
<execution>
|
||||
|
|
|
@ -395,7 +395,6 @@ public class DashboardController implements Initializable {
|
|||
*/
|
||||
public DashboardState getState() {
|
||||
DashboardState dashboardState = null;
|
||||
try {
|
||||
switch (httpMethodBox.getValue()) {
|
||||
case "POST":
|
||||
case "PUT":
|
||||
|
@ -407,13 +406,15 @@ public class DashboardController implements Initializable {
|
|||
dashboardState = new DashboardState();
|
||||
}
|
||||
|
||||
try {
|
||||
dashboardState.setTarget(addressField.getText());
|
||||
} catch (MalformedURLException e) {
|
||||
System.out.println("Dashboard state was saved with an invalid URL.");
|
||||
}
|
||||
dashboardState.setHttpMethod(httpMethodBox.getValue());
|
||||
dashboardState.setHeaders(headerTabController.getHeaders());
|
||||
dashboardState.setParams(getParams());
|
||||
} catch (MalformedURLException MURLE) {
|
||||
System.out.println("Dashboard state was saved with a malformed URL.");
|
||||
}
|
||||
|
||||
return dashboardState;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue