New to gradle, I have a method where codes are being changed in the jar file expecting String but getting negative numbers which throwing the exceptions. Why are the codes changing? What can be done to correct it? Any help will be appreciated.
Original code:
Browser(String browserType) {
Log.info(“Creating an instance of a “+browserType+” browser”);
switch (browserType) {
case Global.CHROME:
if (Global.REMOTE_EXECUTION){
ChromeDriverManager.getInstance().setup();
this.setDriver(new ChromeDriver());
}
break;
case Global.INTERNET_EXPLORER:
InternetExplorerDriverManager.getInstance().setup();
this.setDriver(new InternetExplorerDriver());
break;
default :
Log.info("Browser type not supported: "+browserType);
break;
}
}
Code in the jar:
Browser(String browserType) {
Log.info(“Creating an instance of a " + browserType + " browser”);
byte var3 = -1;
switch(browserType.hashCode()) {
case -1361128838:
if (browserType.equals(“chrome”)) {
var3 = 0;
}
break;
case 397430400:
if (browserType.equals(“internetexplorer”)) {
var3 = 1;
}
}
switch(var3) {
case 0:
if (!Global.REMOTE_EXECUTION) {
ChromeDriverManager.getInstance().setup();
this.setDriver(new ChromeDriver());
}
break;
case 1:
InternetExplorerDriverManager.getInstance().setup();
this.setDriver(new InternetExplorerDriver());
break;
default:
Log.info("Browser type not supported: " + browserType);
}
}