Skip to content

Instantly share code, notes, and snippets.

@Riduidel
Last active August 29, 2015 14:05
Show Gist options
  • Select an option

  • Save Riduidel/53605a4db5dd679f6010 to your computer and use it in GitHub Desktop.

Select an option

Save Riduidel/53605a4db5dd679f6010 to your computer and use it in GitHub Desktop.
Drole d'exception ...

Donc j'ai cette exception

  Daemon Thread [p: thread-pool-1; w: 9] (Suspended (exception java.lang.ArrayIndexOutOfBoundsException))	
    	java.util.HashMap<K,V>.put(K, V) line: 498	
		java.util.HashSet<E>.add(E) line: 217	

Quand je regarde mon code, j'ajoute des objets dans un bête HashSet. La seule particularité, c'est la méthode de calcul du hashcode :

public int hashCode() {
	final int prime = 31;
	int result = 1;
	result = prime * result + ((parameterId == null) ? 0 : parameterId.hashCode());
	return result;
}

Ca semble fonctionner correctement sous Windows avec un java 1.7.0._60, mais planter sous linux avec Java 1.7.0_45

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment