Sending object from one activity to another
<p>I am trying to implement a activity which takes a list of object and passing to another activty for processing. But I get NPE. This is my code.</p>

<pre><code>public class Order implements Parcelable {

public static class OrderProduct {
    private String productId;
    private String qty;

    public OrderProduct(String productId, String qty) {
        this.productId = productId;
        this.qty = qty;
    }

    public String getProductId() {
        return productId;
    }

    public String getQty() {
        return qty;
    }

    public void setQty(String qty) {
        this.qty = qty;
    }

    @Override
    public String toString() {
        return "productId: " + productId + "  qty: " + qty;
    }   

}

private String  customerId;
private Map&lt;String, OrderProduct&gt; products;
private OrderProduct product;

public Order(String customerId) {
    this.customerId = customerId;
    products = new HashMap&lt;String, OrderProduct&gt;();
}

public Order(Parcel in)
{
    product.productId = in.readString();
    product.qty = in.readString();
}

public void setProduct(String productId, String qty) {
    product = products.get(productId);
    if (product == null) {
        product = new OrderProduct(productId, qty);
    }
    else {
        product.setQty(qty);
    }
    products.put(productId, product);
}

public Collection&lt;OrderProduct&gt; getProducts() {
    return products.values();
}

public String getCustomerId() {
    return customerId;
}

@Override
public String toString() {
    StringBuffer sb = new StringBuffer();
    sb.append("Order: customerId: " + customerId + " { ");
    for (OrderProduct product : products.values()) {
        sb.append(" { ").append(product.toString()).append(" } ");
    }
    sb.append(" } ");
    return sb.toString();
}


@Override
public int describeContents()
{
    return 0;
}

@Override
public void writeToParcel(Parcel dest, int flags)
{
    // TODO Auto-generated method stub
    dest.writeString(product.getProductId());
    dest.writeString(product.qty);
}

public static final Order.Creator&lt;Order&gt; CREATOR = new Order.Creator&lt;Order&gt;() { 
    public Order createFromParcel(Parcel in) { 
        return new Order(in); 
    } 

    public Order[] newArray(int size) { 
        return new Order[size]; 
    } 
};  


}
</code></pre>

#############################   ACTIVITY 1   ##################

<pre><code>@Override
public boolean onOptionsItemSelected(MenuItem item) {
    switch (item.getItemId()) {
        case R.id.send_menu:
            //saveOrder(order);
            showOrderReview();
            break;
    }
    return true;
}  
</code></pre>

##############  ACITIVITY 2

<pre><code>public class ReviewOrderActivity extends Activity
{
@Override
public void onCreate(Bundle savedInstanceState)
{
    super.onCreate(savedInstanceState);
    // setContentView(R.layout.main);

    Intent i = getIntent();
    Order myOrderObject = (Order) i.getParcelableExtra("order");
    Collection&lt;Order.OrderProduct&gt; products = myOrderObject.getProducts();
    System.out.println("Orderrrrrrrrrrrr : " + products.size());

    for (Order.OrderProduct product : products){
    Log.d("---", " product.getQty() "+product.getQty()+"  "+product.getProductId());        
}
</code></pre>

<p>}</p>
