-
-
Save yohanes/5909b24a86db0023cd4d614a1fae12de to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package es.yohan.examples; | |
class LicenseChecker { | |
int rootResult; | |
void checkRoot(String xml_config) { | |
//do some checking | |
rootResult = 0; | |
//setup other things | |
} | |
private boolean isValidLicense(String serialnumber) { | |
result = false; | |
//computations here | |
return result; | |
} | |
public void validateLicense() throws LicenseException { | |
String serialnumber = Config.get("SERIAL"); | |
if (!isValidLicense(serialnumber)) { | |
throw new LicenseException("Invalid serial number"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment