Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught IllegalArgumentException in ResultsPrinterSimsCDF.go2() method #22

Open
GoogleCodeExporter opened this issue May 11, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

Fatal error thrown while parsing .ser files of simulated ∆SSLS data for Uc 
statistic:

java.lang.IllegalArgumentException: Digits < 0
        at java.math.MathContext.<init>(MathContext.java:158)
        at java.math.MathContext.<init>(MathContext.java:141)
        at java.util.Formatter$FormatSpecifier.print(Formatter.java:3559)
        at java.util.Formatter$FormatSpecifier.print(Formatter.java:3484)
        at java.util.Formatter$FormatSpecifier.printFloat(Formatter.java:2736)
        at java.util.Formatter$FormatSpecifier.print(Formatter.java:2683)
        at java.util.Formatter.format(Formatter.java:2449)
        at java.util.Formatter.format(Formatter.java:2383)
        at java.lang.String.format(String.java:2781)
        at uk.ac.qmul.sbcs.evolution.sandbox.ResultsPrinterSimsCDF.go2(ResultsPrinterSimsCDF.java:654)
        at uk.ac.qmul.sbcs.evolution.sandbox.ResultsPrinterSimsCDF.main(ResultsPrinterSimsCDF.java:119)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:622)
        at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)

Relevant line in code is (ResultsPrinterSimsCDF.java:654):

    String AOSD = String.format("%.16f",avgOfSummedDiffs);

It is likely that BigDecimal avgOfSummedDiffs is either behaving oddly, or else 
null? Relevant constuctor docs are:

/*
MathContext
 public MathContext(String val)
 Constructs a new MathContext from a string. The string must be in the same format as that produced by the toString() method.
 An IllegalArgumentException is thrown if the precision section of the string is out of range (< 0) or the string is not in the format created by the toString() method.

Parameters:
   val - The string to be parsed
Throws:
  IllegalArgumentException - if the precision section is out of range or of incorrect format
  NullPointerException - if the argument is null
 */

e.g. see attached (ENSG00000105771)

Original issue reported on code.google.com by joeparke...@gmail.com on 29 Jan 2014 at 6:11

Attachments:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant