Bug 757 - Exception in thread "main" java.lang.Error
Summary: Exception in thread "main" java.lang.Error
Status: RESOLVED FIXED
Alias: None
Product: Hospital-Managment
Classification: Unclassified
Component: Bug (show other bugs)
Version: 1.1
Hardware: PC Windows
: --- blocker
Assignee: Crist
URL:
Depends on:
Blocks:
 
Reported: 2022-12-05 22:10 HKT by Crist
Modified: 2022-12-05 22:13 HKT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Crist 2022-12-05 22:10:35 HKT
Exception in thread "main" java.lang.Error: Unresolved compilation problem: 
	Type mismatch: cannot convert from boolean to Admin


Exception arise when trying to acces admin option (option 1 at main portal)
Comment 1 Crist 2022-12-05 22:13:16 HKT
Issue: dev forgot to change getInstance method at Admin class. It was returning a boolean (used for debbuging) and it should return the current Admin instance.

Code changed from: 

    public static boolean getInstance()
    {
    	boolean tryVariable = true;
        return tryVariable;
    }

to: 
    private static Admin inst = new Admin();

    public static Admin getInstance()
    {
        return inst;
    }