Skip to content

Commit

Permalink
Merge pull request #44 from revidee/develop
Browse files Browse the repository at this point in the history
- Fixed deprecated compiler warning
  • Loading branch information
CCob authored Sep 25, 2018
2 parents a486210 + 0512c91 commit 0e887bb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.script.*;
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
import javax.script.ScriptException;
import java.io.IOException;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLEncoder;
Expand All @@ -24,9 +27,6 @@
import java.util.TimerTask;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;

import static javax.script.ScriptContext.ENGINE_SCOPE;

public class CloudFlareAuthorizer {

Expand Down Expand Up @@ -160,7 +160,7 @@ private String getJsAnswer(URL url, String responseHtml) throws ScriptException,
}

log.debug(String.format("CloudFlare JS challenge code: %s", jsCode));
return new BigDecimal(engine.eval(jsCode).toString()).setScale(10,BigDecimal.ROUND_HALF_UP).toString();
return new BigDecimal(engine.eval(jsCode).toString()).setScale(10, RoundingMode.HALF_UP).toString();
}
throw new IllegalStateException("BUG: could not find initial CF JS challenge code");
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/github/ccob/bittrex4j/dao/Fill.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ public class Fill {
double quantity;
double total;
ZonedDateTime timeStamp;
int fillId;
Integer fillId;



@JsonCreator
public Fill(@Nullable @JsonProperty("Id") @JsonAlias("I") Long id, @JsonProperty("OrderType") @JsonAlias("OT") String orderType, @Nullable @JsonProperty("FillType") @JsonAlias("F") String fillType,
@Nullable @JsonProperty("Price") @JsonAlias("P") Double price, @Nullable @JsonProperty("Rate") @JsonAlias("R")Double rate,
@JsonProperty("Quantity") @JsonAlias("Q") double quantity, @Nullable @JsonProperty("Total") @JsonAlias("t") Double total, @JsonProperty("TimeStamp") @JsonAlias("T") ZonedDateTime timeStamp,
@JsonProperty("FI") Integer fillId){
@Nullable @JsonProperty("FI") Integer fillId){

if(rate == null && price == null){
throw new IllegalArgumentException("Either rate or price should be set");
Expand Down

0 comments on commit 0e887bb

Please sign in to comment.