Skip to content
This repository has been archived by the owner on Oct 22, 2023. It is now read-only.

Bug type OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE #81

Open
anand-iisl opened this issue Oct 4, 2019 · 0 comments
Open

Bug type OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE #81

anand-iisl opened this issue Oct 4, 2019 · 0 comments

Comments

@anand-iisl
Copy link

False positive

	Connection conn 		= null;
	PreparedStatement ps 	= null;
	ResultSet rs 			= null;
	String retVal 			= "";
	try 
	{
		DbBean db = new DbBean();
		conn = db.getconnection();
		
		String query = "SELECT VALUE FROM SETTINGS WHERE ATTRIBUTE=?";
		ps = conn.prepareStatement(query);
		ps.setString(1,"PORT");
		rs=ps.executeQuery();
		if(rs.next()) 
		{
			String value = rs.getString(1).trim();
			if(value.equals("") || rs.getString(1)== null) 
			{
				System.out.println("Failed To get Value for Attribute :"+Attribute);
			}
			else
				retVal= value;
		}
	}
	catch (Exception e) 
	{
		e.printStackTrace();
	}
	finally {try {if(rs!=null) {rs.close();rs=null;}if(ps!=null) {ps.close();ps=null;}if(conn!=null) {conn.close();conn=null;}} catch (Exception e2) {e2.printStackTrace();}}
	return retVal;

===========

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant