Revive the project
This commit is contained in:
@@ -450,7 +450,7 @@ public final class NumericWrapper extends Generic implements INumeric<NumericWra
|
||||
|
||||
void bodyToMathML(MathML element) {
|
||||
MathML e1 = element.element("mn");
|
||||
e1.appendChild(element.text(String.valueOf(new Double(((Real) content).doubleValue()))));
|
||||
e1.appendChild(element.text(String.valueOf(Double.valueOf(((Real) content).doubleValue()))));
|
||||
element.appendChild(e1);
|
||||
}
|
||||
|
||||
|
@@ -223,7 +223,7 @@ public class Monomial implements Comparable {
|
||||
for (int i = 0; i < unknown.length; i++) {
|
||||
int c = element(i);
|
||||
if (c > 0) {
|
||||
unknown[i].toMathML(element, new Integer(c));
|
||||
unknown[i].toMathML(element, Integer.valueOf(c));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -79,7 +79,7 @@ public class MutableInt extends Number implements Comparable {
|
||||
* @return the value as a Integer
|
||||
*/
|
||||
public Object getValue() {
|
||||
return new Integer(this.value);
|
||||
return Integer.valueOf(this.value);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -213,7 +213,7 @@ public class MutableInt extends Number implements Comparable {
|
||||
* @return a Integer instance containing the value from this mutable
|
||||
*/
|
||||
public Integer toInteger() {
|
||||
return new Integer(intValue());
|
||||
return Integer.valueOf(intValue());
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
@@ -10,6 +10,7 @@ import static midpcalc.Real.NumberFormat.FSE_SCI;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
|
||||
import java.math.RoundingMode;
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import midpcalc.Real;
|
||||
@@ -77,7 +78,7 @@ public class NumberFormatter {
|
||||
if (simpleFormat) {
|
||||
precision += 1;
|
||||
final int newScale = Math.max(1, (int) (precision * Math.max(1, radix / 10f)) - 1);
|
||||
value = BigDecimal.valueOf(value).setScale(newScale, BigDecimal.ROUND_HALF_UP).doubleValue();
|
||||
value = BigDecimal.valueOf(value).setScale(newScale, RoundingMode.HALF_UP).doubleValue();
|
||||
absValue = Math.abs(value);
|
||||
}
|
||||
if (simpleFormat) {
|
||||
|
@@ -118,7 +118,7 @@ public abstract class AbstractMessage implements Message {
|
||||
*/
|
||||
@Nonnull
|
||||
public String getLocalizedMessage(@Nonnull Locale locale) {
|
||||
return makeMessage(locale, getMessagePattern(locale), parameters, messageLevel);
|
||||
return makeMessage(locale, getMessagePattern(locale).replace("'", "''"), parameters, messageLevel);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
|
Reference in New Issue
Block a user