|
24 | 24 | import java.util.Arrays; |
25 | 25 | import java.io.File; |
26 | 26 | import java.util.concurrent.TimeoutException; |
27 | | -import java.util.regex.Matcher; |
28 | 27 | import java.util.regex.Pattern; |
29 | 28 | import com.fasterxml.jackson.databind.ObjectMapper; |
30 | 29 | import com.fasterxml.jackson.dataformat.yaml.YAMLFactory; |
@@ -71,7 +70,7 @@ public int cloneCmd(@Parameters(index = "0") String url) { |
71 | 70 | // System.out.println("\nLoading configurations.....\n"); |
72 | 71 | ObjectMapper mapper = new ObjectMapper(new YAMLFactory()); |
73 | 72 |
|
74 | | - Config config = mapper.readValue(configFile, Config.class); |
| 73 | + XConfig config = mapper.readValue(configFile, XConfig.class); |
75 | 74 |
|
76 | 75 | ide = config.ide; |
77 | 76 | clone_path = config.clone_path; |
@@ -180,7 +179,7 @@ public static void editConfig() throws Exception { |
180 | 179 | "\n-New configuration file will be created at: " + configFile.getAbsolutePath() + "\n"); |
181 | 180 | configFile.createNewFile(); |
182 | 181 | }else{ |
183 | | - Config config = new ObjectMapper(new YAMLFactory()).readValue(configFile, Config.class); |
| 182 | + XConfig config = new ObjectMapper(new YAMLFactory()).readValue(configFile, XConfig.class); |
184 | 183 | ide = config.getIde(); |
185 | 184 | clone_path = config.getClone_path(); |
186 | 185 | } |
@@ -235,7 +234,7 @@ public static void editConfig() throws Exception { |
235 | 234 | } |
236 | 235 | // ----------Now we'll write configurations to the YAML FILE------------ |
237 | 236 | ObjectMapper mapper = new ObjectMapper(new YAMLFactory()); |
238 | | - Config configuration = new Config(ide, clone_path); |
| 237 | + XConfig configuration = new XConfig(ide, clone_path); |
239 | 238 | mapper.writeValue(configFile, configuration); // Writing to YAML File |
240 | 239 |
|
241 | 240 | } catch (Exception e) { |
@@ -270,15 +269,15 @@ public static String runCommand(Path directory, String... command) throws IOExce |
270 | 269 | } |
271 | 270 |
|
272 | 271 | @RegisterForReflection |
273 | | - public static class Config { |
| 272 | + public static class XConfig { |
274 | 273 | public String ide; |
275 | 274 | public String clone_path; |
276 | 275 |
|
277 | | - public Config() { |
| 276 | + public XConfig() { |
278 | 277 | // Default constructor |
279 | 278 | } |
280 | 279 |
|
281 | | - public Config(String ide, String clone_path) { |
| 280 | + public XConfig(String ide, String clone_path) { |
282 | 281 | this.ide = ide; |
283 | 282 | this.clone_path = clone_path; |
284 | 283 |
|
|
0 commit comments