// version as the latest agent version as told to us by the server, then this agent should update now.
// Notice we will only check the build number (hash), the version may be the same but the
// build hashes will be different.
boolean agentUpdateEnabled = getConfiguration().isAgentUpdateEnabled();
if (agentUpdateEnabled) {
AgentVersion latestVersion = results.getLatestAgentVersion();
if (latestVersion != null && latestVersion.getBuild() != null) {
AgentVersion ourVersion = getAgentVersion();
if (!ourVersion.getBuild().equals(latestVersion.getBuild())) {
throw new AgentNotSupportedException(MSG.getMsg(
AgentI18NResourceKeys.AGENT_BUILD_DOES_NOT_MATCH_AUTO_UPDATE_NOW, ourVersion,
latestVersion));
}
}