/[classpath]/classpath/java/util/ResourceBundle.java
ViewVC logotype

Diff of /classpath/java/util/ResourceBundle.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.19 by mark, Sun Dec 8 23:38:59 2002 UTC revision 1.20 by cbj, Mon Jan 6 04:00:37 2003 UTC
# Line 105  public abstract class ResourceBundle Line 105  public abstract class ResourceBundle
105     */     */
106    private Locale locale;    private Locale locale;
107    
108      private static Class resourceBundleClass;
109      private static Class securityClass;
110    
111      static {
112          try {
113              resourceBundleClass = Class.forName("java.util.ResourceBundle");
114              securityClass = Class.forName("java.util.ResourceBundle$Security");
115          } catch (ClassNotFoundException e) {
116    
117          }
118      }
119          
120    /**    /**
121     * We override SecurityManager in order to access getClassContext().     * We override SecurityManager in order to access getClassContext().
122     */     */
# Line 124  public abstract class ResourceBundle Line 136  public abstract class ResourceBundle
136      ClassLoader getCallingClassLoader()      ClassLoader getCallingClassLoader()
137      {      {
138        Class[] stack = getClassContext();        Class[] stack = getClassContext();
139        for (int i = 0; i < stack.length; i++)        for (int i = 0; i < stack.length; i++) {
140          if (stack[i] != Security.class && stack[i] != ResourceBundle.class)          if (stack[i] != securityClass && stack[i] != resourceBundleClass)
141            return stack[i].getClassLoader();            return stack[i].getClassLoader();
142          }
143    
144        return null;        return null;
145      }      }
146    }    }
# Line 221  public abstract class ResourceBundle Line 235  public abstract class ResourceBundle
235        catch (MissingResourceException ex)        catch (MissingResourceException ex)
236          {          {
237          }          }
238      throw new MissingResourceException("Key not found",  
239                                         getClass().getName(), key);      throw new MissingResourceException("Key not found", getClass().getName(), key);
240    }    }
241    
242    /**    /**
# Line 509  public abstract class ResourceBundle Line 523  public abstract class ResourceBundle
523      catch (Exception ex)      catch (Exception ex)
524        {        {
525          // ignore them all          // ignore them all
526            foundBundle = null;
527        }        }
528      if (foundBundle == null)      if (foundBundle == null)
529        {        {

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26