⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 nullvalueunconditionalderef.java

📁 A static analysis tool to find bugs in Java programs
💻 JAVA
字号:
package edu.umd.cs.findbugs.ba.npe;import java.util.HashSet;import java.util.Set;import edu.umd.cs.findbugs.ba.Location;/** * Collected information about a single value number * observed at one or more locations to be both * definitely-null and unconditionally dereferenced. */public class NullValueUnconditionalDeref {	private boolean alwaysOnExceptionPath;	private boolean alwaysMethodReturnValue;	private Set<Location> derefLocationSet;	private Set<IsNullValue> values = new HashSet<IsNullValue>();	public NullValueUnconditionalDeref() {		this.alwaysOnExceptionPath = true;		this.alwaysMethodReturnValue = true;		this.derefLocationSet = new HashSet<Location>();	}	/**	 * @param isNullValue	 * @param unconditionalDerefLocationSet	 */	public void add(IsNullValue isNullValue, Set<Location> unconditionalDerefLocationSet) {		if (!isNullValue.isException()) { 			alwaysOnExceptionPath = false;		}		if (!isNullValue.isReturnValue()) { 			alwaysMethodReturnValue = false;		}		values.add(isNullValue);		derefLocationSet.addAll(unconditionalDerefLocationSet);	}	/**	 * @return Returns the derefLocationSet.	 */	public Set<Location> getDerefLocationSet() {		return derefLocationSet;	}	/**	 * @return Returns the alwaysOnExceptionPath.	 */	public boolean isAlwaysOnExceptionPath() {		return alwaysOnExceptionPath;	}	/**	 * @return Returns the alwaysOnExceptionPath.	 */	public boolean isMethodReturnValue() {		return alwaysMethodReturnValue;	}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -