summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMario Torre <neugens@limasoftware.net>2007-10-12 18:41:04 +0000
committerMario Torre <neugens@limasoftware.net>2007-10-12 18:41:04 +0000
commit087c1673781a83274e25506da7f0502df9a89b09 (patch)
tree8f69f3f4dd48340ca2c7b70d629795027e9af3ea
parentbe0691a3ef60ab7c669e77eb356ff509d14ee0ac (diff)
downloadclasspath-087c1673781a83274e25506da7f0502df9a89b09.tar.gz
2007-10-12 Mario Torre <neugens@limasoftware.net>
* gnu/javax/swing/text/html/css/FontSize.java (mapPercent): (mapPoints): prevent a NumberFormatException when a floating point is given instead of a integer. (mapPixels): likewise. (mapPercent): likewise.
-rw-r--r--ChangeLog10
-rw-r--r--gnu/javax/swing/text/html/css/FontSize.java6
2 files changed, 12 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 0d12f3ad8..31fbc6cb1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,15 @@
2007-10-12 Mario Torre <neugens@limasoftware.net>
+ * gnu/javax/swing/text/html/css/FontSize.java (mapPercent):
+ (mapPoints): prevent a NumberFormatException when a floating point is given
+ instead of a integer.
+ (mapPixels): likewise.
+ (mapPercent): likewise.
+
+2007-10-12 Mario Torre <neugens@limasoftware.net>
+
* gnu/javax/sound/AudioSecurityManager.java: Added Copyright header.
- (Permission): added miissing javadoc.
+ (Permission): added missing javadoc.
(checkPermissions): likewise.
2007-10-12 Andrew John Hughes <gnu_andrew@member.fsf.org>
diff --git a/gnu/javax/swing/text/html/css/FontSize.java b/gnu/javax/swing/text/html/css/FontSize.java
index 2795b6784..203eadc40 100644
--- a/gnu/javax/swing/text/html/css/FontSize.java
+++ b/gnu/javax/swing/text/html/css/FontSize.java
@@ -143,7 +143,7 @@ public class FontSize
{
int end = value.indexOf("pt");
String number = value.substring(0, end);
- int intVal = Integer.parseInt(number);
+ int intVal = (int) Double.parseDouble(number);
return intVal;
}
@@ -160,7 +160,7 @@ public class FontSize
String number = value.substring(0, end);
try
{
- int intVal = Integer.parseInt(number);
+ int intVal = (int) Double.parseDouble(number);
return intVal;
}
catch (NumberFormatException ex)
@@ -177,7 +177,7 @@ public class FontSize
String number = value.substring(0, end);
try
{
- int intVal = Integer.parseInt(number);
+ int intVal = (int) Double.parseDouble(number);
return intVal * par / 100;
}
catch (NumberFormatException ex)