Projects >> akvo-flow >>f2e8b6fc5220a71ea3e9411cc0a573f9470cbaa2

Chunk
Conflicting content
>>>>>>> 7dbf9b9e8ed86082a9940bf4347aa7adfd2b7eb2

package org.waterforpeople.mapping.portal.client.widgets;

<<<<<<< HEAD
import java.util.ArrayList;
import java.util.Collections;

=======
import org.waterforpeople.mapping.app.gwt.client.device.DeviceDto;
import org.waterforpeople.mapping.app.gwt.client.device.DeviceService;
import org.waterforpeople.mapping.app.gwt.client.device.DeviceServiceAsync;
Solution content
package org.waterforpeople.mapping.portal.client.widgets;

import java.util.ArrayList;
import java.util.Collections;

import org.waterforpeople.mapping.app.gwt.client.device.DeviceDto;
import org.waterforpeople.mapping.app.gwt.client.device.DeviceService;
import org.waterforpeople.mapping.app.gwt.client.device.DeviceServiceAsync;
File
SummaryPortlet.java
Developer's decision
Version 1
Kind of conflict
Import
Chunk
Conflicting content
import com.google.gwt.user.client.ui.TreeItem;

/**
<<<<<<< HEAD
 * Displays summary information on:
 *   Surveys, inside their groups
 *   Devices, only the phone number
 *   Users, only the name (or email address, if name is empty)
=======
 * Displays summary information
>>>>>>> 7dbf9b9e8ed86082a9940bf4347aa7adfd2b7eb2
 * 
 * @author Christopher Fagiani
 * 
Solution content
import com.google.gwt.user.client.ui.TreeItem;

/**
 * Displays summary information on:
 *   Surveys, inside their groups
 *   Devices, only the phone number
 *   Users, only the name (or email address, if name is empty)
 * 
 * @author Christopher Fagiani
 * 
File
SummaryPortlet.java
Developer's decision
Version 1
Kind of conflict
Comment
Chunk
Conflicting content
			public void onSuccess(DeviceDto[] result) {
				if (result != null) {
<<<<<<< HEAD
					//Sort list alphabetically
					ArrayList nl = new ArrayList(result.length);
					for (int i = 0; i < result.length; i++) {
						nl.add(result[i].getPhoneNumber());
					}
					Collections.sort(nl);
					//Add to device tree
					for (String s:nl) {
						TreeItem tItem = new TreeItem(s);
=======
					for (int i = 0; i < result.length; i++) {
						TreeItem tItem = new TreeItem(
								result[i].getPhoneNumber());
>>>>>>> 7dbf9b9e8ed86082a9940bf4347aa7adfd2b7eb2
						deviceRoot.addItem(tItem);

					}
Solution content
			public void onSuccess(DeviceDto[] result) {
				if (result != null) {
					//Sort list alphabetically
					ArrayList nl = new ArrayList(result.length);
					for (int i = 0; i < result.length; i++) {
						nl.add(result[i].getPhoneNumber());
					}
					Collections.sort(nl);
					//Add to device tree
					for (String s:nl) {
						TreeItem tItem = new TreeItem(s);
						deviceRoot.addItem(tItem);

					}
File
SummaryPortlet.java
Developer's decision
Version 1
Kind of conflict
Comment
For statement
Method invocation
Variable
Chunk
Conflicting content
			public void onSuccess(UserDto[] result) {
				if (result != null) {
<<<<<<< HEAD
					//Sort list alphabetically
					ArrayList ul = new ArrayList(result.length);
					for (int i = 0; i < result.length; i++) {
						if (result[i].getUserName() != null) {
							ul.add(result[i].getUserName());
						} else {
							ul.add(result[i].getEmailAddress());
						}
					}
					Collections.sort(ul);
					//Add to device tree
					for (String s:ul) {
						TreeItem tItem = new TreeItem(s);
						userRoot.addItem(tItem);
					}

=======
					for (int i = 0; i < result.length; i++) {
						if (result[i].getUserName() != null) {
							userRoot.addItem(result[i].getUserName());
						} else {
							userRoot.addItem(result[i].getEmailAddress());
						}
					}
>>>>>>> 7dbf9b9e8ed86082a9940bf4347aa7adfd2b7eb2
				}
			}
		};
Solution content
			public void onSuccess(UserDto[] result) {
				if (result != null) {
					//Sort list alphabetically
					ArrayList ul = new ArrayList(result.length);
					for (int i = 0; i < result.length; i++) {
						if (result[i].getUserName() != null) {
							ul.add(result[i].getUserName());
						} else {
							ul.add(result[i].getEmailAddress());
						}
					}
					Collections.sort(ul);
					//Add to device tree
					for (String s:ul) {
						TreeItem tItem = new TreeItem(s);
						userRoot.addItem(tItem);
					}

				}
			}
		};
File
SummaryPortlet.java
Developer's decision
Version 1
Kind of conflict
Comment
For statement
Method invocation
Variable