Hi,

I work for Intel's Microprocessor Research Lab. We use an August 4, 2000
snapshot of GNU Classpath for porting our runtime to Linux. 


Below are the bugs I have encountered and proposed fixes.



1)

The loop in ../java/util/Properties::getProperty() does not correctly search
the default of the defalut property list. "prop" must be correctly
initialized and updated, and also the method "get()" should be called on the
"prop" object.

Therefore I believe the correct code for Properties::getProperty() should
look like :



>>>>>>>>>

   public String getProperty(String key, String defaultValue) {

       Properties prop = this;

       // Eliminate tail recursion.
       do {
           String value = (String) prop.get(key);
           if (value != null)
               return value;
           prop = prop.defaults;
       } while (prop != null);

       return defaultValue;
   }

>>>>>>>>>>



2)

The functions ResourceBundle::getBundle(),  ResourceBundle::getObject() and
ResourceBundle.getString() throw MissingResourceException and calls to these
should be surrounded by a "try...catch" block if the caller function itself
does not throw it. I have added them where they were absent.


Please view attached files --- 

../java/util/Calendar.java, 
../java/util/GregorianCalendar.java, 
../java/text/DateFormatSymbols.java 
../java/text/DecimalFormatSymbols.java 

-- all of which required this modification.




Calendar.java

GregorianCalendar.java

DateFormatSymbols.java

DecimalFormatSymbols.java

Reply via email to