java equals true with different hashcodes : I am going through the java.lang.Object API which states the below the point on objects equality:
https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html

**public boolean equals(Object obj):**

> It is generally necessary to override the hashCode method whenever
> this method is overridden, so as to maintain the general contract for
> the hashCode method, which states that equal objects must have equal
> hash codes.


**Now to test the above theory on "equal objects must have equal hash codes", I have come up with the below simple code:**

    public class Product {
    
    	private String name;
    	
    	public Product(String name) {
    		this.name = name;
    	}
    	
    	@Override
    	public boolean equals(Object obj) {
    	    //always returns true for all objects
    		return true;
    	}
    	
    	@Override
    	public int hashCode() {
    	    //Different hascodes for different objects
    		if(name.equals("PRODUCT1")) {
    			return 10;
    		} else {
    			return 20;
    		}
    	}
    	
    	public static void main(String[] args) {
    		Product p1 = new Product("PRODUCT1");
    		Product p2 = new Product("PRODUCT2");
    		
    		if(p1.equals(p2)) {
    			System.out.println(" p1 p2 are equal **** ");
    		} else {
    			System.out.println(" p1 p2 are NOT equal **** ");
    		}
    	}
    }

***Output:***

 p1 p2 are equal **** 


**So, is n't the above code violating/contradicting the API statement "equal objects must have equal hash codes" i.e., equal objects need NOT have same hashcodes ? 
Or else what am I missing in the above code ?**

 Please help.