Skip to content
This repository was archived by the owner on Jul 7, 2022. It is now read-only.

can locationClass work properly? #74

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

eillon
Copy link

@eillon eillon commented Mar 25, 2019

in my view, the locationClass is initialized by this function:

public static CrailLocationClass getLocationClass() throws UnknownHostException{
	return CrailLocationClass.get(InetAddress.getLocalHost().getCanonicalHostName().hashCode());
}

The locationClass is a String's hashCode, so it can be a negative number. However, in your code, the
negative locationClass doesn't work at all.I think remove the judge of locationClass will be better.

@patrickstuedi
Copy link
Contributor

Thanks for catching this. It seems, though, there are more changes required to fix this. Like this check here:

should probably be != 0

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

Successfully merging this pull request may close these issues.

2 participants