Changeset 31095 in vbox
- Timestamp:
- Jul 26, 2010 8:31:46 AM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 64047
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Config.kmk
r31038 r31095 4375 4375 VBOX_SEP=: 4376 4376 endif 4377 VBOX_JAVAC_OPTS = -source 1.5 -target 1.5 4377 VBOX_JAVAC_OPTS = -source 1.5 -target 1.5 -Xlint:unchecked 4378 4378 4379 4379 # -
trunk/src/VBox/Main/glue/glue-java.xsl
r31070 r31095 2384 2384 } 2385 2385 2386 @SuppressWarnings( "unchecked") 2386 2387 public static <T> T[] unwrap(Class<T> wrapperClass, List<T> thisPtrs) { 2387 2388 if (thisPtrs==null) … … 2392 2393 } 2393 2394 2395 @SuppressWarnings( "unchecked" ) 2394 2396 public static <T> T queryInterface(Object obj, String uuid, Class<T> iface) 2395 2397 { … … 2409 2411 } 2410 2412 2413 @SuppressWarnings("unchecked") 2411 2414 public static <T1 extends IUnknown,T2> T2[] unwrap2(Class<T1> wrapperClass1, Class<T2> wrapperClass2, List<T1> thisPtrs) { 2412 2415 if (thisPtrs==null || thisPtrs.size() == 0) return null; … … 3207 3210 } 3208 3211 3212 @SuppressWarnings("unchecked" ) 3209 3213 public static <T1 extends Enum <T1>, T2 extends Enum <T2>> List<T2> convertEnums(Class<T1> fromClass, 3210 3214 Class<T2> toClass, … … 3216 3220 List<T2> ret = new ArrayList<T2>(values.size()); 3217 3221 for (T1 v : values) { 3218 // static method is called with null this 3222 // static method is called with null this 3219 3223 ret.add((T2)fromValue.invoke(null, v.name())); 3220 3224 } -
trunk/src/libs/xpcom18a4/java/src/org/mozilla/xpcom/INIParser.java
r29140 r31095 57 57 public class INIParser { 58 58 59 private HashMap mSections;59 private HashMap<String, Properties> mSections; 60 60 61 61 /** … … 63 63 * given path. <code>aCharset</code> specifies the character encoding of 64 64 * the file. 65 * 65 * 66 66 * @param aFilename path of INI file to parse 67 67 * @param aCharset character encoding of file … … 77 77 * Creates a new <code>INIParser</code> instance from the INI file at the 78 78 * given path, which is assumed to be in the <code>UTF-8</code> charset. 79 * 79 * 80 80 * @param aFilename path of INI file to parse 81 81 * @throws FileNotFoundException if <code>aFilename</code> does not exist. … … 89 89 * Creates a new <code>INIParser</code> instance from the given file. 90 90 * <code>aCharset</code> specifies the character encoding of the file. 91 * 91 * 92 92 * @param aFile INI file to parse 93 93 * @param aCharset character encoding of file … … 103 103 * Creates a new <code>INIParser</code> instance from the given file, 104 104 * which is assumed to be in the <code>UTF-8</code> charset. 105 * 105 * 106 106 * @param aFile INI file to parse 107 107 * @throws FileNotFoundException if <code>aFile</code> does not exist. … … 114 114 /** 115 115 * Parses given INI file. 116 * 116 * 117 117 * @param aFile INI file to parse 118 118 * @param aCharset character encoding of file … … 126 126 BufferedReader reader = new BufferedReader(inStream); 127 127 128 mSections = new HashMap ();128 mSections = new HashMap<String, Properties>(); 129 129 String currSection = null; 130 130 … … 166 166 } 167 167 168 Properties props = (Properties)mSections.get(currSection);168 Properties props = mSections.get(currSection); 169 169 if (props == null) { 170 170 props = new Properties(); … … 179 179 /** 180 180 * Returns an iterator over the section names available in the INI file. 181 * 181 * 182 182 * @return an iterator over the section names 183 183 */ … … 189 189 * Returns an iterator over the keys available within a section. 190 190 * 191 * @param aSection section name whose keys are to be returned 191 * @param aSection section name whose keys are to be returned 192 192 * @return an iterator over section keys, or <code>null</code> if no 193 193 * such section exists … … 217 217 } 218 218 219 Properties props = (Properties)mSections.get(aSection);219 Properties props = mSections.get(aSection); 220 220 if (props == null) { 221 221 return null; … … 233 233 */ 234 234 public String getString(String aSection, String aKey) { 235 Properties props = (Properties)mSections.get(aSection);235 Properties props = mSections.get(aSection); 236 236 if (props == null) { 237 237 return null; … … 242 242 243 243 } 244 -
trunk/src/libs/xpcom18a4/java/src/org/mozilla/xpcom/Mozilla.java
r29216 r31095 217 217 try { 218 218 URL[] urls = new URL[1]; 219 urls[0] = new File("/System/Library/Java/").toUR L();219 urls[0] = new File("/System/Library/Java/").toURI().toURL(); 220 220 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); 223 223 224 224 // Get the bundle for this app. If this is not executing from … … 638 638 URL[] urls = new URL[1]; 639 639 try { 640 urls[0] = jar.toUR L();640 urls[0] = jar.toURI().toURL(); 641 641 } catch (MalformedURLException e) { 642 642 throw new XPCOMInitializationException(e); … … 970 970 */ 971 971 public static nsISupports queryInterface(nsISupports aObject, String aIID) { 972 ArrayList classes = new ArrayList();972 ArrayList<Class> classes = new ArrayList<Class>(); 973 973 classes.add(aObject.getClass()); 974 974 975 975 while (!classes.isEmpty()) { 976 Class clazz = (Class)classes.remove(0);976 Class clazz = classes.remove(0); 977 977 978 978 // Skip over any class/interface in the "java.*" and "javax.*" domains.
Note:
See TracChangeset
for help on using the changeset viewer.