VirtualBox

Changeset 31095 in vbox for trunk/src/libs


Ignore:
Timestamp:
Jul 26, 2010 8:31:46 AM (14 years ago)
Author:
vboxsync
Message:

Java: few warnings shut up

Location:
trunk/src/libs/xpcom18a4/java/src/org/mozilla/xpcom
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/xpcom18a4/java/src/org/mozilla/xpcom/INIParser.java

    r29140 r31095  
    5757public class INIParser {
    5858
    59   private HashMap mSections;
     59  private HashMap<String, Properties> mSections;
    6060
    6161  /**
     
    6363   * given path. <code>aCharset</code> specifies the character encoding of
    6464   * the file.
    65    * 
     65   *
    6666   * @param aFilename path of INI file to parse
    6767   * @param aCharset character encoding of file
     
    7777   * Creates a new <code>INIParser</code> instance from the INI file at the
    7878   * given path, which is assumed to be in the <code>UTF-8</code> charset.
    79    * 
     79   *
    8080   * @param aFilename path of INI file to parse
    8181   * @throws FileNotFoundException if <code>aFilename</code> does not exist.
     
    8989   * Creates a new <code>INIParser</code> instance from the given file.
    9090   * <code>aCharset</code> specifies the character encoding of the file.
    91    * 
     91   *
    9292   * @param aFile INI file to parse
    9393   * @param aCharset character encoding of file
     
    103103   * Creates a new <code>INIParser</code> instance from the given file,
    104104   * which is assumed to be in the <code>UTF-8</code> charset.
    105    * 
     105   *
    106106   * @param aFile INI file to parse
    107107   * @throws FileNotFoundException if <code>aFile</code> does not exist.
     
    114114  /**
    115115   * Parses given INI file.
    116    * 
     116   *
    117117   * @param aFile INI file to parse
    118118   * @param aCharset character encoding of file
     
    126126    BufferedReader reader = new BufferedReader(inStream);
    127127
    128     mSections = new HashMap();
     128    mSections = new HashMap<String, Properties>();
    129129    String currSection = null;
    130130
     
    166166      }
    167167
    168       Properties props = (Properties) mSections.get(currSection);
     168      Properties props = mSections.get(currSection);
    169169      if (props == null) {
    170170        props = new Properties();
     
    179179  /**
    180180   * Returns an iterator over the section names available in the INI file.
    181    * 
     181   *
    182182   * @return an iterator over the section names
    183183   */
     
    189189   * Returns an iterator over the keys available within a section.
    190190   *
    191    * @param aSection section name whose keys are to be returned 
     191   * @param aSection section name whose keys are to be returned
    192192   * @return an iterator over section keys, or <code>null</code> if no
    193193   *          such section exists
     
    217217    }
    218218
    219     Properties props = (Properties) mSections.get(aSection);
     219    Properties props = mSections.get(aSection);
    220220    if (props == null) {
    221221      return null;
     
    233233   */
    234234  public String getString(String aSection, String aKey) {
    235     Properties props = (Properties) mSections.get(aSection);
     235    Properties props = mSections.get(aSection);
    236236    if (props == null) {
    237237      return null;
     
    242242
    243243}
    244 
  • trunk/src/libs/xpcom18a4/java/src/org/mozilla/xpcom/Mozilla.java

    r29216 r31095  
    217217    try {
    218218      URL[] urls = new URL[1];
    219       urls[0] = new File("/System/Library/Java/").toURL();
     219      urls[0] = new File("/System/Library/Java/").toURI().toURL();
    220220      ClassLoader loader = new URLClassLoader(urls);
    221       Class bundleClass = Class.forName("com.apple.cocoa.foundation.NSBundle",
    222                                         true, loader);
     221      Class<?> bundleClass = Class.forName("com.apple.cocoa.foundation.NSBundle",
     222                                           true, loader);
    223223
    224224      // Get the bundle for this app.  If this is not executing from
     
    638638    URL[] urls = new URL[1];
    639639    try {
    640       urls[0] = jar.toURL();
     640      urls[0] = jar.toURI().toURL();
    641641    } catch (MalformedURLException e) {
    642642      throw new XPCOMInitializationException(e);
     
    970970   */
    971971  public static nsISupports queryInterface(nsISupports aObject, String aIID) {
    972     ArrayList classes = new ArrayList();
     972    ArrayList<Class> classes = new ArrayList<Class>();
    973973    classes.add(aObject.getClass());
    974974
    975975    while (!classes.isEmpty()) {
    976       Class clazz = (Class) classes.remove(0);
     976      Class clazz = classes.remove(0);
    977977
    978978      // Skip over any class/interface in the "java.*" and "javax.*" domains.
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette