Skip to content

Commit 05fa8fc

Browse files
AbhinabKanrarmaibin
authored andcommitted
indentation changes (eugenp#1072)
* rest with spark java * 4 * Update Application.java * indentation changes
1 parent d4c1ce4 commit 05fa8fc

2 files changed

Lines changed: 25 additions & 25 deletions

File tree

‎spring-mobile/src/main/java/com/baeldung/Application.java‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
public class Application {
88

99
public static void main(String[] args) {
10-
SpringApplication.run(Application.class, args);
10+
SpringApplication.run(Application.class, args);
1111
}
1212

13-
}
13+
}
14+

‎spring-mobile/src/main/java/com/baeldung/controller/IndexController.java‎

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,33 +8,32 @@
88

99
@Controller
1010
public class IndexController {
11-
11+
1212
private final static Logger LOGGER = Logger.getLogger(IndexController.class.getName());
1313

1414
@GetMapping("/")
15-
public String greeting(Device device) {
16-
15+
public String greeting(Device device) {
16+
1717
String deviceType = "browser";
1818
String platform = "browser";
19-
20-
if (device.isNormal()) {
21-
deviceType = "browser";
22-
} else if (device.isMobile()) {
23-
deviceType = "mobile";
24-
} else if (device.isTablet()) {
25-
deviceType = "tablet";
26-
}
27-
28-
platform = device.getDevicePlatform().name();
29-
30-
if (platform.equalsIgnoreCase("UNKNOWN")) {
31-
platform = "browser";
19+
20+
if (device.isNormal()) {
21+
deviceType = "browser";
22+
} else if (device.isMobile()) {
23+
deviceType = "mobile";
24+
} else if (device.isTablet()) {
25+
deviceType = "tablet";
3226
}
33-
34-
LOGGER.info("Client Device Type: " + deviceType +", Platform: " + platform);
35-
36-
37-
return "index";
38-
}
39-
27+
28+
platform = device.getDevicePlatform().name();
29+
30+
if (platform.equalsIgnoreCase("UNKNOWN")) {
31+
platform = "browser";
32+
}
33+
34+
LOGGER.info("Client Device Type: " + deviceType + ", Platform: " + platform);
35+
36+
return "index";
37+
}
38+
4039
}

0 commit comments

Comments
 (0)