Skip to content

Commit

Permalink
Replaced numeric constructors with valueOf().
Browse files Browse the repository at this point in the history
  • Loading branch information
eriq-augustine committed Dec 2, 2021
1 parent edc9621 commit 0a7d6c6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ protected void doLearn() {
double objective = inspectLocation(weights);

// Log this location.
objectives.put(currentLocation, new Double(objective));
objectives.put(currentLocation, Double.valueOf(objective));

if (iteration == 0 || objective < bestObjective) {
bestObjective = objective;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public TableStats(int count) {

public void addColumnSelectivity(String column, double columnSelectivity) {
column = column.toUpperCase();
selectivity.put(column, new Double(columnSelectivity));
selectivity.put(column, Double.valueOf(columnSelectivity));
}

public void addColumnHistogram(String column, SelectivityHistogram histogram) {
Expand Down
6 changes: 3 additions & 3 deletions psl-core/src/test/java/org/linqs/psl/model/atom/AtomTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ public void testConversions() {
};

// Make sure to only use term values that can actually be converted into the target types (ie ints).
Term termDouble = new DoubleAttribute(new Double(1));
Term termInteger = new IntegerAttribute(new Integer(2));
Term termLong = new LongAttribute(new Long(3));
Term termDouble = new DoubleAttribute(Double.valueOf(1.0));
Term termInteger = new IntegerAttribute(Integer.valueOf(2));
Term termLong = new LongAttribute(Long.valueOf(3l));
Term termString = new StringAttribute("4");
Term termUniqueIntID = new UniqueIntID(5);
Term termUniqueStringID = new UniqueStringID("6");
Expand Down

0 comments on commit 0a7d6c6

Please sign in to comment.