User: user57
Date: 01/09/03 13:02:03
Modified: src/main/org/jboss Version.java
Log:
o getIntProperty will return -1 instead of throwing an exception
Revision Changes Path
1.3 +10 -7 jboss/src/main/org/jboss/Version.java
Index: Version.java
===================================================================
RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/Version.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Version.java 2001/09/01 04:11:59 1.2
+++ Version.java 2001/09/03 20:02:03 1.3
@@ -17,7 +17,7 @@
* Provides access to JBoss version (and build) properties.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Jason Dillon</a>
- * @version $Revision: 1.2 $
+ * @version $Revision: 1.3 $
*/
public final class Version
{
@@ -170,20 +170,23 @@
}
/**
- * Returns a property value as an int.
+ * Returns a property value as an int.
*
- * @param name Description of Parameter
- * @return The IntProperty value
+ * @return The property value, or -1 if there was a problem converting
+ * it to an int.
*/
private int getIntProperty(final String name)
{
- return Integer.valueOf(props.getProperty(name)).intValue();
+ try {
+ return Integer.valueOf(props.getProperty(name)).intValue();
+ }
+ catch (Exception e) {
+ return -1;
+ }
}
/**
* Load the version properties from a resource.
- *
- * @return Description of the Returned Value
*/
private Properties loadProperties()
{
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development