| package java.util; |
| import java.io.BufferedInputStream; |
| import java.io.IOException; |
| import java.io.InputStream; |
| import java.lang.ref.Reference; |
| import java.lang.ref.ReferenceQueue; |
| import java.lang.ref.SoftReference; |
| import java.lang.ref.WeakReference; |
| import java.net.JarURLConnection; |
| import java.net.URL; |
| import java.net.URLConnection; |
| import java.security.AccessController; |
| import java.security.PrivilegedAction; |
| import java.security.PrivilegedActionException; |
| import java.security.PrivilegedExceptionAction; |
| import java.util.concurrent.ConcurrentHashMap; |
| import java.util.concurrent.ConcurrentMap; |
| import java.util.jar.JarEntry; |
| public abstract |
| class ResourceBundle |
| { |
| private static final |
| int INITIAL_CACHE_SIZE |
| //QC Intervals : (int) java.util.ResourceBundle.INITIAL_CACHE_SIZE : Interval 0 : 32 : 32 |
| =32 |
| ; |
| private static final |
| ResourceBundle NONEXISTENT_BUNDLE |
| //QC Intervals :(Enumeration<String>) java.util.ResourceBundle.NONEXISTENT_BUNDLE.getKeys : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (Object) java.util.ResourceBundle.NONEXISTENT_BUNDLE.handleGetObject: Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (String) java.util.ResourceBundle.NONEXISTENT_BUNDLE.toString : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.NONEXISTENT_BUNDLE : Interval 0 : new : new |
| =new ResourceBundle(){public Enumeration<String > getKeys(){return null ;}protected Object handleGetObject(String key){return null ;}public String toString(){return "NONEXISTENT_BUNDLE";}} |
| ; |
| private static final |
| ConcurrentMap<CacheKey ,BundleReference > cacheList |
| //QC Intervals :(ConcurrentMap<CacheKey,BundleReference>) java.util.ResourceBundle.cacheList : Interval 0 : new : new |
| =new ConcurrentHashMap<CacheKey ,BundleReference > (INITIAL_CACHE_SIZE) |
| ; |
| private static final |
| ConcurrentMap<CacheKey ,Thread > underConstruction |
| //QC Intervals :(ConcurrentMap<CacheKey,Thread>) java.util.ResourceBundle.underConstruction : Interval 0 : new : new |
| =new ConcurrentHashMap<CacheKey ,Thread > () |
| ; |
| private static final |
| ReferenceQueue referenceQueue |
| //QC Intervals :(ReferenceQueue) java.util.ResourceBundle.referenceQueue : Interval 0 : new : new |
| =new ReferenceQueue() |
| ; |
| protected |
| ResourceBundle parent |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.parent : Interval 0 : null : null |
| =null |
| ; |
| private |
| Locale locale |
| //QC Intervals : (Locale) java.util.ResourceBundle.locale : Interval 0 : null : null |
| =null |
| ; |
| private |
| String name |
| //QC Intervals : (String) java.util.ResourceBundle.name : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ; |
| private volatile |
| boolean expired |
| //QC Intervals : (boolean) java.util.ResourceBundle.expired : Interval 0 : false : true |
| ; |
| private volatile |
| CacheKey cacheKey |
| //QC Intervals :(CacheKey) java.util.ResourceBundle.cacheKey : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ; |
| private volatile |
| Set<String > keySet |
| //QC Intervals :(Set<String>) java.util.ResourceBundle.keySet : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ; |
| public |
| ResourceBundle |
| ( |
| ) |
| { |
| } |
| public final |
| String getString |
| //QC Intervals : (String) java.util.ResourceBundle.getString : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ( |
| String key |
| ) |
| //QC Intervals : (String) java.util.ResourceBundle.getString.key : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| return (String )getObject(key); |
| //QC Intervals : (String) java.util.ResourceBundle.getString |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (String) java.util.ResourceBundle.getString.return : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| } |
| public final |
| String[] getStringArray |
| //QC Intervals :(String[]) java.util.ResourceBundle.getStringArray : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ( |
| String key |
| ) |
| //QC Intervals : (String) java.util.ResourceBundle.getStringArray.key : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| return (String[] )getObject(key); |
| //QC Intervals : (String) java.util.ResourceBundle.getStringArray |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals :(String[]) java.util.ResourceBundle.getStringArray.return : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| } |
| public final |
| Object getObject |
| //QC Intervals : (Object) java.util.ResourceBundle.getObject : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ( |
| String key |
| ) |
| //QC Intervals : (String) java.util.ResourceBundle.getObject.key : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| Object obj=handleGetObject(key); |
| //QC Intervals : (String) java.util.ResourceBundle.getObject |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (Object) java.util.ResourceBundle.getObject.obj : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| if (obj==null ) |
| //QC Intervals : (Object) java.util.ResourceBundle.getObject.obj : Interval 0 : null : null |
| { |
| if (parent!=null ) |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.getObject |
| : Interval 0 : new : new |
| { |
| obj=parent.getObject(key); |
| //QC Intervals : (String) java.util.ResourceBundle.ResourceBundle |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (Object) java.util.ResourceBundle.getObject.obj : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //assignation |
| } |
| if (obj==null ) |
| //QC Intervals : (Object) java.util.ResourceBundle.getObject.obj : Interval 0 : null : null |
| throw new MissingResourceException(("Can't find resource for bundle "+(this.getClass().getName()+(" , key "+key))),this.getClass().getName(),key); |
| //QC Intervals : (Object) java.util.ResourceBundle.getObject.obj : Interval 0 : new : new |
| } |
| //QC Intervals : (Object) java.util.ResourceBundle.getObject.obj : Interval 0 : new : new |
| return obj; |
| //QC Intervals : (Object) java.util.ResourceBundle.getObject.return : Interval 0 : new : new |
| } |
| public |
| Locale getLocale |
| //QC Intervals : (Locale) java.util.ResourceBundle.getLocale : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ( |
| ) |
| { |
| return locale; |
| //QC Intervals : (Locale) java.util.ResourceBundle.getLocale.return : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| } |
| private static |
| ClassLoader getLoader |
| //QC Intervals :(ClassLoader) java.util.ResourceBundle.getLoader : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ( |
| ) |
| { |
| Class[] stack=getClassContext(); |
| //QC Intervals : (Class[]) java.util.ResourceBundle.getLoader.stack : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| Class c=stack[2] ; |
| //QC Intervals : (Class) java.util.ResourceBundle.getLoader.c : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ClassLoader cl=(c==null )?null :c.getClassLoader(); |
| //QC Intervals :(ClassLoader) java.util.ResourceBundle.getLoader.cl : Interval 0 : null : null |
| if (cl==null ) |
| //QC Intervals :(ClassLoader) java.util.ResourceBundle.getLoader.cl : Interval 0 : null : null |
| { |
| cl=RBClassLoader.INSTANCE; |
| //QC Intervals :(ClassLoader) java.util.ResourceBundle.getLoader.cl : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //assignation |
| } |
| return cl; |
| //QC Intervals :(ClassLoader) java.util.ResourceBundle.getLoader.return : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| } |
| private static native |
| Class[] getClassContext |
| //QC Intervals : (Class[]) java.util.ResourceBundle.getClassContext : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ( |
| ) |
| ; |
| private static |
| class RBClassLoader |
| extends ClassLoader |
| { |
| private static final |
| RBClassLoader INSTANCE |
| //QC Intervals :(RBClassLoader) java.util.ResourceBundle.RBClassLoader.INSTANCE.run : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals :(PrivilegedAction) java.security.AccessController |
| 1 : Interval 0 : new : new |
| //QC Intervals :(RBClassLoader) java.util.ResourceBundle.RBClassLoader.INSTANCE : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| =AccessController.doPrivileged(new PrivilegedAction<RBClassLoader > (){public RBClassLoader run(){return new RBClassLoader();}}) |
| ; |
| private static final |
| ClassLoader loader |
| //QC Intervals :(ClassLoader) java.util.ResourceBundle.RBClassLoader.loader : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| =ClassLoader.getSystemClassLoader() |
| ; |
| private |
| RBClassLoader |
| ( |
| ) |
| { |
| } |
| public |
| Class<?> loadClass |
| //QC Intervals :(Class<?>) java.util.ResourceBundle.RBClassLoader.loadClass : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ( |
| String name |
| ) |
| //QC Intervals : (String) java.util.ResourceBundle.RBClassLoader.loadClass.name : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| throws ClassNotFoundException |
| { |
| if (loader!=null ) |
| //QC Intervals :(ClassLoader) java.util.ResourceBundle.RBClassLoader.loadClass |
| : Interval 0 : new : new |
| { |
| return loader.loadClass(name); |
| //QC Intervals : (String) java.lang.ClassLoader |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals :(Class<?>) java.util.ResourceBundle.RBClassLoader.loadClass.return: Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| } |
| //QC Intervals :(ClassLoader) java.util.ResourceBundle.RBClassLoader.loadClass |
| : Interval 0 : null : null |
| return Class.forName(name); |
| //QC Intervals :(Class<?>) java.util.ResourceBundle.RBClassLoader.loadClass.return: Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| } |
| public |
| URL getResource |
| //QC Intervals : (URL) java.util.ResourceBundle.RBClassLoader.getResource : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ( |
| String name |
| ) |
| //QC Intervals : (String) java.util.ResourceBundle.RBClassLoader.getResource.name: Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| if (loader!=null ) |
| //QC Intervals :(ClassLoader) java.util.ResourceBundle.RBClassLoader.getResource |
| : Interval 0 : new : new |
| { |
| return loader.getResource(name); |
| //QC Intervals : (String) java.lang.ClassLoader |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (URL) java.util.ResourceBundle.RBClassLoader.getResource.return: Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| } |
| //QC Intervals :(ClassLoader) java.util.ResourceBundle.RBClassLoader.getResource |
| : Interval 0 : null : null |
| return ClassLoader.getSystemResource(name); |
| //QC Intervals : (String) java.lang.ClassLoader |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (URL) java.util.ResourceBundle.RBClassLoader.getResource.return: Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| } |
| public |
| InputStream getResourceAsStream |
| //QC Intervals :(InputStream) java.util.ResourceBundle.RBClassLoader.getResourceAsStream: Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ( |
| String name |
| ) |
| //QC Intervals : (String) java.util.ResourceBundle.RBClassLoader.getResourceAsStream.name: Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| if (loader!=null ) |
| //QC Intervals :(ClassLoader) java.util.ResourceBundle.RBClassLoader.getResourceAsStream |
| : Interval 0 : new : new |
| { |
| return loader.getResourceAsStream(name); |
| //QC Intervals : (String) java.lang.ClassLoader |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals :(InputStream) java.util.ResourceBundle.RBClassLoader.getResourceAsStream.return: Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| } |
| //QC Intervals :(ClassLoader) java.util.ResourceBundle.RBClassLoader.getResourceAsStream |
| : Interval 0 : null : null |
| return ClassLoader.getSystemResourceAsStream(name); |
| //QC Intervals : (String) java.lang.ClassLoader |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals :(InputStream) java.util.ResourceBundle.RBClassLoader.getResourceAsStream.return: Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| } |
| } |
| protected |
| void setParent |
| ( |
| ResourceBundle parent |
| ) |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.setParent.parent : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| assert parent!=NONEXISTENT_BUNDLE; |
| this.parent=parent; |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle |
| : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //assignation |
| } |
| private static final |
| class CacheKey |
| implements Cloneable |
| { |
| private |
| String name |
| //QC Intervals : (String) java.util.ResourceBundle.CacheKey.name : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ; |
| private |
| Locale locale |
| //QC Intervals : (Locale) java.util.ResourceBundle.CacheKey.locale : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ; |
| private |
| LoaderReference loaderRef |
| //QC Intervals :(LoaderReference) java.util.ResourceBundle.CacheKey.loaderRef : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ; |
| private |
| String format |
| //QC Intervals : (String) java.util.ResourceBundle.CacheKey.format : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ; |
| private volatile |
| long loadTime |
| //QC Intervals : (long) java.util.ResourceBundle.CacheKey.loadTime : Interval 0 : -9.2233720368548E+18 : 9.2233720368548E+18 |
| ; |
| private volatile |
| long expirationTime |
| //QC Intervals : (long) java.util.ResourceBundle.CacheKey.expirationTime : Interval 0 : -9.2233720368548E+18 : 9.2233720368548E+18 |
| ; |
| private |
| Throwable cause |
| //QC Intervals :(Throwable) java.util.ResourceBundle.CacheKey.cause : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ; |
| private |
| int hashCodeCache |
| //QC Intervals : (int) java.util.ResourceBundle.CacheKey.hashCodeCache : Interval 0 : -2147483647 : 2147483647 |
| ; |
| CacheKey |
| ( |
| String baseName |
| , |
| Locale locale |
| , |
| ClassLoader loader |
| ) |
| //QC Intervals : (String) java.util.ResourceBundle.CacheKey.CacheKey.baseName : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (Locale) java.util.ResourceBundle.CacheKey.CacheKey.locale : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals :(ClassLoader) java.util.ResourceBundle.CacheKey.CacheKey.loader : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| this.name=baseName; |
| //QC Intervals : (rien |
| ) java.util.ResourceBundle.CacheKey.CacheKey : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //assignation |
| this.locale=locale; |
| //QC Intervals : (String) java.util.ResourceBundle.CacheKey.name |
| Locale@LOCALISATION@java.util.ResourceBundle.CacheKey |
| : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //assignation |
| if (loader==null ) |
| //QC Intervals :(ClassLoader) java.util.ResourceBundle.CacheKey.CacheKey.loader : Interval 0 : null : null |
| { |
| this.loaderRef=null ; |
| //QC Intervals :(LoaderReference) java.util.ResourceBundle.CacheKey |
| : Interval 0 : null : null |
| //assignation |
| } |
| else |
| //QC Intervals :(ClassLoader) java.util.ResourceBundle.CacheKey.CacheKey.loader : Interval 0 : new : new |
| { |
| loaderRef=(new LoaderReference(loader,referenceQueue,this)); |
| //QC Intervals :(LoaderReference) java.util.ResourceBundle.CacheKey.CacheKey |
| : Interval 0 : new : new |
| //assignation |
| } |
| calculateHashCode(); |
| //type of the function/method : void |
| } |
| String getName |
| //QC Intervals : (String) java.util.ResourceBundle.CacheKey.getName : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ( |
| ) |
| { |
| return name; |
| //QC Intervals : (String) java.util.ResourceBundle.CacheKey.getName.return : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| } |
| CacheKey setName |
| //QC Intervals :(CacheKey) java.util.ResourceBundle.CacheKey.setName : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ( |
| String baseName |
| ) |
| //QC Intervals : (String) java.util.ResourceBundle.CacheKey.setName.baseName : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| if (!this.name.equals(baseName)) |
| //QC Intervals :(boolean;Object) java.util.ResourceBundle.CacheKey.equals |
| : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| this.name=baseName; |
| //QC Intervals : (String) java.util.ResourceBundle.CacheKey.name |
| : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //assignation |
| calculateHashCode(); |
| //type of the function/method : void |
| } |
| return this; |
| //QC Intervals :(CacheKey) java.util.ResourceBundle.CacheKey.setName.return : Interval 0 : new : new |
| } |
| Locale getLocale |
| //QC Intervals : (Locale) java.util.ResourceBundle.CacheKey.getLocale : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ( |
| ) |
| { |
| return locale; |
| //QC Intervals : (Locale) java.util.ResourceBundle.CacheKey.getLocale.return : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| } |
| CacheKey setLocale |
| //QC Intervals :(CacheKey) java.util.ResourceBundle.CacheKey.setLocale : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ( |
| Locale locale |
| ) |
| //QC Intervals : (Locale) java.util.ResourceBundle.CacheKey.setLocale.locale : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| if (!this.locale.equals(locale)) |
| //QC Intervals :(boolean;Object) java.util.Locale.equals |
| : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| this.locale=locale; |
| //QC Intervals : (Locale) java.util.ResourceBundle.CacheKey |
| : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //assignation |
| calculateHashCode(); |
| //type of the function/method : void |
| } |
| return this; |
| //QC Intervals :(CacheKey) java.util.ResourceBundle.CacheKey.setLocale.return : Interval 0 : new : new |
| } |
| ClassLoader getLoader |
| //QC Intervals :(ClassLoader) java.util.ResourceBundle.CacheKey.getLoader : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ( |
| ) |
| { |
| return (loaderRef!=null )?loaderRef.get():null ; |
| //QC-CWE476 or QCerrorNPE null pointer reference on loaderRef (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals :(ClassLoader) java.util.ResourceBundle.CacheKey.getLoader.return : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| } |
| public |
| boolean equals |
| //QC Intervals : (boolean) java.util.ResourceBundle.CacheKey.equals : Interval 0 : false : true |
| ( |
| Object other |
| ) |
| //QC Intervals : (Object) java.util.ResourceBundle.CacheKey.equals.other : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| if (this==other) |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.this : Interval 0 : new : new |
| //QC Intervals : (Object) java.util.ResourceBundle.CacheKey.equals.other : Interval 0 : new : new |
| { |
| return true; |
| //QC Intervals : (boolean) java.util.ResourceBundle.CacheKey.equals.return : Interval 0 : true : true |
| } |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.this : Interval 0 : new : new |
| //QC Intervals : (Object) java.util.ResourceBundle.CacheKey.equals.other : Interval 0 : null : null |
| try |
| { |
| final CacheKey otherEntry=(CacheKey )other; |
| //QC Intervals :(CacheKey) java.util.ResourceBundle.CacheKey.equals.otherEntry : Interval 0 : null : null |
| if (hashCodeCache!=otherEntry.hashCodeCache) |
| //QC-CWE476 or QCerrorNPE null pointer reference on otherEntry (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals : (int) java.util.ResourceBundle.CacheKey.hashCodeCache |
| : Interval 0 : -2147483647 : -2147483647 |
| //QC : Interval 1 : -2147483646 : 2147483646 |
| //QC : Interval 2 : 2147483647 : 2147483647 |
| //QC Intervals : (int) java.util.ResourceBundle.CacheKey.hashCodeCache |
| : Interval 0 : -2147483646 : -2147483646 |
| //QC : Interval 1 : -2147483645 : 2147483645 |
| //QC : Interval 2 : 2147483646 : 2147483646 |
| //QC : Interval 3 : 2147483647 : 2147483647 |
| //QC : Interval 4 : -2147483647 : -2147483647 |
| { |
| return false; |
| //QC Intervals : (boolean) java.util.ResourceBundle.CacheKey.equals.return : Interval 0 : false : false |
| } |
| //QC-CWE476 or QCerrorNPE null pointer reference on otherEntry (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals : (int) java.util.ResourceBundle.CacheKey.hashCodeCache |
| : Interval 0 : -2147483647 : -2147483647 |
| //QC : Interval 1 : -2147483646 : -2147483646 |
| //QC : Interval 2 : -2147483645 : -2147483645 |
| //QC : Interval 3 : 2147483645 : 2147483645 |
| //QC : Interval 4 : 2147483646 : 2147483646 |
| //QC : Interval 5 : 2147483647 : 2147483647 |
| //QC Intervals : (int) java.util.ResourceBundle.CacheKey.hashCodeCache |
| : Interval 0 : -2147483647 : -2147483647 |
| //QC : Interval 1 : -2147483646 : -2147483646 |
| //QC : Interval 2 : -2147483645 : -2147483645 |
| //QC : Interval 3 : 2147483645 : 2147483645 |
| //QC : Interval 4 : 2147483646 : 2147483646 |
| //QC : Interval 5 : 2147483647 : 2147483647 |
| if (!name.equals(otherEntry.name)) |
| //QC-CWE476 or QCerrorNPE null pointer reference on otherEntry (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals : (Object) java.util.ResourceBundle.CacheKey.equals |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (boolean) java.util.ResourceBundle.CacheKey.equals |
| : Interval 0 : false : false |
| { |
| return false; |
| //QC Intervals : (boolean) java.util.ResourceBundle.CacheKey.equals.return : Interval 0 : false : false |
| } |
| //QC Intervals : (boolean) java.util.ResourceBundle.CacheKey.equals |
| : Interval 0 : true : true |
| if (!locale.equals(otherEntry.locale)) |
| //QC-CWE476 or QCerrorNPE null pointer reference on otherEntry (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals : (Object) java.util.Locale.equals |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (boolean) java.util.Locale.equals |
| : Interval 0 : false : false |
| { |
| return false; |
| //QC Intervals : (boolean) java.util.ResourceBundle.CacheKey.equals.return : Interval 0 : false : false |
| } |
| //QC Intervals : (boolean) java.util.Locale.equals |
| : Interval 0 : true : true |
| if (loaderRef==null ) |
| //QC Intervals :(LoaderReference) java.util.ResourceBundle.CacheKey.equals |
| : Interval 0 : null : null |
| { |
| return otherEntry.loaderRef==null ; |
| //QC-CWE476 or QCerrorNPE null pointer reference on otherEntry (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals : (boolean) java.util.ResourceBundle.CacheKey.equals.return : Interval 0 : true : true |
| } |
| //QC Intervals :(LoaderReference) java.util.ResourceBundle.CacheKey.equals |
| : Interval 0 : new : new |
| ClassLoader loader=loaderRef.get(); |
| //QC Intervals :(ClassLoader) java.util.ResourceBundle.CacheKey.equals.loader : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| return (otherEntry.loaderRef!=null )&&((loader!=null )&&(loader==otherEntry.loaderRef.get())); |
| //QC-CWE476 or QCerrorNPE null pointer reference on otherEntry (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals : (boolean) java.util.ResourceBundle.CacheKey.equals.return : Interval 0 : false : false |
| } |
| catch ( |
| NullPointerException e |
| ) |
| //QC Intervals :(NullPointerException) java.util.ResourceBundle.CacheKey.equals.e : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| } |
| //QC-CWE390 Detection of error condition without action (see http://cwe.mitre.org/data/definitions/390.html) |
| catch ( |
| ClassCastException e |
| ) |
| //QC Intervals :(NullPointerException) java.util.ResourceBundle.CacheKey.equals.e : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| } |
| //QC-CWE390 Detection of error condition without action (see http://cwe.mitre.org/data/definitions/390.html) |
| return false; |
| //QC Intervals : (boolean) java.util.ResourceBundle.CacheKey.equals.return : Interval 0 : false : false |
| } |
| public |
| int hashCode |
| //QC Intervals : (int) java.util.ResourceBundle.CacheKey.hashCode : Interval 0 : -2147483647 : 2147483647 |
| ( |
| ) |
| { |
| return hashCodeCache; |
| //QC Intervals : (int) java.util.ResourceBundle.CacheKey.hashCode.return : Interval 0 : -2147483647 : 2147483647 |
| } |
| private |
| void calculateHashCode |
| ( |
| ) |
| { |
| hashCodeCache=(name.hashCode()<<3); |
| //QC Intervals : (int) java.util.ResourceBundle.CacheKey.hashCodeCache |
| : Interval 0 : -8 : 8 |
| //assignation |
| hashCodeCache^=locale.hashCode(); |
| //QC Intervals : (int) java.util.ResourceBundle.CacheKey.hashCodeCache |
| : Interval 0 : -2147483647 : 8 |
| //assignation |
| ClassLoader loader=getLoader(); |
| //QC Intervals :(ClassLoader) java.util.ResourceBundle.CacheKey.calculateHashCode.loader: Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| if (loader!=null ) |
| //QC Intervals :(ClassLoader) java.util.ResourceBundle.CacheKey.calculateHashCode.loader: Interval 0 : new : new |
| { |
| hashCodeCache^=loader.hashCode(); |
| //QC Intervals : (int) java.util.ResourceBundle.CacheKey.hashCodeCache |
| : Interval 0 : -2147483647 : 8 |
| //assignation |
| } |
| } |
| public |
| Object clone |
| //QC Intervals : (Object) java.util.ResourceBundle.CacheKey.clone : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ( |
| ) |
| { |
| try |
| { |
| CacheKey clone=(CacheKey )super.clone(); |
| //QC Intervals : (Object) java.util.ResourceBundle.CacheKey.clone : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| if (loaderRef!=null ) |
| //QC Intervals :(LoaderReference) java.util.ResourceBundle.CacheKey.clone |
| : Interval 0 : new : new |
| { |
| clone.loaderRef=(new LoaderReference(loaderRef.get(),referenceQueue,clone)); |
| //QC Intervals :(LoaderReference) java.util.ResourceBundle.CacheKey.CacheKey |
| : Interval 0 : new : new |
| //assignation |
| } |
| clone.cause=null ; |
| //QC Intervals :(Throwable) java.util.ResourceBundle.CacheKey.CacheKey |
| : Interval 0 : null : null |
| //assignation |
| return clone; |
| //QC Intervals : (Object) java.util.ResourceBundle.CacheKey.clone.return : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| } |
| catch ( |
| CloneNotSupportedException e |
| ) |
| //QC Intervals :(CloneNotSupportedException) java.util.ResourceBundle.CacheKey.clone.e : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| throw new InternalError(); |
| } |
| } |
| String getFormat |
| //QC Intervals : (String) java.util.ResourceBundle.CacheKey.getFormat : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ( |
| ) |
| { |
| return format; |
| //QC Intervals : (String) java.util.ResourceBundle.CacheKey.getFormat.return : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| } |
| void setFormat |
| ( |
| String format |
| ) |
| //QC Intervals : (String) java.util.ResourceBundle.CacheKey.setFormat.format : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| this.format=format; |
| //QC Intervals : (String) java.util.ResourceBundle.CacheKey.format |
| : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //assignation |
| } |
| private |
| void setCause |
| ( |
| Throwable cause |
| ) |
| //QC Intervals :(Throwable) java.util.ResourceBundle.CacheKey.setCause.cause : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| if (this.cause==null ) |
| //QC Intervals :(Throwable) java.util.ResourceBundle.CacheKey |
| : Interval 0 : null : null |
| { |
| this.cause=cause; |
| //QC Intervals :(Throwable) java.util.ResourceBundle.CacheKey |
| : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //assignation |
| } |
| else |
| //QC Intervals :(Throwable) java.util.ResourceBundle.CacheKey |
| : Interval 0 : new : new |
| { |
| if (this.cause instanceof ClassNotFoundException ) |
| //QC Intervals : (boolean) instanceof : Interval 0 : true : true |
| { |
| this.cause=cause; |
| //QC Intervals :(Throwable) java.util.ResourceBundle.CacheKey |
| : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //assignation |
| } |
| } |
| } |
| private |
| Throwable getCause |
| //QC Intervals :(Throwable) java.util.ResourceBundle.CacheKey.getCause : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ( |
| ) |
| { |
| return cause; |
| //QC Intervals :(Throwable) java.util.ResourceBundle.CacheKey.getCause.return : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| } |
| public |
| String toString |
| //QC Intervals : (String) java.util.ResourceBundle.CacheKey.toString : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ( |
| ) |
| { |
| String l=locale.toString(); |
| //QC Intervals : (String) java.util.ResourceBundle.CacheKey.toString.l : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| if (l.length()==0) |
| //QC-CWE476 or QCerrorNPE null pointer reference on l (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals : (String) java.util.ResourceBundle.CacheKey.toString.l |
| : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| if (locale.getVariant().length()!=0) |
| //QC-CWE570 and QCerrorCNT Condition NEVER true : no interval for variable (String)java.util.Locale.getVariant |
| { |
| l=("__"+locale.getVariant()); |
| //QC Intervals : (String) java.util.ResourceBundle.CacheKey.toString.l : Interval 0 : __null : __null |
| //QC : Interval 1 : __new : __new |
| //assignation |
| } |
| else |
| //QC Intervals : (String) java.util.Locale.getVariant |
| : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| l="\"\""; |
| //QC Intervals : (String) java.util.ResourceBundle.CacheKey.toString.l : Interval 0 : "" : "" |
| //assignation |
| } |
| } |
| return "CacheKey [ "+name+" , lc = "+l+" , ldr = "+getLoader()+" ( format = "+format+" ) ] "; |
| 'QC-- Sur varlocalez39 Nb intervalles b 10 plafonné à 5 |
| //QC Intervals : (String) java.util.ResourceBundle.CacheKey.toString.return : Interval 0 : CacheKey : CacheKey |
| } |
| } |
| private static |
| interface CacheKeyReference |
| { |
| public |
| CacheKey getCacheKey |
| //QC Intervals :(CacheKey) java.util.ResourceBundle.CacheKeyReference.getCacheKey : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ( |
| ) |
| ; |
| } |
| private static final |
| class LoaderReference |
| extends WeakReference<ClassLoader > |
| implements CacheKeyReference |
| { |
| private |
| CacheKey cacheKey |
| //QC Intervals :(CacheKey) java.util.ResourceBundle.LoaderReference.cacheKey : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ; |
| LoaderReference |
| ( |
| ClassLoader referent |
| , |
| ReferenceQueue q |
| , |
| CacheKey key |
| ) |
| //QC Intervals :(ClassLoader) java.util.ResourceBundle.LoaderReference.LoaderReference.referent: Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals :(ReferenceQueue) java.util.ResourceBundle.LoaderReference.LoaderReference.q: Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals :(CacheKey) java.util.ResourceBundle.LoaderReference.LoaderReference.key: Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| super(referent,q); |
| //type of the function/method : WeakReference |
| cacheKey=key; |
| //QC Intervals :(CacheKey) java.util.ResourceBundle.LoaderReference.LoaderReference |
| : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //assignation |
| } |
| public |
| CacheKey getCacheKey |
| //QC Intervals :(CacheKey) java.util.ResourceBundle.LoaderReference.getCacheKey : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ( |
| ) |
| { |
| return cacheKey; |
| //QC Intervals :(CacheKey) java.util.ResourceBundle.LoaderReference.getCacheKey.return: Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| } |
| } |
| private static final |
| class BundleReference |
| extends SoftReference<ResourceBundle > |
| implements CacheKeyReference |
| { |
| private |
| CacheKey cacheKey |
| //QC Intervals :(CacheKey) java.util.ResourceBundle.BundleReference.cacheKey : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ; |
| BundleReference |
| ( |
| ResourceBundle referent |
| , |
| ReferenceQueue q |
| , |
| CacheKey key |
| ) |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.BundleReference.BundleReference.referent: Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals :(ReferenceQueue) java.util.ResourceBundle.BundleReference.BundleReference.q: Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals :(CacheKey) java.util.ResourceBundle.BundleReference.BundleReference.key: Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| super(referent,q); |
| //type of the function/method : SoftReference |
| cacheKey=key; |
| //QC Intervals :(CacheKey) java.util.ResourceBundle.BundleReference.BundleReference |
| : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //assignation |
| } |
| public |
| CacheKey getCacheKey |
| //QC Intervals :(CacheKey) java.util.ResourceBundle.BundleReference.getCacheKey : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ( |
| ) |
| { |
| return cacheKey; |
| //QC Intervals :(CacheKey) java.util.ResourceBundle.BundleReference.getCacheKey.return: Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| } |
| } |
| public static final |
| ResourceBundle getBundle |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.getBundle : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ( |
| String baseName |
| ) |
| //QC Intervals : (String) java.util.ResourceBundle.getBundle.baseName : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| return getBundleImpl(baseName,Locale.getDefault(),getLoader(),Control.INSTANCE); |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.getBundle.return : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| } |
| public static final |
| ResourceBundle getBundle |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.getBundle : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ( |
| String baseName |
| , |
| Control control |
| ) |
| //QC Intervals : (String) java.util.ResourceBundle.getBundle.baseName : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (Control) java.util.ResourceBundle.getBundle.control : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| return getBundleImpl(baseName,Locale.getDefault(),getLoader(),control); |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.getBundle.return : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| } |
| public static final |
| ResourceBundle getBundle |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.getBundle : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ( |
| String baseName |
| , |
| Locale locale |
| ) |
| //QC Intervals : (String) java.util.ResourceBundle.getBundle.baseName : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (Locale) java.util.ResourceBundle.getBundle.locale : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| return getBundleImpl(baseName,locale,getLoader(),Control.INSTANCE); |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.getBundle.return : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| } |
| public static final |
| ResourceBundle getBundle |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.getBundle : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ( |
| String baseName |
| , |
| Locale targetLocale |
| , |
| Control control |
| ) |
| //QC Intervals : (String) java.util.ResourceBundle.getBundle.baseName : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (Locale) java.util.ResourceBundle.getBundle.targetLocale : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (Control) java.util.ResourceBundle.getBundle.control : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| return getBundleImpl(baseName,targetLocale,getLoader(),control); |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.getBundle.return : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| } |
| public static |
| ResourceBundle getBundle |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.getBundle : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ( |
| String baseName |
| , |
| Locale locale |
| , |
| ClassLoader loader |
| ) |
| //QC Intervals : (String) java.util.ResourceBundle.getBundle.baseName : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (Locale) java.util.ResourceBundle.getBundle.locale : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals :(ClassLoader) java.util.ResourceBundle.getBundle.loader : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| if (loader==null ) |
| //QC Intervals :(ClassLoader) java.util.ResourceBundle.getBundle.loader : Interval 0 : null : null |
| { |
| throw new NullPointerException(); |
| } |
| //QC Intervals :(ClassLoader) java.util.ResourceBundle.getBundle.loader : Interval 0 : new : new |
| return getBundleImpl(baseName,locale,loader,Control.INSTANCE); |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.getBundle.return : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| } |
| public static |
| ResourceBundle getBundle |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.getBundle : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ( |
| String baseName |
| , |
| Locale targetLocale |
| , |
| ClassLoader loader |
| , |
| Control control |
| ) |
| //QC Intervals : (String) java.util.ResourceBundle.getBundle.baseName : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (Locale) java.util.ResourceBundle.getBundle.targetLocale : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals :(ClassLoader) java.util.ResourceBundle.getBundle.loader : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (Control) java.util.ResourceBundle.getBundle.control : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| if ((loader==null )||(control==null )) |
| //QC Intervals :(ClassLoader) java.util.ResourceBundle.getBundle.loader : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (Control) java.util.ResourceBundle.getBundle.control : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| throw new NullPointerException(); |
| } |
| //QC Intervals :(ClassLoader) java.util.ResourceBundle.getBundle.loader : Interval 0 : new : new |
| //QC Intervals : (Control) java.util.ResourceBundle.getBundle.control : Interval 0 : new : new |
| return getBundleImpl(baseName,targetLocale,loader,control); |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.getBundle.return : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| } |
| private static |
| ResourceBundle getBundleImpl |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.getBundleImpl : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ( |
| String baseName |
| , |
| Locale locale |
| , |
| ClassLoader loader |
| , |
| Control control |
| ) |
| //QC Intervals : (String) java.util.ResourceBundle.getBundleImpl.baseName : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (Locale) java.util.ResourceBundle.getBundleImpl.locale : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals :(ClassLoader) java.util.ResourceBundle.getBundleImpl.loader : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (Control) java.util.ResourceBundle.getBundleImpl.control : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| if ((locale==null )||(control==null )) |
| //QC Intervals : (Locale) java.util.ResourceBundle.getBundleImpl.locale : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (Control) java.util.ResourceBundle.getBundleImpl.control : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| throw new NullPointerException(); |
| } |
| //QC Intervals : (Locale) java.util.ResourceBundle.getBundleImpl.locale : Interval 0 : new : new |
| //QC Intervals : (Control) java.util.ResourceBundle.getBundleImpl.control : Interval 0 : new : new |
| CacheKey cacheKey=new CacheKey(baseName,locale,loader); |
| //QC Intervals :(CacheKey) java.util.ResourceBundle.getBundleImpl.cacheKey : Interval 0 : new : new |
| ResourceBundle bundle=null ; |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.getBundleImpl.bundle : Interval 0 : null : null |
| BundleReference bundleRef=cacheList.get(cacheKey); |
| //QC Intervals : (Object) java.util.concurrent.ConcurrentMap |
| 1 : Interval 0 : new : new |
| //QC Intervals :(BundleReference) java.util.ResourceBundle.getBundleImpl.bundleRef : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| if (bundleRef!=null ) |
| //QC Intervals :(BundleReference) java.util.ResourceBundle.getBundleImpl.bundleRef : Interval 0 : new : new |
| { |
| bundle=bundleRef.get(); |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.getBundleImpl.bundle : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //assignation |
| bundleRef=null ; |
| //QC Intervals :(BundleReference) java.util.ResourceBundle.getBundleImpl.bundleRef : Interval 0 : null : null |
| //assignation |
| } |
| if (isValidBundle(bundle)&&hasValidParentChain(bundle)) |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.isValidBundle |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.hasValidParentChain |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (boolean) java.util.ResourceBundle.isValidBundle |
| : Interval 0 : true : true |
| //QC Intervals : (boolean) java.util.ResourceBundle.hasValidParentChain |
| : Interval 0 : true : true |
| { |
| return bundle; |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.getBundleImpl.return : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| } |
| //QC Intervals : (boolean) java.util.ResourceBundle.isValidBundle |
| : Interval 0 : false : false |
| //QC : Interval 1 : true : true |
| //QC Intervals : (boolean) java.util.ResourceBundle.hasValidParentChain |
| : Interval 0 : false : false |
| //QC : Interval 1 : true : true |
| boolean isKnownControl=(control==Control.INSTANCE)||(control instanceof SingleFormatControl ); |
| //QC Intervals : (boolean) java.util.ResourceBundle.getBundleImpl.isKnownControl : Interval 0 : true : true |
| //QC : Interval 1 : false : false |
| List<String > formats=control.getFormats(baseName); |
| //QC Intervals : (String) java.util.ResourceBundle.Control |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals :(List<String>) java.util.ResourceBundle.getBundleImpl.formats : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| if (!isKnownControl&&!checkList(formats)) |
| //QC Intervals : (List) java.util.ResourceBundle.checkList |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (boolean) java.util.ResourceBundle.getBundleImpl.isKnownControl : Interval 0 : false : false |
| //QC Intervals : (boolean) java.util.ResourceBundle.checkList |
| : Interval 0 : false : false |
| { |
| throw new IllegalArgumentException("Invalid Control : getFormats"); |
| } |
| //QC Intervals : (boolean) java.util.ResourceBundle.getBundleImpl.isKnownControl : Interval 0 : true : true |
| //QC : Interval 1 : false : false |
| //QC Intervals : (boolean) java.util.ResourceBundle.checkList |
| : Interval 0 : false : false |
| //QC : Interval 1 : true : true |
| ResourceBundle baseBundle=null ; |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.getBundleImpl.baseBundle : Interval 0 : null : null |
| for ( |
| Locale targetLocale |
| //QC Intervals : (Locale) java.util.ResourceBundle.getBundleImpl.targetLocale : Interval 0 : new : new |
| =locale; |
| targetLocale!=null ; |
| targetLocale=control.getFallbackLocale(baseName,targetLocale) |
| ) |
| { |
| List<Locale > candidateLocales=control.getCandidateLocales(baseName,targetLocale); |
| //QC Intervals : (String) java.util.ResourceBundle.Control |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (Locale) java.util.ResourceBundle.Control |
| 2 : Interval 0 : new : new |
| //QC Intervals :(List<Locale>) java.util.ResourceBundle.getBundleImpl.candidateLocales: Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| if (!isKnownControl&&!checkList(candidateLocales)) |
| //QC Intervals : (boolean) java.util.ResourceBundle.getBundleImpl.isKnownControl : Interval 0 : false : false |
| //QC Intervals : (boolean) java.util.ResourceBundle.checkList |
| : Interval 0 : false : false |
| { |
| throw new IllegalArgumentException("Invalid Control : getCandidateLocales"); |
| } |
| //QC Intervals : (boolean) java.util.ResourceBundle.getBundleImpl.isKnownControl : Interval 0 : true : true |
| //QC : Interval 1 : false : false |
| //QC Intervals : (boolean) java.util.ResourceBundle.checkList |
| : Interval 0 : false : false |
| //QC : Interval 1 : true : true |
| bundle=findBundle(cacheKey,candidateLocales,formats,0,control,baseBundle); |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.getBundleImpl.bundle : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //assignation |
| if (isValidBundle(bundle)) |
| //QC Intervals : (boolean) java.util.ResourceBundle.isValidBundle |
| : Interval 0 : true : true |
| { |
| boolean isBaseBundle=Locale.ROOT.equals(bundle.locale); |
| //QC-CWE476 or QCerrorNPE null pointer reference on bundle (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals : (Object) java.util.Locale.equals |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (boolean) java.util.ResourceBundle.getBundleImpl.isBaseBundle : Interval 0 : false : true |
| if ((!isBaseBundle)||(bundle.locale.equals(locale)||((candidateLocales.size()==1)&&bundle.locale.equals(candidateLocales.get(0))))) |
| //QC Intervals : (Object) java.util.Locale.equals |
| 1 : Interval 0 : new : new |
| //QC Intervals : (int) java.util.List |
| 1 : Interval 0 : 0 : 0 |
| //QC-CWE476 or QCerrorNPE null pointer reference on candidateLocales (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC-CWE476 or QCerrorNPE null pointer reference on bundle (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC-CWE476 or QCerrorNPE null pointer reference on candidateLocales (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC-CWE476 or QCerrorNPE null pointer reference on bundle (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC-CWE476 or QCerrorNPE null pointer reference on candidateLocales (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC-CWE476 or QCerrorNPE null pointer reference on bundle (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC-CWE476 or QCerrorNPE null pointer reference on candidateLocales (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC-CWE476 or QCerrorNPE null pointer reference on bundle (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC-CWE476 or QCerrorNPE null pointer reference on candidateLocales (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC-CWE476 or QCerrorNPE null pointer reference on bundle (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC-CWE476 or QCerrorNPE null pointer reference on candidateLocales (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC-CWE476 or QCerrorNPE null pointer reference on bundle (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC-CWE476 or QCerrorNPE null pointer reference on candidateLocales (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC-CWE476 or QCerrorNPE null pointer reference on bundle (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC-CWE476 or QCerrorNPE null pointer reference on candidateLocales (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC-CWE476 or QCerrorNPE null pointer reference on bundle (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC-CWE476 or QCerrorNPE null pointer reference on candidateLocales (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC-CWE476 or QCerrorNPE null pointer reference on bundle (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC-CWE476 or QCerrorNPE null pointer reference on candidateLocales (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC-CWE476 or QCerrorNPE null pointer reference on bundle (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC-CWE476 or QCerrorNPE null pointer reference on candidateLocales (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC-CWE476 or QCerrorNPE null pointer reference on bundle (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC-CWE476 or QCerrorNPE null pointer reference on candidateLocales (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC-CWE476 or QCerrorNPE null pointer reference on bundle (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC-CWE476 or QCerrorNPE null pointer reference on candidateLocales (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC-CWE476 or QCerrorNPE null pointer reference on bundle (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC-CWE476 or QCerrorNPE null pointer reference on candidateLocales (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC-CWE476 or QCerrorNPE null pointer reference on bundle (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals : (boolean) java.util.ResourceBundle.getBundleImpl.isBaseBundle : Interval 0 : false : false |
| //QC : Interval 1 : true : true |
| //QC Intervals : (boolean) java.util.Locale.equals |
| : Interval 0 : false : false |
| //QC : Interval 1 : true : true |
| //QC Intervals : (int) java.util.List.size |
| : Interval 0 : -2147483647 : 0 |
| //QC : Interval 1 : 1 : 1 |
| //QC : Interval 2 : 2 : 2147483647 |
| { |
| break ; |
| } |
| if (isBaseBundle&&(baseBundle==null )) |
| //QC Intervals : (boolean) java.util.ResourceBundle.getBundleImpl.isBaseBundle : Interval 0 : true : true |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.getBundleImpl.baseBundle : Interval 0 : null : null |
| { |
| baseBundle=bundle; |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.getBundleImpl.baseBundle : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //assignation |
| } |
| } |
| } |
| if (bundle==null ) |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.getBundleImpl.bundle : Interval 0 : null : null |
| { |
| if (baseBundle==null ) |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.getBundleImpl.baseBundle : Interval 0 : null : null |
| { |
| throwMissingResourceException(baseName,locale,cacheKey.getCause()); |
| //QC Intervals : (String) java.util.ResourceBundle.throwMissingResourceException |
| 1: Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (Locale) java.util.ResourceBundle.throwMissingResourceException |
| 2: Interval 0 : new : new |
| //QC Intervals :(Throwable) java.util.ResourceBundle.throwMissingResourceException |
| 3: Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //type of the function/method : void |
| } |
| bundle=baseBundle; |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.getBundleImpl.bundle : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //assignation |
| } |
| return bundle; |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.getBundleImpl.return : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| } |
| private static final |
| boolean checkList |
| //QC Intervals : (boolean) java.util.ResourceBundle.checkList : Interval 0 : false : true |
| ( |
| List a |
| ) |
| //QC Intervals : (List) java.util.ResourceBundle.checkList.a : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| boolean valid=((a!=null )&&(a.size()!=0)); |
| //QC-CWE476 or QCerrorNPE null pointer reference on a (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals : (boolean) java.util.ResourceBundle.checkList.valid : Interval 0 : false : false |
| if (valid) |
| //QC-CWE570 and QCerrorCNT Condition NEVER true : no interval for variable (boolean)java.util.ResourceBundle.checkList.valid |
| { |
| int size=a.size(); |
| //QC-CWE476 or QCerrorNPE null pointer reference on a (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals : (int) java.util.ResourceBundle.checkList.size : Interval 0 : -2147483647 : 2147483647 |
| for ( |
| int i |
| //QC Intervals : (int) java.util.ResourceBundle.checkList.i : Interval 0 : 0 : 0 |
| =0; |
| valid&&(i<size); |
| i++ |
| ) |
| { |
| valid=(a.get(i)!=null ); |
| //QC Intervals : (int) java.util.List |
| 1 : Interval 0 : 0 : 0 |
| //QC-CWE476 or QCerrorNPE null pointer reference on a (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals : (boolean) java.util.ResourceBundle.checkList.valid : Interval 0 : false : false |
| //assignation |
| } |
| } |
| return valid; |
| //QC Intervals : (boolean) java.util.ResourceBundle.checkList.return : Interval 0 : false : false |
| } |
| private static final |
| ResourceBundle findBundle |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.findBundle : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ( |
| CacheKey cacheKey |
| , |
| List<Locale > candidateLocales |
| , |
| List<String > formats |
| , |
| int index |
| , |
| Control control |
| , |
| ResourceBundle baseBundle |
| ) |
| //QC Intervals :(CacheKey) java.util.ResourceBundle.findBundle.cacheKey : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals :(List<Locale>) java.util.ResourceBundle.findBundle.candidateLocales : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals :(List<String>) java.util.ResourceBundle.findBundle.formats : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (int) java.util.ResourceBundle.findBundle.index : Interval 0 : -2147483647 : 2147483647 |
| //QC Intervals : (Control) java.util.ResourceBundle.findBundle.control : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.findBundle.baseBundle : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| Locale targetLocale=candidateLocales.get(index); |
| //QC Intervals : (int) java.util.List |
| 1 : Interval 0 : -2147483647 : 2147483647 |
| //QC-CWE476 or QCerrorNPE null pointer reference on candidateLocales (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals : (Locale) java.util.ResourceBundle.findBundle.targetLocale : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ResourceBundle parent=null ; |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.findBundle.parent : Interval 0 : null : null |
| if (index!=(candidateLocales.size()-1)) |
| //QC-CWE476 or QCerrorNPE null pointer reference on candidateLocales (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC-CWE190 and QCerrorOVF attention overflow - on candidateLocales_size (-2147483647,2147483647) and varlocaleb22 (1,1) = -2147483648 |
| //QC-CWE476 or QCerrorNPE null pointer reference on candidateLocales (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC-CWE190 and QCerrorOVF attention overflow - on candidateLocales_size (-2147483647,2147483647) and varlocaleb27 (1,1) = -2147483648 |
| //QC-CWE476 or QCerrorNPE null pointer reference on candidateLocales (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC-CWE190 and QCerrorOVF attention overflow - on candidateLocales_size (-2147483647,0) and varlocaleb22 (1,1) = -2147483648 |
| //QC-CWE476 or QCerrorNPE null pointer reference on candidateLocales (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC-CWE190 and QCerrorOVF attention overflow - on candidateLocales_size (-2147483647,0) and varlocaleb22 (1,1) = -2147483648 |
| //QC-CWE476 or QCerrorNPE null pointer reference on candidateLocales (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC-CWE190 and QCerrorOVF attention overflow - on candidateLocales_size (-2147483647,0) and varlocaleb22 (1,1) = -2147483648 |
| //QC-CWE476 or QCerrorNPE null pointer reference on candidateLocales (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC-CWE190 and QCerrorOVF attention overflow - on candidateLocales_size (-2147483647,0) and varlocaleb22 (1,1) = -2147483648 |
| //QC-CWE476 or QCerrorNPE null pointer reference on candidateLocales (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals : (int) java.util.ResourceBundle.findBundle.index : Interval 0 : -2147483647 : -2147483647 |
| //QC : Interval 1 : -2147483646 : 2147483645 |
| //QC : Interval 2 : 2147483646 : 2147483646 |
| //QC : Interval 3 : 2147483647 : 2147483647 |
| //QC Intervals : (int) java.util.List.size |
| : Interval 0 : -2147483647 : 0 |
| //QC : Interval 1 : 1 : 1 |
| //QC : Interval 2 : 2 : 2147483647 |
| { |
| parent=findBundle(cacheKey,candidateLocales,formats,(index+1),control,baseBundle); |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.findBundle.parent : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //assignation |
| } |
| else |
| //QC-CWE476 or QCerrorNPE null pointer reference on candidateLocales (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC-CWE190 and QCerrorOVF attention overflow - on candidateLocales_size (-2147483647,2147483647) and varlocaleb32 (1,1) = -2147483648 |
| //QC-CWE476 or QCerrorNPE null pointer reference on candidateLocales (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC-CWE190 and QCerrorOVF attention overflow - on candidateLocales_size (-2147483647,0) and varlocaleb32 (1,1) = -2147483648 |
| //QC-CWE476 or QCerrorNPE null pointer reference on candidateLocales (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC-CWE190 and QCerrorOVF attention overflow - on candidateLocales_size (-2147483647,0) and varlocaleb32 (1,1) = -2147483648 |
| //QC-CWE476 or QCerrorNPE null pointer reference on candidateLocales (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC-CWE190 and QCerrorOVF attention overflow - on candidateLocales_size (-2147483647,0) and varlocaleb32 (1,1) = -2147483648 |
| //QC-CWE476 or QCerrorNPE null pointer reference on candidateLocales (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC-CWE190 and QCerrorOVF attention overflow - on candidateLocales_size (-2147483647,0) and varlocaleb32 (1,1) = -2147483648 |
| //QC-CWE476 or QCerrorNPE null pointer reference on candidateLocales (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC-CWE570 and QCerrorCNT Condition NEVER true : no interval for variable (int)java.util.ResourceBundle.findBundle.index |
| //QC-CWE570 and QCerrorCNT Condition NEVER true : no interval for variable (int)java.util.List.size |
| if ((baseBundle!=null )&&Locale.ROOT.equals(targetLocale)) |
| //QC Intervals : (Object) java.util.Locale.equals |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.findBundle.baseBundle : Interval 0 : new : new |
| //QC Intervals : (boolean) java.util.Locale.equals |
| : Interval 0 : true : true |
| { |
| return baseBundle; |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.findBundle.return : Interval 0 : new : new |
| } |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.findBundle.baseBundle : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (boolean) java.util.Locale.equals |
| : Interval 0 : false : false |
| //QC : Interval 1 : true : true |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.findBundle.baseBundle : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (boolean) java.util.Locale.equals |
| : Interval 0 : false : false |
| //QC : Interval 1 : true : true |
| Object ref; |
| //QC Intervals : (Object) java.util.ResourceBundle.findBundle.ref : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| while ((ref=referenceQueue.poll())!=null ) |
| //QC-CWE481 Assigning instead of comparing on ref=referenceQueue.poll() (see http://cwe.mitre.org/data/definitions/481.html) |
| //QC Intervals : (Object) java.util.ResourceBundle.findBundle.ref : Interval 0 : new : new |
| //QC Intervals :(Reference) java.lang.ref.ReferenceQueue |
| : Interval 0 : new : new |
| { |
| cacheList.remove(((CacheKeyReference )ref).getCacheKey()); |
| //type of the function/method : TypeInconnu |
| } |
| //QC Intervals : (Object) java.util.ResourceBundle.findBundle.ref : Interval 0 : null : null |
| //QC Intervals :(Reference) java.lang.ref.ReferenceQueue |
| : Interval 0 : null : null |
| boolean expiredBundle=false; |
| //QC Intervals : (boolean) java.util.ResourceBundle.findBundle.expiredBundle : Interval 0 : false : false |
| cacheKey.setLocale(targetLocale); |
| //QC-CWE476 or QCerrorNPE null pointer reference on cacheKey (see http://cwe.mitre.org/data/definitions/476.html) |
| //type of the function/method : TypeInconnu |
| ResourceBundle bundle=findBundleInCache(cacheKey,control); |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.findBundle.bundle : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| if (isValidBundle(bundle)) |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.isValidBundle |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (boolean) java.util.ResourceBundle.isValidBundle |
| : Interval 0 : true : true |
| { |
| expiredBundle=bundle.expired; |
| //QC-CWE476 or QCerrorNPE null pointer reference on bundle (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals : (boolean) java.util.ResourceBundle.findBundle.expiredBundle : Interval 0 : false : true |
| //assignation |
| if (!expiredBundle) |
| //QC Intervals : (boolean) java.util.ResourceBundle.findBundle.expiredBundle : Interval 0 : false : false |
| { |
| if (bundle.parent==parent) |
| //QC-CWE476 or QCerrorNPE null pointer reference on bundle (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.ResourceBundle |
| : Interval 0 : null : null |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.findBundle.parent : Interval 0 : null : null |
| { |
| return bundle; |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.findBundle.return : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| } |
| //QC-CWE476 or QCerrorNPE null pointer reference on bundle (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.ResourceBundle |
| : Interval 0 : new : new |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.findBundle.parent : Interval 0 : null : null |
| BundleReference bundleRef=cacheList.get(cacheKey); |
| //QC Intervals : (Object) java.util.concurrent.ConcurrentMap |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals :(BundleReference) java.util.ResourceBundle.findBundle.bundleRef : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| if ((bundleRef!=null )&&(bundleRef.get()==bundle)) |
| //QC-CWE476 or QCerrorNPE null pointer reference on bundleRef (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals :(BundleReference) java.util.ResourceBundle.findBundle.bundleRef : Interval 0 : new : new |
| //QC Intervals :(Object;Object) java.util.ResourceBundle.BundleReference |
| : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.findBundle.bundle : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| cacheList.remove(cacheKey,bundleRef); |
| //QC Intervals : (Object) java.util.concurrent.ConcurrentMap.remove |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (Object) java.util.concurrent.ConcurrentMap.remove |
| 2 : Interval 0 : new : new |
| //type of the function/method : boolean |
| //QC-CWE252 or QCerrorRTF return type of function is not tested (see http://cwe.mitre.org/data/definitions/252.html) |
| } |
| } |
| } |
| if (bundle!=NONEXISTENT_BUNDLE) |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.findBundle.bundle : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.findBundle |
| : Interval 0 : new : new |
| //QC : Interval 1 : null : null |
| { |
| CacheKey constKey=(CacheKey )cacheKey.clone(); |
| //QC-CWE476 or QCerrorNPE null pointer reference on cacheKey (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals :(CacheKey) java.util.ResourceBundle.findBundle.constKey : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| while (!beginLoading(constKey)) |
| //QC Intervals :(CacheKey) java.util.ResourceBundle.beginLoading |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (boolean) java.util.ResourceBundle.beginLoading |
| : Interval 0 : false : false |
| { |
| bundle=findBundleInCache(cacheKey,control); |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.findBundle.bundle : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //assignation |
| if (bundle==null ) |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.findBundle.bundle : Interval 0 : null : null |
| { |
| continue ; |
| } |
| if (bundle==NONEXISTENT_BUNDLE) |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.findBundle.bundle : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.findBundle |
| : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| return parent; |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.findBundle.return : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| } |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.findBundle.bundle : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.findBundle |
| : Interval 0 : new : new |
| //QC : Interval 1 : null : null |
| expiredBundle=bundle.expired; |
| //QC-CWE476 or QCerrorNPE null pointer reference on bundle (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals : (boolean) java.util.ResourceBundle.findBundle.expiredBundle : Interval 0 : false : true |
| //assignation |
| if (!expiredBundle) |
| //QC Intervals : (boolean) java.util.ResourceBundle.findBundle.expiredBundle : Interval 0 : false : false |
| { |
| if (bundle.parent==parent) |
| //QC-CWE476 or QCerrorNPE null pointer reference on bundle (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.ResourceBundle |
| : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.findBundle.parent : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| return bundle; |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.findBundle.return : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| } |
| //QC-CWE476 or QCerrorNPE null pointer reference on bundle (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.ResourceBundle |
| : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.findBundle.parent : Interval 0 : new : new |
| //QC : Interval 1 : null : null |
| BundleReference bundleRef=cacheList.get(cacheKey); |
| //QC Intervals : (Object) java.util.concurrent.ConcurrentMap |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals :(BundleReference) java.util.ResourceBundle.findBundle.bundleRef : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| if ((bundleRef!=null )&&(bundleRef.get()==bundle)) |
| //QC-CWE476 or QCerrorNPE null pointer reference on bundleRef (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals :(BundleReference) java.util.ResourceBundle.findBundle.bundleRef : Interval 0 : new : new |
| //QC Intervals :(Object;Object) java.util.ResourceBundle.BundleReference |
| : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.findBundle.bundle : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| cacheList.remove(cacheKey,bundleRef); |
| //QC Intervals : (Object) java.util.concurrent.ConcurrentMap.remove |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (Object) java.util.concurrent.ConcurrentMap.remove |
| 2 : Interval 0 : new : new |
| //type of the function/method : boolean |
| //QC-CWE252 or QCerrorRTF return type of function is not tested (see http://cwe.mitre.org/data/definitions/252.html) |
| } |
| } |
| } |
| //QC Intervals : (boolean) java.util.ResourceBundle.beginLoading |
| : Interval 0 : true : true |
| bundle=loadBundle(cacheKey,formats,control,expiredBundle); |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.findBundle.bundle : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //assignation |
| if (bundle!=null ) |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.findBundle.bundle : Interval 0 : new : new |
| { |
| if (bundle.parent==null ) |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.ResourceBundle |
| : Interval 0 : null : null |
| { |
| bundle.setParent(parent); |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.setParent |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //type of the function/method : void |
| } |
| bundle.locale=targetLocale; |
| //QC Intervals : (Locale) java.util.ResourceBundle.ResourceBundle |
| : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //assignation |
| bundle=putBundleInCache(cacheKey,bundle,control); |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.findBundle.bundle : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //assignation |
| endLoading(constKey); |
| //QC Intervals :(CacheKey) java.util.ResourceBundle.endLoading |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //type of the function/method : void |
| return bundle; |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.findBundle.return : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| } |
| //QC-CWE476 or QCerrorNPE null pointer reference on bundle (see http://cwe.mitre.org/data/definitions/476.html) |
| putBundleInCache(cacheKey,NONEXISTENT_BUNDLE,control); |
| //type of the function/method : TypeInconnu |
| endLoading(constKey); |
| //QC Intervals :(CacheKey) java.util.ResourceBundle.endLoading |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //type of the function/method : void |
| } |
| //QC-CWE476 or QCerrorNPE null pointer reference on bundle (see http://cwe.mitre.org/data/definitions/476.html) |
| assert underConstruction.get(cacheKey)!=Thread.currentThread(); |
| return parent; |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.findBundle.return : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| } |
| private static final |
| ResourceBundle loadBundle |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.loadBundle : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ( |
| CacheKey cacheKey |
| , |
| List<String > formats |
| , |
| Control control |
| , |
| boolean reload |
| ) |
| //QC Intervals :(CacheKey) java.util.ResourceBundle.loadBundle.cacheKey : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals :(List<String>) java.util.ResourceBundle.loadBundle.formats : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (Control) java.util.ResourceBundle.loadBundle.control : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (boolean) java.util.ResourceBundle.loadBundle.reload : Interval 0 : false : true |
| { |
| assert underConstruction.get(cacheKey)==Thread.currentThread(); |
| Locale targetLocale=cacheKey.getLocale(); |
| //QC-CWE476 or QCerrorNPE null pointer reference on cacheKey (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals : (Locale) java.util.ResourceBundle.loadBundle.targetLocale : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ResourceBundle bundle=null ; |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.loadBundle.bundle : Interval 0 : null : null |
| int size=formats.size(); |
| //QC-CWE476 or QCerrorNPE null pointer reference on formats (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals : (int) java.util.ResourceBundle.loadBundle.size : Interval 0 : -2147483647 : 2147483647 |
| for ( |
| int i |
| //QC Intervals : (int) java.util.ResourceBundle.loadBundle.i : Interval 0 : 0 : 0 |
| =0; |
| i<size; |
| i++ |
| ) |
| { |
| String format=formats.get(i); |
| //QC Intervals : (int) java.util.List |
| 1 : Interval 0 : 0 : 0 |
| //QC-CWE476 or QCerrorNPE null pointer reference on formats (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals : (String) java.util.ResourceBundle.loadBundle.format : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| try |
| { |
| bundle=control.newBundle(cacheKey.getName(),targetLocale,format,cacheKey.getLoader(),reload); |
| //QC-CWE476 or QCerrorNPE null pointer reference on control (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.loadBundle.bundle : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //assignation |
| } |
| catch ( |
| Throwable cause |
| ) |
| //QC Intervals :(Throwable) java.util.ResourceBundle.loadBundle.cause : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| cacheKey.setCause(cause); |
| //QC Intervals :(Throwable) java.util.ResourceBundle.CacheKey.setCause |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC-CWE476 or QCerrorNPE null pointer reference on cacheKey (see http://cwe.mitre.org/data/definitions/476.html) |
| //type of the function/method : void |
| } |
| if (bundle!=null ) |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.loadBundle.bundle : Interval 0 : new : new |
| { |
| cacheKey.setFormat(format); |
| //QC Intervals : (String) java.util.ResourceBundle.CacheKey.setFormat |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC-CWE476 or QCerrorNPE null pointer reference on cacheKey (see http://cwe.mitre.org/data/definitions/476.html) |
| //type of the function/method : void |
| bundle.name=cacheKey.getName(); |
| //QC-CWE476 or QCerrorNPE null pointer reference on cacheKey (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals : (String) java.util.ResourceBundle.name |
| : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //assignation |
| bundle.locale=targetLocale; |
| //QC Intervals : (Locale) java.util.ResourceBundle.ResourceBundle |
| : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //assignation |
| bundle.expired=false; |
| //QC Intervals : (boolean) java.util.ResourceBundle.expired |
| : Interval 0 : false : false |
| //assignation |
| break ; |
| } |
| } |
| assert underConstruction.get(cacheKey)==Thread.currentThread(); |
| return bundle; |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.loadBundle.return : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| } |
| private static final |
| boolean isValidBundle |
| //QC Intervals : (boolean) java.util.ResourceBundle.isValidBundle : Interval 0 : false : true |
| ( |
| ResourceBundle bundle |
| ) |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.isValidBundle.bundle : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| return (bundle!=null )&&(bundle!=NONEXISTENT_BUNDLE); |
| //QC Intervals : (boolean) java.util.ResourceBundle.isValidBundle.return : Interval 0 : false : false |
| } |
| private static final |
| boolean hasValidParentChain |
| //QC Intervals : (boolean) java.util.ResourceBundle.hasValidParentChain : Interval 0 : false : true |
| ( |
| ResourceBundle bundle |
| ) |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.hasValidParentChain.bundle : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| long now=System.currentTimeMillis(); |
| //QC Intervals : (long) java.util.ResourceBundle.hasValidParentChain.now : Interval 0 : -9.2233720368548E+18 : 9.2233720368548E+18 |
| while (bundle!=null ) |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.hasValidParentChain.bundle : Interval 0 : new : new |
| { |
| if (bundle.expired) |
| //QC Intervals : (boolean) java.util.ResourceBundle.expired |
| : Interval 0 : true : true |
| { |
| return false; |
| //QC Intervals : (boolean) java.util.ResourceBundle.hasValidParentChain.return : Interval 0 : false : false |
| } |
| //QC Intervals : (boolean) java.util.ResourceBundle.expired |
| : Interval 0 : false : false |
| CacheKey key=bundle.cacheKey; |
| //QC Intervals :(CacheKey) java.util.ResourceBundle.hasValidParentChain.key : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| if (key!=null ) |
| //QC Intervals :(CacheKey) java.util.ResourceBundle.hasValidParentChain.key : Interval 0 : new : new |
| { |
| long expirationTime=key.expirationTime; |
| //QC Intervals : (long) java.util.ResourceBundle.hasValidParentChain.expirationTime: Interval 0 : -9.2233720368548E+18 : 9.2233720368548E+18 |
| if ((expirationTime>=0)&&(expirationTime<=now)) |
| //QC Intervals : (long) java.util.ResourceBundle.hasValidParentChain.expirationTime: Interval 0 : 0 : 0 |
| //QC : Interval 1 : 1 : 9.2233720368548E+18 |
| //QC Intervals : (long) java.util.ResourceBundle.hasValidParentChain.now : Interval 0 : 0 : 0 |
| //QC : Interval 1 : 1 : 1 |
| //QC : Interval 2 : 2 : 9.2233720368548E+18 |
| { |
| return false; |
| //QC Intervals : (boolean) java.util.ResourceBundle.hasValidParentChain.return : Interval 0 : false : false |
| } |
| //QC Intervals : (long) java.util.ResourceBundle.hasValidParentChain.expirationTime: Interval 0 : 0 : 0 |
| //QC : Interval 1 : 1 : 9.2233720368548E+18 |
| //QC : Interval 2 : -9.2233720368548E+18 : -1 |
| //QC Intervals : (long) java.util.ResourceBundle.hasValidParentChain.now : Interval 0 : -9.2233720368548E+18 : -2 |
| //QC : Interval 1 : -1 : -1 |
| //QC : Interval 2 : 0 : 0 |
| //QC : Interval 3 : 1 : 1 |
| //QC : Interval 4 : 2 : 9.2233720368548E+18 |
| } |
| //QC Intervals : (long) java.util.ResourceBundle.hasValidParentChain.now : Interval 0 : -1 : -1 |
| //QC : Interval 1 : 1 : 1 |
| //QC : Interval 2 : -9.2233720368548E+18 : -2 |
| //QC : Interval 3 : 0 : 9.2233720368548E+18 |
| bundle=bundle.parent; |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.hasValidParentChain.bundle : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //assignation |
| } |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.hasValidParentChain.bundle : Interval 0 : null : null |
| return true; |
| //QC Intervals : (boolean) java.util.ResourceBundle.hasValidParentChain.return : Interval 0 : true : true |
| } |
| private static final |
| boolean beginLoading |
| //QC Intervals : (boolean) java.util.ResourceBundle.beginLoading : Interval 0 : false : true |
| ( |
| CacheKey constKey |
| ) |
| //QC Intervals :(CacheKey) java.util.ResourceBundle.beginLoading.constKey : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| Thread me=Thread.currentThread(); |
| //QC Intervals : (Thread) java.util.ResourceBundle.beginLoading.me : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| Thread worker; |
| //QC Intervals : (Thread) java.util.ResourceBundle.beginLoading.worker : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| if (((worker=underConstruction.putIfAbsent(constKey,me))==null )||(worker==me)) |
| //QC-CWE481 Assigning instead of comparing on worker=underConstruction.putIfAbsent(constKey,me) (see http://cwe.mitre.org/data/definitions/481.html) |
| //QC Intervals : (Thread) java.util.ResourceBundle.beginLoading.worker : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals :(TypeInconnu) underConstruction.putIfAbsent : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (Thread) java.util.ResourceBundle.beginLoading.me : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| return true; |
| //QC Intervals : (boolean) java.util.ResourceBundle.beginLoading.return : Interval 0 : true : true |
| } |
| //QC Intervals : (Thread) java.util.ResourceBundle.beginLoading.worker : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals :(TypeInconnu) underConstruction.putIfAbsent : Interval 0 : new : new |
| //QC Intervals : (Thread) java.util.ResourceBundle.beginLoading.me : Interval 0 : new : new |
| //QC : Interval 1 : null : null |
| synchronized (worker) |
| { |
| while (underConstruction.get(constKey)==worker) |
| //QC Intervals : (Object) java.util.concurrent.ConcurrentMap |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (Object) java.util.concurrent.ConcurrentMap |
| : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (Thread) java.util.ResourceBundle.beginLoading.worker : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| try |
| { |
| worker.wait(); |
| //QC-CWE476 or QCerrorNPE null pointer reference on worker (see http://cwe.mitre.org/data/definitions/476.html) |
| //type of the function/method : void;long |
| //QC-CWE252 or QCerrorRTF return type of function is not tested (see http://cwe.mitre.org/data/definitions/252.html) |
| } |
| catch ( |
| InterruptedException e |
| ) |
| //QC Intervals :(InterruptedException) java.util.ResourceBundle.beginLoading.e : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| } |
| //QC-CWE390 Detection of error condition without action (see http://cwe.mitre.org/data/definitions/390.html) |
| } |
| //QC Intervals : (Object) java.util.concurrent.ConcurrentMap |
| : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (Thread) java.util.ResourceBundle.beginLoading.worker : Interval 0 : new : new |
| //QC : Interval 1 : null : null |
| } |
| return false; |
| //QC Intervals : (boolean) java.util.ResourceBundle.beginLoading.return : Interval 0 : false : false |
| } |
| private static final |
| void endLoading |
| ( |
| CacheKey constKey |
| ) |
| //QC Intervals :(CacheKey) java.util.ResourceBundle.endLoading.constKey : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| Thread me=Thread.currentThread(); |
| //QC Intervals : (Thread) java.util.ResourceBundle.endLoading.me : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| assert (underConstruction.get(constKey)==me); |
| underConstruction.remove(constKey); |
| //type of the function/method : TypeInconnu |
| synchronized (me) |
| { |
| me.notifyAll(); |
| //QC-CWE476 or QCerrorNPE null pointer reference on me (see http://cwe.mitre.org/data/definitions/476.html) |
| //type of the function/method : void |
| } |
| } |
| private static final |
| void throwMissingResourceException |
| ( |
| String baseName |
| , |
| Locale locale |
| , |
| Throwable cause |
| ) |
| //QC Intervals : (String) java.util.ResourceBundle.throwMissingResourceException.baseName: Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (Locale) java.util.ResourceBundle.throwMissingResourceException.locale: Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals :(Throwable) java.util.ResourceBundle.throwMissingResourceException.cause: Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| if (cause instanceof MissingResourceException ) |
| //QC Intervals : (boolean) instanceof : Interval 0 : true : true |
| { |
| cause=null ; |
| //QC Intervals :(Throwable) java.util.ResourceBundle.throwMissingResourceException.cause: Interval 0 : null : null |
| //assignation |
| } |
| throw new MissingResourceException(("Can't find bundle for base name "+(baseName+(" , locale "+locale))),(baseName+("_"+locale)),"",cause); |
| } |
| private static final |
| ResourceBundle findBundleInCache |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.findBundleInCache : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ( |
| CacheKey cacheKey |
| , |
| Control control |
| ) |
| //QC Intervals :(CacheKey) java.util.ResourceBundle.findBundleInCache.cacheKey : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (Control) java.util.ResourceBundle.findBundleInCache.control : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| BundleReference bundleRef=cacheList.get(cacheKey); |
| //QC Intervals : (Object) java.util.concurrent.ConcurrentMap |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals :(BundleReference) java.util.ResourceBundle.findBundleInCache.bundleRef : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| if (bundleRef==null ) |
| //QC Intervals :(BundleReference) java.util.ResourceBundle.findBundleInCache.bundleRef : Interval 0 : null : null |
| { |
| return null ; |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.findBundleInCache.return : Interval 0 : null : null |
| } |
| //QC Intervals :(BundleReference) java.util.ResourceBundle.findBundleInCache.bundleRef : Interval 0 : new : new |
| ResourceBundle bundle=bundleRef.get(); |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.findBundleInCache.bundle : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| if (bundle==null ) |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.findBundleInCache.bundle : Interval 0 : null : null |
| { |
| return null ; |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.findBundleInCache.return : Interval 0 : null : null |
| } |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.findBundleInCache.bundle : Interval 0 : new : new |
| ResourceBundle p=bundle.parent; |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.findBundleInCache.p : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| assert p!=NONEXISTENT_BUNDLE; |
| if ((p!=null )&&p.expired) |
| //QC-CWE476 or QCerrorNPE null pointer reference on p (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.findBundleInCache.p : Interval 0 : new : new |
| //QC Intervals : (boolean) java.util.ResourceBundle.expired |
| : Interval 0 : true : true |
| { |
| assert bundle!=NONEXISTENT_BUNDLE; |
| bundle.expired=true; |
| //QC Intervals : (boolean) java.util.ResourceBundle.expired |
| : Interval 0 : true : true |
| //assignation |
| bundle.cacheKey=null ; |
| //QC Intervals :(CacheKey) java.util.ResourceBundle.ResourceBundle |
| : Interval 0 : null : null |
| //assignation |
| cacheList.remove(cacheKey,bundleRef); |
| //QC Intervals : (Object) java.util.concurrent.ConcurrentMap.remove |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (Object) java.util.concurrent.ConcurrentMap.remove |
| 2 : Interval 0 : new : new |
| //type of the function/method : boolean |
| //QC-CWE252 or QCerrorRTF return type of function is not tested (see http://cwe.mitre.org/data/definitions/252.html) |
| bundle=null ; |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.findBundleInCache.bundle : Interval 0 : null : null |
| //assignation |
| } |
| else |
| //QC-CWE476 or QCerrorNPE null pointer reference on p (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.findBundleInCache.p : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (boolean) java.util.ResourceBundle.expired |
| : Interval 0 : false : false |
| //QC : Interval 1 : true : true |
| { |
| CacheKey key=bundleRef.getCacheKey(); |
| //QC Intervals :(CacheKey) java.util.ResourceBundle.findBundleInCache.key : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| long expirationTime=key.expirationTime; |
| //QC-CWE476 or QCerrorNPE null pointer reference on key (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals : (long) java.util.ResourceBundle.findBundleInCache.expirationTime: Interval 0 : -9.2233720368548E+18 : 9.2233720368548E+18 |
| if ((!bundle.expired)&&((expirationTime>=0)&&(expirationTime<=System.currentTimeMillis()))) |
| //QC Intervals : (boolean) java.util.ResourceBundle.expired |
| : Interval 0 : false : false |
| //QC Intervals : (long) java.util.ResourceBundle.findBundleInCache.expirationTime: Interval 0 : 0 : 0 |
| //QC : Interval 1 : 1 : 9.2233720368548E+18 |
| //QC Intervals : (long) java.lang.System.currentTimeMillis |
| : Interval 0 : 0 : 0 |
| //QC : Interval 1 : 1 : 1 |
| //QC : Interval 2 : 2 : 9.2233720368548E+18 |
| { |
| if (bundle!=NONEXISTENT_BUNDLE) |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.findBundleInCache.bundle : Interval 0 : new : new |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.findBundleInCache |
| : Interval 0 : null : null |
| { |
| synchronized (bundle) |
| { |
| expirationTime=key.expirationTime; |
| //QC-CWE476 or QCerrorNPE null pointer reference on key (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals : (long) java.util.ResourceBundle.findBundleInCache.expirationTime: Interval 0 : -9.2233720368548E+18 : 9.2233720368548E+18 |
| //assignation |
| if ((!bundle.expired)&&((expirationTime>=0)&&(expirationTime<=System.currentTimeMillis()))) |
| //QC Intervals : (boolean) java.util.ResourceBundle.expired |
| : Interval 0 : false : false |
| //QC Intervals : (long) java.util.ResourceBundle.findBundleInCache.expirationTime: Interval 0 : 0 : 0 |
| //QC : Interval 1 : 1 : 1 |
| //QC : Interval 2 : 2 : 2 |
| //QC : Interval 3 : 3 : 9.2233720368548E+18 |
| //QC Intervals : (long) java.lang.System.currentTimeMillis |
| : Interval 0 : 0 : 0 |
| //QC : Interval 1 : 1 : 1 |
| //QC : Interval 2 : 2 : 2 |
| //QC : Interval 3 : 3 : 3 |
| //QC : Interval 4 : 4 : 9.2233720368548E+18 |
| { |
| try |
| { |
| bundle.expired=control.needsReload(key.getName(),key.getLocale(),key.getFormat(),key.getLoader(),bundle,key.loadTime); |
| //QC-CWE476 or QCerrorNPE null pointer reference on key (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals : (String) java.util.ResourceBundle.Control.needsReload |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC-CWE476 or QCerrorNPE null pointer reference on key (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals : (Locale) java.util.ResourceBundle.Control.needsReload |
| 2 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC-CWE476 or QCerrorNPE null pointer reference on key (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals : (String) java.util.ResourceBundle.Control.needsReload |
| 3 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC-CWE476 or QCerrorNPE null pointer reference on key (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals :(ClassLoader) java.util.ResourceBundle.Control.needsReload |
| 4 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.Control.needsReload |
| 5 : Interval 0 : new : new |
| //QC-CWE476 or QCerrorNPE null pointer reference on key (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals : (long) java.util.ResourceBundle.Control.needsReload |
| 6 : Interval 0 : -9.2233720368548E+18 : 9.2233720368548E+18 |
| //QC-CWE476 or QCerrorNPE null pointer reference on control (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals : (boolean) java.util.ResourceBundle.expired |
| : Interval 0 : false : true |
| //assignation |
| } |
| catch ( |
| Exception e |
| ) |
| //QC Intervals :(Exception) java.util.ResourceBundle.findBundleInCache.e : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| cacheKey.setCause(e); |
| //QC Intervals :(Throwable) java.util.ResourceBundle.CacheKey.setCause |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC-CWE476 or QCerrorNPE null pointer reference on cacheKey (see http://cwe.mitre.org/data/definitions/476.html) |
| //type of the function/method : void |
| } |
| if (bundle.expired) |
| //QC Intervals : (boolean) java.util.ResourceBundle.expired |
| : Interval 0 : true : true |
| { |
| bundle.cacheKey=null ; |
| //QC Intervals :(CacheKey) java.util.ResourceBundle.ResourceBundle |
| : Interval 0 : null : null |
| //assignation |
| cacheList.remove(cacheKey,bundleRef); |
| //QC Intervals : (Object) java.util.concurrent.ConcurrentMap.remove |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (Object) java.util.concurrent.ConcurrentMap.remove |
| 2 : Interval 0 : new : new |
| //type of the function/method : boolean |
| //QC-CWE252 or QCerrorRTF return type of function is not tested (see http://cwe.mitre.org/data/definitions/252.html) |
| } |
| else |
| //QC Intervals : (boolean) java.util.ResourceBundle.expired |
| : Interval 0 : false : false |
| { |
| setExpirationTime(key,control); |
| //QC Intervals :(CacheKey) java.util.ResourceBundle.setExpirationTime |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (Control) java.util.ResourceBundle.setExpirationTime |
| 2 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //type of the function/method : void |
| } |
| } |
| } |
| } |
| else |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.findBundleInCache.bundle : Interval 0 : new : new |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.findBundleInCache |
| : Interval 0 : new : new |
| { |
| cacheList.remove(cacheKey,bundleRef); |
| //QC Intervals : (Object) java.util.concurrent.ConcurrentMap.remove |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (Object) java.util.concurrent.ConcurrentMap.remove |
| 2 : Interval 0 : new : new |
| //type of the function/method : boolean |
| //QC-CWE252 or QCerrorRTF return type of function is not tested (see http://cwe.mitre.org/data/definitions/252.html) |
| bundle=null ; |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.findBundleInCache.bundle : Interval 0 : null : null |
| //assignation |
| } |
| } |
| } |
| return bundle; |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.findBundleInCache.return : Interval 0 : new : new |
| //QC : Interval 1 : null : null |
| } |
| private static final |
| ResourceBundle putBundleInCache |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.putBundleInCache : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ( |
| CacheKey cacheKey |
| , |
| ResourceBundle bundle |
| , |
| Control control |
| ) |
| //QC Intervals :(CacheKey) java.util.ResourceBundle.putBundleInCache.cacheKey : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.putBundleInCache.bundle : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (Control) java.util.ResourceBundle.putBundleInCache.control : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| setExpirationTime(cacheKey,control); |
| //QC Intervals :(CacheKey) java.util.ResourceBundle.setExpirationTime |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (Control) java.util.ResourceBundle.setExpirationTime |
| 2 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //type of the function/method : void |
| if (cacheKey.expirationTime!=Control.TTL_DONT_CACHE) |
| //QC-CWE476 or QCerrorNPE null pointer reference on cacheKey (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals : (long) java.util.ResourceBundle.CacheKey.expirationTime |
| : Interval 0 : -9.2233720368548E+18 : -2 |
| //QC : Interval 1 : 0 : 9.2233720368548E+18 |
| //QC Intervals : (long) java.util.ResourceBundle.Control.TTL_DONT_CACHE |
| : Interval 0 : -1 : -1 |
| { |
| CacheKey key=(CacheKey )cacheKey.clone(); |
| //QC-CWE476 or QCerrorNPE null pointer reference on cacheKey (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals :(CacheKey) java.util.ResourceBundle.putBundleInCache.key : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| BundleReference bundleRef=new BundleReference(bundle,referenceQueue,key); |
| //QC Intervals :(BundleReference) java.util.ResourceBundle.putBundleInCache.bundleRef : Interval 0 : new : new |
| bundle.cacheKey=key; |
| //QC Intervals :(CacheKey) java.util.ResourceBundle.ResourceBundle |
| : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //assignation |
| BundleReference result=cacheList.putIfAbsent(key,bundleRef); |
| //QC Intervals : (K) java.util.concurrent.ConcurrentMap |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (V) java.util.concurrent.ConcurrentMap |
| 2 : Interval 0 : new : new |
| //QC Intervals :(BundleReference) java.util.ResourceBundle.putBundleInCache.result : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| if (result!=null ) |
| //QC Intervals :(BundleReference) java.util.ResourceBundle.putBundleInCache.result : Interval 0 : new : new |
| { |
| ResourceBundle rb=result.get(); |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.putBundleInCache.rb : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| if ((rb!=null )&&(!rb.expired)) |
| //QC-CWE476 or QCerrorNPE null pointer reference on rb (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.putBundleInCache.rb : Interval 0 : new : new |
| //QC Intervals : (boolean) java.util.ResourceBundle.expired |
| : Interval 0 : false : false |
| { |
| bundle.cacheKey=null ; |
| //QC Intervals :(CacheKey) java.util.ResourceBundle.ResourceBundle |
| : Interval 0 : null : null |
| //assignation |
| bundle=rb; |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.putBundleInCache.bundle : Interval 0 : new : new |
| //assignation |
| bundleRef.clear(); |
| //type of the function/method : void |
| } |
| else |
| //QC-CWE476 or QCerrorNPE null pointer reference on rb (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.putBundleInCache.rb : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (boolean) java.util.ResourceBundle.expired |
| : Interval 0 : false : false |
| //QC : Interval 1 : true : true |
| { |
| cacheList.put(key,bundleRef); |
| //QC Intervals : (Object) java.util.concurrent.ConcurrentMap |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (Object) java.util.concurrent.ConcurrentMap |
| 2 : Interval 0 : new : new |
| //type of the function/method : Object |
| //QC-CWE252 or QCerrorRTF return type of function is not tested (see http://cwe.mitre.org/data/definitions/252.html) |
| } |
| } |
| } |
| return bundle; |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.putBundleInCache.return : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| } |
| private static final |
| void setExpirationTime |
| ( |
| CacheKey cacheKey |
| , |
| Control control |
| ) |
| //QC Intervals :(CacheKey) java.util.ResourceBundle.setExpirationTime.cacheKey : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (Control) java.util.ResourceBundle.setExpirationTime.control : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| long ttl=control.getTimeToLive(cacheKey.getName(),cacheKey.getLocale()); |
| //QC-CWE476 or QCerrorNPE null pointer reference on cacheKey (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals : (String) java.util.ResourceBundle.Control.getTimeToLive |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC-CWE476 or QCerrorNPE null pointer reference on cacheKey (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals : (Locale) java.util.ResourceBundle.Control.getTimeToLive |
| 2 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC-CWE476 or QCerrorNPE null pointer reference on control (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals : (long) java.util.ResourceBundle.setExpirationTime.ttl : Interval 0 : -9.2233720368548E+18 : 9.2233720368548E+18 |
| if (ttl>=0) |
| //QC Intervals : (long) java.util.ResourceBundle.setExpirationTime.ttl : Interval 0 : 0 : 0 |
| //QC : Interval 1 : 1 : 9.2233720368548E+18 |
| { |
| long now=System.currentTimeMillis(); |
| //QC Intervals : (long) java.util.ResourceBundle.setExpirationTime.now : Interval 0 : -9.2233720368548E+18 : 9.2233720368548E+18 |
| cacheKey.loadTime=now; |
| //QC Intervals : (long) java.util.ResourceBundle.CacheKey.loadTime |
| : Interval 0 : -9.2233720368548E+18 : 9.2233720368548E+18 |
| //assignation |
| cacheKey.expirationTime=(now+ttl); |
| //QC-CWE190 and QCerrorOVF attention overflow + on now (-9.2233720368548E+18,9.2233720368548E+18) and ttl (1,9.2233720368548E+18) = 1.844674407371E+19 |
| //QC Intervals : (long) java.util.ResourceBundle.CacheKey.expirationTime |
| : Interval 0 : -9.2233720368548E+18 : 9.2233720368548E+18 |
| //assignation |
| } |
| else |
| //QC Intervals : (long) java.util.ResourceBundle.setExpirationTime.ttl : Interval 0 : -9.2233720368548E+18 : -1 |
| if (ttl>=Control.TTL_NO_EXPIRATION_CONTROL) |
| //QC Intervals : (long) java.util.ResourceBundle.setExpirationTime.ttl : Interval 0 : -2 : -2 |
| //QC : Interval 1 : -1 : -1 |
| //QC Intervals : (long) java.util.ResourceBundle.Control.TTL_NO_EXPIRATION_CONTROL |
| : Interval 0 : -2 : -2 |
| { |
| cacheKey.expirationTime=ttl; |
| //QC Intervals : (long) java.util.ResourceBundle.CacheKey.expirationTime |
| : Interval 0 : -2 : -2 |
| //QC : Interval 1 : -1 : -1 |
| //assignation |
| } |
| else |
| //QC Intervals : (long) java.util.ResourceBundle.setExpirationTime.ttl : Interval 0 : -9.2233720368548E+18 : -3 |
| //QC Intervals : (long) java.util.ResourceBundle.Control.TTL_NO_EXPIRATION_CONTROL |
| : Interval 0 : -2 : -2 |
| { |
| throw new IllegalArgumentException("Invalid Control : TTL = "+ttl); |
| } |
| //QC Intervals : (long) java.util.ResourceBundle.setExpirationTime.ttl : Interval 0 : -9.2233720368548E+18 : -3 |
| //QC Intervals : (long) java.util.ResourceBundle.Control.TTL_NO_EXPIRATION_CONTROL |
| : Interval 0 : -2 : -2 |
| //QC Intervals : (long) java.util.ResourceBundle.setExpirationTime.ttl : Interval 0 : -9.2233720368548E+18 : -3 |
| //QC Intervals : (long) java.util.ResourceBundle.Control.TTL_NO_EXPIRATION_CONTROL |
| : Interval 0 : -2 : -2 |
| } |
| public static final |
| void clearCache |
| ( |
| ) |
| { |
| clearCache(getLoader()); |
| //QC Intervals :(ClassLoader) java.util.ResourceBundle.clearCache |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //type of the function/method : void |
| } |
| public static final |
| void clearCache |
| ( |
| ClassLoader loader |
| ) |
| //QC Intervals :(ClassLoader) java.util.ResourceBundle.clearCache.loader : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| if (loader==null ) |
| //QC Intervals :(ClassLoader) java.util.ResourceBundle.clearCache.loader : Interval 0 : null : null |
| { |
| throw new NullPointerException(); |
| } |
| //QC Intervals :(ClassLoader) java.util.ResourceBundle.clearCache.loader : Interval 0 : new : new |
| Set<CacheKey > set=cacheList.keySet(); |
| //QC Intervals :(Set<CacheKey>) java.util.ResourceBundle.clearCache.set : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| for ( |
| CacheKey key |
| //QC Intervals :(CacheKey) java.util.ResourceBundle.clearCache.key : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| :set |
| ) |
| { |
| if (key.getLoader()==loader) |
| //QC-CWE476 or QCerrorNPE null pointer reference on key (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals :(ClassLoader) java.util.ResourceBundle.CacheKey |
| : Interval 0 : new : new |
| //QC Intervals :(ClassLoader) java.util.ResourceBundle.clearCache.loader : Interval 0 : new : new |
| { |
| set.remove(key); |
| //QC Intervals : (Object) java.util.Set.remove |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC-CWE476 or QCerrorNPE null pointer reference on set (see http://cwe.mitre.org/data/definitions/476.html) |
| //type of the function/method : boolean |
| //QC-CWE252 or QCerrorRTF return type of function is not tested (see http://cwe.mitre.org/data/definitions/252.html) |
| } |
| } |
| } |
| protected abstract |
| Object handleGetObject |
| //QC Intervals : (Object) java.util.ResourceBundle.handleGetObject : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ( |
| String key |
| ) |
| //QC Intervals : (String) java.util.ResourceBundle.handleGetObject.key : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ; |
| public abstract |
| Enumeration<String > getKeys |
| //QC Intervals :(Enumeration<String>) java.util.ResourceBundle.getKeys : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ( |
| ) |
| ; |
| public |
| boolean containsKey |
| //QC Intervals : (boolean) java.util.ResourceBundle.containsKey : Interval 0 : false : true |
| ( |
| String key |
| ) |
| //QC Intervals : (String) java.util.ResourceBundle.containsKey.key : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| if (key==null ) |
| //QC Intervals : (String) java.util.ResourceBundle.containsKey.key : Interval 0 : null : null |
| { |
| throw new NullPointerException(); |
| } |
| //QC Intervals : (String) java.util.ResourceBundle.containsKey.key : Interval 0 : new : new |
| for ( |
| ResourceBundle rb |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.containsKey.rb : Interval 0 : new : new |
| =this; |
| rb!=null ; |
| rb=rb.parent |
| ) |
| { |
| if (rb.handleKeySet().contains(key)) |
| //QC-CWE570 and QCerrorCNT Condition NEVER true : no interval for variable (boolean;Object)java.util.Set.contains |
| { |
| return true; |
| //QC Intervals : (boolean) java.util.ResourceBundle.containsKey.return : Interval 0 : true : true |
| } |
| //QC Intervals :(boolean;Object) java.util.Set.contains |
| : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| } |
| return false; |
| //QC Intervals : (boolean) java.util.ResourceBundle.containsKey.return : Interval 0 : false : false |
| } |
| public |
| Set<String > keySet |
| //QC Intervals :(Set<String>) java.util.ResourceBundle.keySet : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ( |
| ) |
| { |
| Set<String > keys=new HashSet<String > (); |
| //QC Intervals :(Set<String>) java.util.ResourceBundle.keySet.keys : Interval 0 : new : new |
| for ( |
| ResourceBundle rb |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.keySet.rb : Interval 0 : new : new |
| =this; |
| rb!=null ; |
| rb=rb.parent |
| ) |
| { |
| keys.addAll(rb.handleKeySet()); |
| //QC Intervals :(Collection) java.util.Set.addAll |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //type of the function/method : boolean |
| //QC-CWE252 or QCerrorRTF return type of function is not tested (see http://cwe.mitre.org/data/definitions/252.html) |
| } |
| return keys; |
| //QC Intervals :(Set<String>) java.util.ResourceBundle.keySet.return : Interval 0 : new : new |
| } |
| protected |
| Set<String > handleKeySet |
| //QC Intervals :(Set<String>) java.util.ResourceBundle.handleKeySet : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ( |
| ) |
| { |
| if (keySet==null ) |
| //QC Intervals : (Set) java.util.ResourceBundle.handleKeySet |
| : Interval 0 : null : null |
| { |
| synchronized (this) |
| { |
| if (keySet==null ) |
| //QC Intervals : (Set) java.util.ResourceBundle.handleKeySet |
| : Interval 0 : null : null |
| { |
| Set<String > keys=new HashSet<String > (); |
| //QC Intervals :(Set<String>) java.util.ResourceBundle.handleKeySet.keys : Interval 0 : new : new |
| Enumeration<String > enumKeys=getKeys(); |
| //QC Intervals :(Enumeration<String>) java.util.ResourceBundle.handleKeySet.enumKeys : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| while (enumKeys.hasMoreElements()) |
| //QC-CWE476 or QCerrorNPE null pointer reference on enumKeys (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals : (boolean) java.util.Enumeration.hasMoreElements |
| : Interval 0 : true : true |
| { |
| String key=enumKeys.nextElement(); |
| //QC-CWE476 or QCerrorNPE null pointer reference on enumKeys (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals : (String) java.util.ResourceBundle.handleKeySet.key : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| if (handleGetObject(key)!=null ) |
| //QC Intervals : (String) java.util.ResourceBundle.handleKeySet |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (Object) java.util.ResourceBundle.handleKeySet |
| : Interval 0 : new : new |
| { |
| keys.add(key); |
| //QC Intervals : (E) java.util.Set.add |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //type of the function/method : boolean |
| //QC-CWE252 or QCerrorRTF return type of function is not tested (see http://cwe.mitre.org/data/definitions/252.html) |
| } |
| } |
| //QC-CWE476 or QCerrorNPE null pointer reference on enumKeys (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals : (boolean) java.util.Enumeration.hasMoreElements |
| : Interval 0 : false : false |
| keySet=keys; |
| //QC Intervals : (Set) java.util.ResourceBundle.handleKeySet |
| : Interval 0 : new : new |
| //assignation |
| } |
| } |
| } |
| return keySet; |
| //QC Intervals :(Set<String>) java.util.ResourceBundle.handleKeySet.return : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| } |
| public static |
| class Control |
| { |
| public static final |
| List<String > FORMAT_DEFAULT |
| //QC Intervals : (List) java.util.Collections |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals :(List<String>) java.util.ResourceBundle.Control.FORMAT_DEFAULT : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| =Collections.unmodifiableList(Arrays.asList("java . class","java . properties")) |
| ; |
| public static final |
| List<String > FORMAT_CLASS |
| //QC Intervals : (T) java.util.Arrays |
| 1 : Interval 0 : java . class : java . class |
| //QC Intervals : (List) java.util.Collections |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals :(List<String>) java.util.ResourceBundle.Control.FORMAT_CLASS : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| =Collections.unmodifiableList(Arrays.asList("java . class")) |
| ; |
| public static final |
| List<String > FORMAT_PROPERTIES |
| //QC Intervals : (T) java.util.Arrays |
| 1 : Interval 0 : java . properties : java . properties |
| //QC Intervals : (List) java.util.Collections |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals :(List<String>) java.util.ResourceBundle.Control.FORMAT_PROPERTIES : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| =Collections.unmodifiableList(Arrays.asList("java . properties")) |
| ; |
| public static final |
| long TTL_DONT_CACHE |
| //QC Intervals : (long) java.util.ResourceBundle.Control.TTL_DONT_CACHE : Interval 0 : -1 : -1 |
| =-1 |
| ; |
| public static final |
| long TTL_NO_EXPIRATION_CONTROL |
| //QC Intervals : (long) java.util.ResourceBundle.Control.TTL_NO_EXPIRATION_CONTROL: Interval 0 : -2 : -2 |
| =-2 |
| ; |
| private static final |
| Control INSTANCE |
| //QC Intervals : (Control) java.util.ResourceBundle.Control.INSTANCE : Interval 0 : new : new |
| =new Control() |
| ; |
| protected |
| Control |
| ( |
| ) |
| { |
| } |
| public static final |
| Control getControl |
| //QC Intervals : (Control) java.util.ResourceBundle.Control.getControl : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ( |
| List<String > formats |
| ) |
| //QC Intervals :(List<String>) java.util.ResourceBundle.Control.getControl.formats : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| if (formats.equals(Control.FORMAT_PROPERTIES)) |
| //QC Intervals : (Object) java.util.List.equals |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC-CWE476 or QCerrorNPE null pointer reference on formats (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals : (boolean) java.util.List.equals |
| : Interval 0 : true : true |
| { |
| return SingleFormatControl.PROPERTIES_ONLY; |
| //QC Intervals : (Control) java.util.ResourceBundle.Control.getControl.return : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| } |
| //QC-CWE476 or QCerrorNPE null pointer reference on formats (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals : (boolean) java.util.List.equals |
| : Interval 0 : false : false |
| if (formats.equals(Control.FORMAT_CLASS)) |
| //QC-CWE476 or QCerrorNPE null pointer reference on formats (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC-CWE570 and QCerrorCNT Condition NEVER true : no interval for variable (boolean)java.util.List.equals |
| { |
| return SingleFormatControl.CLASS_ONLY; |
| //QC Intervals : (Control) java.util.ResourceBundle.Control.getControl.return : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| } |
| //QC-CWE476 or QCerrorNPE null pointer reference on formats (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals : (boolean) java.util.List.equals |
| : Interval 0 : false : false |
| if (formats.equals(Control.FORMAT_DEFAULT)) |
| //QC-CWE476 or QCerrorNPE null pointer reference on formats (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC-CWE570 and QCerrorCNT Condition NEVER true : no interval for variable (boolean)java.util.List.equals |
| { |
| return Control.INSTANCE; |
| //QC Intervals : (Control) java.util.ResourceBundle.Control.getControl.return : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| } |
| //QC-CWE476 or QCerrorNPE null pointer reference on formats (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals : (boolean) java.util.List.equals |
| : Interval 0 : false : false |
| throw new IllegalArgumentException(); |
| } |
| public static final |
| Control getNoFallbackControl |
| //QC Intervals : (Control) java.util.ResourceBundle.Control.getNoFallbackControl : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ( |
| List<String > formats |
| ) |
| //QC Intervals :(List<String>) java.util.ResourceBundle.Control.getNoFallbackControl.formats: Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| if (formats.equals(Control.FORMAT_DEFAULT)) |
| //QC Intervals : (Object) java.util.List.equals |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC-CWE476 or QCerrorNPE null pointer reference on formats (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals : (boolean) java.util.List.equals |
| : Interval 0 : true : true |
| { |
| return NoFallbackControl.NO_FALLBACK; |
| //QC Intervals : (Control) java.util.ResourceBundle.Control.getNoFallbackControl.return: Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| } |
| //QC-CWE476 or QCerrorNPE null pointer reference on formats (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals : (boolean) java.util.List.equals |
| : Interval 0 : false : false |
| if (formats.equals(Control.FORMAT_PROPERTIES)) |
| //QC-CWE476 or QCerrorNPE null pointer reference on formats (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC-CWE570 and QCerrorCNT Condition NEVER true : no interval for variable (boolean)java.util.List.equals |
| { |
| return NoFallbackControl.PROPERTIES_ONLY_NO_FALLBACK; |
| //QC Intervals : (Control) java.util.ResourceBundle.Control.getNoFallbackControl.return: Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| } |
| //QC-CWE476 or QCerrorNPE null pointer reference on formats (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals : (boolean) java.util.List.equals |
| : Interval 0 : false : false |
| if (formats.equals(Control.FORMAT_CLASS)) |
| //QC-CWE476 or QCerrorNPE null pointer reference on formats (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC-CWE570 and QCerrorCNT Condition NEVER true : no interval for variable (boolean)java.util.List.equals |
| { |
| return NoFallbackControl.CLASS_ONLY_NO_FALLBACK; |
| //QC Intervals : (Control) java.util.ResourceBundle.Control.getNoFallbackControl.return: Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| } |
| //QC-CWE476 or QCerrorNPE null pointer reference on formats (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals : (boolean) java.util.List.equals |
| : Interval 0 : false : false |
| throw new IllegalArgumentException(); |
| } |
| public |
| List<String > getFormats |
| //QC Intervals :(List<String>) java.util.ResourceBundle.Control.getFormats : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ( |
| String baseName |
| ) |
| //QC Intervals : (String) java.util.ResourceBundle.Control.getFormats.baseName : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| if (baseName==null ) |
| //QC Intervals : (String) java.util.ResourceBundle.Control.getFormats.baseName : Interval 0 : null : null |
| { |
| throw new NullPointerException(); |
| } |
| //QC Intervals : (String) java.util.ResourceBundle.Control.getFormats.baseName : Interval 0 : new : new |
| return FORMAT_DEFAULT; |
| //QC Intervals :(List<String>) java.util.ResourceBundle.Control.getFormats.return : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| } |
| public |
| List<Locale > getCandidateLocales |
| //QC Intervals :(List<Locale>) java.util.ResourceBundle.Control.getCandidateLocales : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ( |
| String baseName |
| , |
| Locale locale |
| ) |
| //QC Intervals : (String) java.util.ResourceBundle.Control.getCandidateLocales.baseName: Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (Locale) java.util.ResourceBundle.Control.getCandidateLocales.locale: Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| if (baseName==null ) |
| //QC Intervals : (String) java.util.ResourceBundle.Control.getCandidateLocales.baseName: Interval 0 : null : null |
| { |
| throw new NullPointerException(); |
| } |
| //QC Intervals : (String) java.util.ResourceBundle.Control.getCandidateLocales.baseName: Interval 0 : new : new |
| String language=locale.getLanguage(); |
| //QC-CWE476 or QCerrorNPE null pointer reference on locale (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals : (String) java.util.ResourceBundle.Control.getCandidateLocales.language: Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| String country=locale.getCountry(); |
| //QC-CWE476 or QCerrorNPE null pointer reference on locale (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals : (String) java.util.ResourceBundle.Control.getCandidateLocales.country: Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| String variant=locale.getVariant(); |
| //QC-CWE476 or QCerrorNPE null pointer reference on locale (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals : (String) java.util.ResourceBundle.Control.getCandidateLocales.variant: Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| List<Locale > locales=new ArrayList<Locale > (4); |
| //QC Intervals :(List<Locale>) java.util.ResourceBundle.Control.getCandidateLocales.locales: Interval 0 : new : new |
| if (variant.length()> 0) |
| //QC-CWE476 or QCerrorNPE null pointer reference on variant (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC-CWE570 and QCerrorCNT Condition NEVER true : no interval for variable (String)java.util.ResourceBundle.Control.getCandidateLocales.variant |
| { |
| locales.add(locale); |
| //QC Intervals : (E) java.util.List.add |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //type of the function/method : boolean |
| //QC-CWE252 or QCerrorRTF return type of function is not tested (see http://cwe.mitre.org/data/definitions/252.html) |
| } |
| if (country.length()> 0) |
| //QC-CWE476 or QCerrorNPE null pointer reference on country (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC-CWE570 and QCerrorCNT Condition NEVER true : no interval for variable (String)java.util.ResourceBundle.Control.getCandidateLocales.country |
| { |
| locales.add((locales.size()==0)?locale:Locale.getInstance(language,country,"")); |
| //QC Intervals : (E) java.util.List.add |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //type of the function/method : boolean |
| //QC-CWE252 or QCerrorRTF return type of function is not tested (see http://cwe.mitre.org/data/definitions/252.html) |
| } |
| if (language.length()> 0) |
| //QC-CWE476 or QCerrorNPE null pointer reference on language (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC-CWE570 and QCerrorCNT Condition NEVER true : no interval for variable (String)java.util.ResourceBundle.Control.getCandidateLocales.language |
| { |
| locales.add((locales.size()==0)?locale:Locale.getInstance(language,"","")); |
| //QC Intervals : (E) java.util.List.add |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //type of the function/method : boolean |
| //QC-CWE252 or QCerrorRTF return type of function is not tested (see http://cwe.mitre.org/data/definitions/252.html) |
| } |
| locales.add(Locale.ROOT); |
| //QC Intervals : (E) java.util.List.add |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //type of the function/method : boolean |
| //QC-CWE252 or QCerrorRTF return type of function is not tested (see http://cwe.mitre.org/data/definitions/252.html) |
| return locales; |
| //QC Intervals :(List<Locale>) java.util.ResourceBundle.Control.getCandidateLocales.return: Interval 0 : new : new |
| } |
| public |
| Locale getFallbackLocale |
| //QC Intervals : (Locale) java.util.ResourceBundle.Control.getFallbackLocale : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ( |
| String baseName |
| , |
| Locale locale |
| ) |
| //QC Intervals : (String) java.util.ResourceBundle.Control.getFallbackLocale.baseName: Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (Locale) java.util.ResourceBundle.Control.getFallbackLocale.locale: Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| if (baseName==null ) |
| //QC Intervals : (String) java.util.ResourceBundle.Control.getFallbackLocale.baseName: Interval 0 : null : null |
| { |
| throw new NullPointerException(); |
| } |
| //QC Intervals : (String) java.util.ResourceBundle.Control.getFallbackLocale.baseName: Interval 0 : new : new |
| Locale defaultLocale=Locale.getDefault(); |
| //QC Intervals : (Locale) java.util.ResourceBundle.Control.getFallbackLocale.defaultLocale: Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| return locale.equals(defaultLocale)?null :defaultLocale; |
| //QC Intervals : (Object) java.util.Locale.equals |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (Locale) java.util.ResourceBundle.Control.getFallbackLocale.return: Interval 0 : null : null |
| } |
| public |
| ResourceBundle newBundle |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.Control.newBundle : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ( |
| String baseName |
| , |
| Locale locale |
| , |
| String format |
| , |
| ClassLoader loader |
| , |
| boolean reload |
| ) |
| //QC Intervals : (String) java.util.ResourceBundle.Control.newBundle.baseName : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (Locale) java.util.ResourceBundle.Control.newBundle.locale : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (String) java.util.ResourceBundle.Control.newBundle.format : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals :(ClassLoader) java.util.ResourceBundle.Control.newBundle.loader : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (boolean) java.util.ResourceBundle.Control.newBundle.reload : Interval 0 : false : true |
| throws IllegalAccessException,InstantiationException,IOException |
| { |
| String bundleName=toBundleName(baseName,locale); |
| //QC Intervals : (String) java.util.ResourceBundle.Control.toBundleName |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (Locale) java.util.ResourceBundle.Control.toBundleName |
| 2 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (String) java.util.ResourceBundle.Control.newBundle.bundleName : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ResourceBundle bundle=null ; |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.Control.newBundle.bundle : Interval 0 : null : null |
| if (format.equals("java . class")) |
| //QC Intervals : (Object) java.util.Hashtable.equals |
| 1 : Interval 0 : java . class : java . class |
| //QC-CWE476 or QCerrorNPE null pointer reference on format (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals : (boolean) java.util.Hashtable.equals |
| : Interval 0 : true : true |
| { |
| try |
| { |
| Class<? extends ResourceBundle > bundleClass=(Class<? extends ResourceBundle > )loader.loadClass(bundleName); |
| //QC Intervals : (String) java.lang.ClassLoader |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC-CWE476 or QCerrorNPE null pointer reference on loader (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals :(Class<?extendsResourceBundle>) java.util.ResourceBundle.Control.newBundle.bundleClass : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| if (ResourceBundle.class .isAssignableFrom(bundleClass)) |
| //QC-CWE570 and QCerrorCNT Condition NEVER true : no interval for variable (ResourceBundle)java.util.ResourceBundle.Control.newBundle |
| { |
| bundle=bundleClass.newInstance(); |
| //QC-CWE476 or QCerrorNPE null pointer reference on bundleClass (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.Control.newBundle.bundle : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //assignation |
| } |
| else |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.Control.newBundle |
| : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| throw new ClassCastException(bundleClass.getName()+" cannot be cast to ResourceBundle"); |
| } |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.Control.newBundle |
| : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| } |
| catch ( |
| ClassNotFoundException e |
| ) |
| //QC Intervals :(ClassNotFoundException) java.util.ResourceBundle.Control.newBundle.e : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| } |
| //QC-CWE390 Detection of error condition without action (see http://cwe.mitre.org/data/definitions/390.html) |
| } |
| else |
| //QC-CWE476 or QCerrorNPE null pointer reference on format (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals : (boolean) java.util.Hashtable.equals |
| : Interval 0 : false : false |
| if (format.equals("java . properties")) |
| //QC-CWE476 or QCerrorNPE null pointer reference on format (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC-CWE570 and QCerrorCNT Condition NEVER true : no interval for variable (boolean)java.util.Hashtable.equals |
| { |
| final String resourceName=toResourceName(bundleName,"properties"); |
| //QC Intervals : (String) java.util.ResourceBundle.Control.toResourceName |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (String) java.util.ResourceBundle.Control.toResourceName |
| 2 : Interval 0 : properties : properties |
| //QC Intervals : (String) java.util.ResourceBundle.Control.newBundle.resourceName: Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| final ClassLoader classLoader=loader; |
| //QC Intervals :(ClassLoader) java.util.ResourceBundle.Control.newBundle.classLoader : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| final boolean reloadFlag=reload; |
| //QC Intervals : (boolean) java.util.ResourceBundle.Control.newBundle.reloadFlag : Interval 0 : false : true |
| InputStream stream=null ; |
| //QC Intervals :(InputStream) java.util.ResourceBundle.Control.newBundle.stream : Interval 0 : null : null |
| try |
| { |
| stream=AccessController.doPrivileged(new PrivilegedExceptionAction<InputStream > (){public InputStream run()throws IOException{InputStream is=null ;if (reloadFlag){URL url=classLoader.getResource(resourceName);if (url!=null ){URLConnection connection=url.openConnection();if (connection!=null ){connection.setUseCaches(false);is=connection.getInputStream();}}}else {is=classLoader.getResourceAsStream(resourceName);}return is;}}); |
| //QC Intervals :(InputStream) java.util.ResourceBundle.Control.newBundle.run : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals :(InputStream) java.util.ResourceBundle.Control.newBundle.stream : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| public |
| InputStream run |
| //QC Intervals :(InputStream) java.util.ResourceBundle.Control.newBundle.run : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ( |
| ) |
| throws IOException |
| { |
| InputStream is=null ; |
| //QC Intervals :(InputStream) java.util.ResourceBundle.Control.newBundle.AccessController.PrivilegedExceptionAction<InputStream>.run.is: Interval 0 : null : null |
| if (reloadFlag) |
| //QC Intervals : (boolean) java.util.ResourceBundle.Control.newBundle.reloadFlag : Interval 0 : true : true |
| { |
| URL url=classLoader.getResource(resourceName); |
| //QC-CWE476 or QCerrorNPE null pointer reference on classLoader (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals : (URL) java.util.ResourceBundle.Control.newBundle.AccessController.PrivilegedExceptionAction<InputStream>.run.url: Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| if (url!=null ) |
| //QC Intervals : (URL) java.util.ResourceBundle.Control.newBundle.AccessController.PrivilegedExceptionAction<InputStream>.run.url: Interval 0 : new : new |
| { |
| URLConnection connection=url.openConnection(); |
| //QC Intervals :(URLConnection) java.util.ResourceBundle.Control.newBundle.AccessController.PrivilegedExceptionAction<InputStream>.run.connection: Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| if (connection!=null ) |
| //QC Intervals :(URLConnection) java.util.ResourceBundle.Control.newBundle.AccessController.PrivilegedExceptionAction<InputStream>.run.connection: Interval 0 : new : new |
| { |
| connection.setUseCaches(false); |
| //type of the function/method : TypeInconnu |
| is=connection.getInputStream(); |
| //QC Intervals :(InputStream) java.util.ResourceBundle.Control.newBundle.AccessController.PrivilegedExceptionAction<InputStream>.run.is: Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //assignation |
| } |
| } |
| } |
| else |
| //QC Intervals : (boolean) java.util.ResourceBundle.Control.newBundle.reloadFlag : Interval 0 : false : false |
| { |
| is=classLoader.getResourceAsStream(resourceName); |
| //QC-CWE476 or QCerrorNPE null pointer reference on classLoader (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals :(InputStream) java.util.ResourceBundle.Control.newBundle.AccessController.PrivilegedExceptionAction<InputStream>.run.is: Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //assignation |
| } |
| return is; |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.Control.newBundle.return : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| } |
| } |
| //assignation |
| } |
| catch ( |
| PrivilegedActionException e |
| ) |
| //QC Intervals :(PrivilegedActionException) java.util.ResourceBundle.Control.newBundle.e : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| throw (IOException )e.getException(); |
| } |
| if (stream!=null ) |
| //QC Intervals :(InputStream) java.util.ResourceBundle.Control.newBundle.stream : Interval 0 : new : new |
| { |
| try |
| { |
| bundle=(new PropertyResourceBundle(stream)); |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.Control.newBundle.bundle : Interval 0 : new : new |
| //assignation |
| } |
| finally |
| { |
| stream.close(); |
| //type of the function/method : void |
| } |
| } |
| } |
| else |
| //QC-CWE476 or QCerrorNPE null pointer reference on format (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals : (boolean) java.util.Hashtable.equals |
| : Interval 0 : false : false |
| { |
| throw new IllegalArgumentException("unknown format : "+format); |
| } |
| return bundle; |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.Control.newBundle.return : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| } |
| public |
| long getTimeToLive |
| //QC Intervals : (long) java.util.ResourceBundle.Control.getTimeToLive : Interval 0 : -9.2233720368548E+18 : 9.2233720368548E+18 |
| ( |
| String baseName |
| , |
| Locale locale |
| ) |
| //QC Intervals : (String) java.util.ResourceBundle.Control.getTimeToLive.baseName: Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (Locale) java.util.ResourceBundle.Control.getTimeToLive.locale : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| if ((baseName==null )||(locale==null )) |
| //QC Intervals : (String) java.util.ResourceBundle.Control.getTimeToLive.baseName: Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (Locale) java.util.ResourceBundle.Control.getTimeToLive.locale : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| throw new NullPointerException(); |
| } |
| //QC Intervals : (String) java.util.ResourceBundle.Control.getTimeToLive.baseName: Interval 0 : new : new |
| //QC Intervals : (Locale) java.util.ResourceBundle.Control.getTimeToLive.locale : Interval 0 : new : new |
| return TTL_NO_EXPIRATION_CONTROL; |
| //QC Intervals : (long) java.util.ResourceBundle.Control.getTimeToLive.return : Interval 0 : -2 : -2 |
| } |
| public |
| boolean needsReload |
| //QC Intervals : (boolean) java.util.ResourceBundle.Control.needsReload : Interval 0 : false : true |
| ( |
| String baseName |
| , |
| Locale locale |
| , |
| String format |
| , |
| ClassLoader loader |
| , |
| ResourceBundle bundle |
| , |
| long loadTime |
| ) |
| //QC Intervals : (String) java.util.ResourceBundle.Control.needsReload.baseName : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (Locale) java.util.ResourceBundle.Control.needsReload.locale : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (String) java.util.ResourceBundle.Control.needsReload.format : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals :(ClassLoader) java.util.ResourceBundle.Control.needsReload.loader : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.Control.needsReload.bundle : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (long) java.util.ResourceBundle.Control.needsReload.loadTime : Interval 0 : -9.2233720368548E+18 : 9.2233720368548E+18 |
| { |
| if (bundle==null ) |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.Control.needsReload.bundle : Interval 0 : null : null |
| { |
| throw new NullPointerException(); |
| } |
| //QC Intervals :(ResourceBundle) java.util.ResourceBundle.Control.needsReload.bundle : Interval 0 : new : new |
| if (format.equals("java . class")||format.equals("java . properties")) |
| //QC Intervals : (Object) java.util.Hashtable.equals |
| 1 : Interval 0 : java . class : java . class |
| //QC-CWE476 or QCerrorNPE null pointer reference on format (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals : (boolean) java.util.Hashtable.equals |
| : Interval 0 : false : true |
| { |
| format=format.substring(5); |
| //QC Intervals : (String) java.util.ResourceBundle.Control.needsReload.format : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //assignation |
| } |
| boolean result=false; |
| //QC Intervals : (boolean) java.util.ResourceBundle.Control.needsReload.result : Interval 0 : false : false |
| try |
| { |
| String resourceName=toResourceName(toBundleName(baseName,locale),format); |
| //QC Intervals : (String) java.util.ResourceBundle.Control.toBundleName |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (Locale) java.util.ResourceBundle.Control.toBundleName |
| 2 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (String) java.util.ResourceBundle.Control.toResourceName |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (String) java.util.ResourceBundle.Control.toResourceName |
| 2 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (String) java.util.ResourceBundle.Control.needsReload.resourceName: Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| URL url=loader.getResource(resourceName); |
| //QC Intervals : (String) java.lang.ClassLoader |
| 1 : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC-CWE476 or QCerrorNPE null pointer reference on loader (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals : (URL) java.util.ResourceBundle.Control.needsReload.url : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| if (url!=null ) |
| //QC Intervals : (URL) java.util.ResourceBundle.Control.needsReload.url : Interval 0 : new : new |
| { |
| long lastModified=0; |
| //QC Intervals : (long) java.util.ResourceBundle.Control.needsReload.lastModified: Interval 0 : 0 : 0 |
| URLConnection connection=url.openConnection(); |
| //QC Intervals :(URLConnection) java.util.ResourceBundle.Control.needsReload.connection: Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| if (connection!=null ) |
| //QC Intervals :(URLConnection) java.util.ResourceBundle.Control.needsReload.connection: Interval 0 : new : new |
| { |
| connection.setUseCaches(false); |
| //QC Intervals : (boolean) java.net.URLConnection.setUseCaches |
| 1 : Interval 0 : false : false |
| //type of the function/method : void |
| if (connection instanceof JarURLConnection ) |
| //QC Intervals : (boolean) instanceof : Interval 0 : true : true |
| { |
| JarEntry ent=((JarURLConnection )connection).getJarEntry(); |
| //QC Intervals :(JarEntry) java.util.ResourceBundle.Control.needsReload.ent : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| if (ent!=null ) |
| //QC Intervals :(JarEntry) java.util.ResourceBundle.Control.needsReload.ent : Interval 0 : new : new |
| { |
| lastModified=ent.getTime(); |
| //QC Intervals : (long) java.util.ResourceBundle.Control.needsReload.lastModified: Interval 0 : -9.2233720368548E+18 : 9.2233720368548E+18 |
| //assignation |
| if (lastModified==(-1)) |
| //QC Intervals : (long) java.util.ResourceBundle.Control.needsReload.lastModified: Interval 0 : -1 : -1 |
| { |
| lastModified=0; |
| //QC Intervals : (long) java.util.ResourceBundle.Control.needsReload.lastModified: Interval 0 : 0 : 0 |
| //assignation |
| } |
| } |
| } |
| else |
| //QC Intervals : (boolean) instanceof : Interval 0 : false : false |
| { |
| lastModified=connection.getLastModified(); |
| //QC Intervals : (long) java.util.ResourceBundle.Control.needsReload.lastModified: Interval 0 : -9.2233720368548E+18 : 9.2233720368548E+18 |
| //assignation |
| } |
| } |
| result=(lastModified>=loadTime); |
| //QC Intervals : (boolean) java.util.ResourceBundle.Control.needsReload.result : Interval 0 : true : true |
| //QC : Interval 1 : false : false |
| //assignation |
| } |
| } |
| catch ( |
| NullPointerException npe |
| ) |
| //QC Intervals :(NullPointerException) java.util.ResourceBundle.Control.needsReload.npe : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| throw npe; |
| } |
| catch ( |
| Exception e |
| ) |
| //QC Intervals :(Exception) java.util.ResourceBundle.Control.needsReload.e : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| } |
| //QC-CWE390 Detection of error condition without action (see http://cwe.mitre.org/data/definitions/390.html) |
| return result; |
| //QC Intervals : (boolean) java.util.ResourceBundle.Control.needsReload.return : Interval 0 : false : false |
| //QC : Interval 1 : true : true |
| //QC : Interval 2 : false : false |
| } |
| public |
| String toBundleName |
| //QC Intervals : (String) java.util.ResourceBundle.Control.toBundleName : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ( |
| String baseName |
| , |
| Locale locale |
| ) |
| //QC Intervals : (String) java.util.ResourceBundle.Control.toBundleName.baseName : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (Locale) java.util.ResourceBundle.Control.toBundleName.locale : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| if (locale==Locale.ROOT) |
| //QC Intervals : (Locale) java.util.ResourceBundle.Control.toBundleName.locale : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (Locale) java.util.Locale |
| : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| return baseName; |
| //QC Intervals : (String) java.util.ResourceBundle.Control.toBundleName.return : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| } |
| //QC Intervals : (Locale) java.util.ResourceBundle.Control.toBundleName.locale : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (Locale) java.util.Locale |
| : Interval 0 : new : new |
| //QC : Interval 1 : null : null |
| String language=locale.getLanguage(); |
| //QC-CWE476 or QCerrorNPE null pointer reference on locale (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals : (String) java.util.ResourceBundle.Control.toBundleName.language : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| String country=locale.getCountry(); |
| //QC-CWE476 or QCerrorNPE null pointer reference on locale (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals : (String) java.util.ResourceBundle.Control.toBundleName.country : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| String variant=locale.getVariant(); |
| //QC-CWE476 or QCerrorNPE null pointer reference on locale (see http://cwe.mitre.org/data/definitions/476.html) |
| //QC Intervals : (String) java.util.ResourceBundle.Control.toBundleName.variant : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| if ((language=="")&&((country=="")&&(variant==""))) |
| //QC-CWE570 and QCerrorCNT Condition NEVER true : no interval for variable (String)java.util.ResourceBundle.Control.toBundleName.language |
| //QC-CWE570 and QCerrorCNT Condition NEVER true : no interval for variable (String)java.util.ResourceBundle.Control.toBundleName.country |
| //QC-CWE570 and QCerrorCNT Condition NEVER true : no interval for variable (String)java.util.ResourceBundle.Control.toBundleName.variant |
| { |
| return baseName; |
| //QC Intervals : (String) java.util.ResourceBundle.Control.toBundleName.return : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| } |
| //QC-CWE570 and QCerrorCNT Condition NEVER true : no interval for variable (String)java.util.ResourceBundle.Control.toBundleName.language |
| //QC-CWE570 and QCerrorCNT Condition NEVER true : no interval for variable (String)java.util.ResourceBundle.Control.toBundleName.country |
| //QC-CWE570 and QCerrorCNT Condition NEVER true : no interval for variable (String)java.util.ResourceBundle.Control.toBundleName.variant |
| StringBuilder sb=new StringBuilder(baseName); |
| //QC Intervals :(StringBuilder) java.util.ResourceBundle.Control.toBundleName.sb : Interval 0 : new : new |
| sb.append('_'); |
| //type of the function/method : TypeInconnu |
| if (variant!="") |
| //QC-CWE570 and QCerrorCNT Condition NEVER true : no interval for variable (String)java.util.ResourceBundle.Control.toBundleName.variant |
| { |
| sb.append(language).append('_').append(country).append('_').append(variant); |
| //QC-CWE476 or QCerrorNPE null pointer reference on sb.append (see http://cwe.mitre.org/data/definitions/476.html) |
| //type of the function/method : TypeInconnu |
| } |
| else |
| //QC-CWE570 and QCerrorCNT Condition NEVER true : no interval for variable (String)java.util.ResourceBundle.Control.toBundleName.variant |
| if (country!="") |
| //QC-CWE570 and QCerrorCNT Condition NEVER true : no interval for variable (String)java.util.ResourceBundle.Control.toBundleName.country |
| { |
| sb.append(language).append('_').append(country); |
| //QC-CWE476 or QCerrorNPE null pointer reference on sb.append (see http://cwe.mitre.org/data/definitions/476.html) |
| //type of the function/method : TypeInconnu |
| } |
| else |
| //QC-CWE570 and QCerrorCNT Condition NEVER true : no interval for variable (String)java.util.ResourceBundle.Control.toBundleName.country |
| { |
| sb.append(language); |
| //type of the function/method : TypeInconnu |
| } |
| return sb.toString(); |
| //QC Intervals : (String) java.util.ResourceBundle.Control.toBundleName.return : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| } |
| public final |
| String toResourceName |
| //QC Intervals : (String) java.util.ResourceBundle.Control.toResourceName : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ( |
| String bundleName |
| , |
| String suffix |
| ) |
| //QC Intervals : (String) java.util.ResourceBundle.Control.toResourceName.bundleName: Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (String) java.util.ResourceBundle.Control.toResourceName.suffix : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| StringBuilder sb=new StringBuilder(bundleName.length()+(1+suffix.length())); |
| //QC Intervals :(StringBuilder) java.util.ResourceBundle.Control.toResourceName.sb : Interval 0 : new : new |
| sb.append(bundleName.replace(' . ',' / ')).append(' . ').append(suffix); |
| //type of the function/method : TypeInconnu |
| return sb.toString(); |
| //QC Intervals : (String) java.util.ResourceBundle.Control.toResourceName.return : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| } |
| } |
| private static |
| class SingleFormatControl |
| extends Control |
| { |
| private static final |
| Control PROPERTIES_ONLY |
| //QC Intervals : (Control) java.util.ResourceBundle.SingleFormatControl.PROPERTIES_ONLY: Interval 0 : new : new |
| =new SingleFormatControl(FORMAT_PROPERTIES) |
| ; |
| private static final |
| Control CLASS_ONLY |
| //QC Intervals : (Control) java.util.ResourceBundle.SingleFormatControl.CLASS_ONLY: Interval 0 : new : new |
| =new SingleFormatControl(FORMAT_CLASS) |
| ; |
| private final |
| List<String > formats |
| //QC Intervals :(List<String>) java.util.ResourceBundle.SingleFormatControl.formats : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ; |
| protected |
| SingleFormatControl |
| ( |
| List<String > formats |
| ) |
| //QC Intervals :(List<String>) java.util.ResourceBundle.SingleFormatControl.SingleFormatControl.formats: Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| this.formats=formats; |
| //QC Intervals : (List) java.util.ResourceBundle.SingleFormatControl |
| : Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //assignation |
| } |
| public |
| List<String > getFormats |
| //QC Intervals :(List<String>) java.util.ResourceBundle.SingleFormatControl.getFormats: Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ( |
| String baseName |
| ) |
| //QC Intervals : (String) java.util.ResourceBundle.SingleFormatControl.getFormats.baseName: Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| if (baseName==null ) |
| //QC Intervals : (String) java.util.ResourceBundle.SingleFormatControl.getFormats.baseName: Interval 0 : null : null |
| { |
| throw new NullPointerException(); |
| } |
| //QC Intervals : (String) java.util.ResourceBundle.SingleFormatControl.getFormats.baseName: Interval 0 : new : new |
| return formats; |
| //QC Intervals :(List<String>) java.util.ResourceBundle.SingleFormatControl.getFormats.return: Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| } |
| } |
| private static final |
| class NoFallbackControl |
| extends SingleFormatControl |
| { |
| private static final |
| Control NO_FALLBACK |
| //QC Intervals : (Control) java.util.ResourceBundle.NoFallbackControl.NO_FALLBACK : Interval 0 : new : new |
| =new NoFallbackControl(FORMAT_DEFAULT) |
| ; |
| private static final |
| Control PROPERTIES_ONLY_NO_FALLBACK |
| //QC Intervals : (Control) java.util.ResourceBundle.NoFallbackControl.PROPERTIES_ONLY_NO_FALLBACK: Interval 0 : new : new |
| =new NoFallbackControl(FORMAT_PROPERTIES) |
| ; |
| private static final |
| Control CLASS_ONLY_NO_FALLBACK |
| //QC Intervals : (Control) java.util.ResourceBundle.NoFallbackControl.CLASS_ONLY_NO_FALLBACK: Interval 0 : new : new |
| =new NoFallbackControl(FORMAT_CLASS) |
| ; |
| protected |
| NoFallbackControl |
| ( |
| List<String > formats |
| ) |
| //QC Intervals :(List<String>) java.util.ResourceBundle.NoFallbackControl.NoFallbackControl.formats: Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| super(formats); |
| //type of the function/method : SingleFormatControl |
| } |
| public |
| Locale getFallbackLocale |
| //QC Intervals : (Locale) java.util.ResourceBundle.NoFallbackControl.getFallbackLocale: Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| ( |
| String baseName |
| , |
| Locale locale |
| ) |
| //QC Intervals : (String) java.util.ResourceBundle.NoFallbackControl.getFallbackLocale.baseName: Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (Locale) java.util.ResourceBundle.NoFallbackControl.getFallbackLocale.locale: Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| if ((baseName==null )||(locale==null )) |
| //QC Intervals : (String) java.util.ResourceBundle.NoFallbackControl.getFallbackLocale.baseName: Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| //QC Intervals : (Locale) java.util.ResourceBundle.NoFallbackControl.getFallbackLocale.locale: Interval 0 : null : null |
| //QC : Interval 1 : new : new |
| { |
| throw new NullPointerException(); |
| } |
| //QC Intervals : (String) java.util.ResourceBundle.NoFallbackControl.getFallbackLocale.baseName: Interval 0 : new : new |
| //QC Intervals : (Locale) java.util.ResourceBundle.NoFallbackControl.getFallbackLocale.locale: Interval 0 : new : new |
| return null ; |
| //QC Intervals : (Locale) java.util.ResourceBundle.NoFallbackControl.getFallbackLocale.return: Interval 0 : null : null |
| } |
| } |
| } |