Skip to content
Snippets Groups Projects
Commit bad4726b authored by Anders Blomdell's avatar Anders Blomdell
Browse files

Finally addinf Alfreds fixes

parent 319a5d89
No related branches found
No related tags found
No related merge requests found
......@@ -3,8 +3,8 @@
Name: java_%{BASENAME}
BuildArch: noarch
Version: 2005
Release: 2%{?dist}
Version: 2014
Release: 1%{?dist}
License: GPL
Summary: Various java classes
Group: Programming Lanuages
......
VERSION=2005
VERSION=2014
JARNAME=Regler
NAME=java_se.lth.control.Regler
TARFILE=$(NAME)-$(VERSION).tar.gz
......
......@@ -3,7 +3,7 @@
*
*
* Created: Wed Nov 25 10:27:51 1998
* LastEditDate: 1999-09-16
* LastEditDate: 2014-12-19 Alfred Theorin -- consistent decimal separator, '.' is always required for input and should thus also always be used in formatted values.
*
*/
package se.lth.control;
......@@ -171,6 +171,11 @@ public class DoubleFormat {
df.setMaximumFractionDigits(numFrac);
df.setGroupingUsed(false);
df.setDecimalSeparatorAlwaysShown(true);
DecimalFormatSymbols dfs = df.getDecimalFormatSymbols();
dfs.setDecimalSeparator('.');
df.setDecimalFormatSymbols(dfs);
return df;
}
private static final double ln10 = Math.log(10D);
......
......@@ -3,6 +3,7 @@
*
* Created: 2000-09-12
* LastEditDate: 2000-09-12
* LastEditDate: 2014-12-19 Alfred Theorin -- proper handling of InterruptedException
*
* @author
* @version
......@@ -28,7 +29,9 @@ public class ConditionVariable {
mutex.give();
try {
wait();
} catch (InterruptedException e) {}
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
}
mutex.take();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment