Updated to exp4j v0.4.5.

This commit is contained in:
Erik C. Thauvin 2015-10-26 14:40:41 -07:00
parent c5c5e94b7b
commit edf97b3e1c
9 changed files with 24 additions and 29 deletions

View file

@ -36,8 +36,8 @@ package net.thauvin.erik.mobibot;
import com.sun.syndication.fetcher.impl.FeedFetcherCache;
import com.sun.syndication.fetcher.impl.HashMapFeedInfoCache;
import com.sun.syndication.io.FeedException;
import de.congrace.exp4j.Calculable;
import de.congrace.exp4j.ExpressionBuilder;
import net.objecthunter.exp4j.Expression;
import net.objecthunter.exp4j.ExpressionBuilder;
import org.apache.commons.cli.*;
import org.apache.commons.logging.impl.Log4JLogger;
import org.apache.log4j.Level;
@ -850,8 +850,8 @@ public class Mobibot extends PircBot
try
{
final Calculable calc = new ExpressionBuilder(args).build();
send(channel, args.replaceAll(" ", "") + " = " + decimalFormat.format(calc.calculate()));
final Expression calc = new ExpressionBuilder(args).build();
send(channel, args.replaceAll(" ", "") + " = " + decimalFormat.format(calc.evaluate()));
}
catch (Exception e)
{
@ -1050,7 +1050,6 @@ public class Mobibot extends PircBot
}
}
/**
* Returns indented and bold help string.
*
@ -1060,7 +1059,7 @@ public class Mobibot extends PircBot
*/
private String helpIndent(String help)
{
return helpIndent(help, true);
return helpIndent(help, true);
}
/**

View file

@ -1,5 +1,5 @@
/* Created by JReleaseInfo AntTask from Open Source Competence Group */
/* Creation date Mon Aug 31 12:19:55 PDT 2015 */
/* Creation date Mon Oct 26 14:39:18 PDT 2015 */
package net.thauvin.erik.mobibot;
import java.util.Date;
@ -20,11 +20,11 @@ public class ReleaseInfo {
}
/** buildDate (set during build process to 1441048795735L). */
private static final Date buildDate = new Date(1441048795735L);
/** buildDate (set during build process to 1445895558361L). */
private static final Date buildDate = new Date(1445895558361L);
/**
* Get buildDate (set during build process to Mon Aug 31 12:19:55 PDT 2015).
* Get buildDate (set during build process to Mon Oct 26 14:39:18 PDT 2015).
* @return Date buildDate
*/
public static Date getBuildDate() { return buildDate; }