Révision 824

tmp/org.txm.rcp/src/main/java/org/txm/rcp/adapters/TXMResultAdapter.java (revision 824)
33 33
		if (result instanceof TXMResult) {
34 34
			TXMResult r = (TXMResult)result;
35 35

  
36
			if(!r.getUserName().isEmpty())	{
36
			if(r.getUserName() != null)	{
37 37
				return r.getUserName();
38 38
			}
39 39
			else	{
tmp/org.txm.core/src/java/org/txm/core/results/TXMResult.java (revision 824)
104 104
	/**
105 105
	 * The user name. To rename a result but also to store the simple name for unserialization and lazy loading.
106 106
	 */
107
	//protected String userName;
107
	protected String userName;
108 108

  
109 109
	/**
110 110
	 * The command preferences node qualifier.
......
201 201
		}
202 202

  
203 203
		// retrieving user name
204
//		if (!this.getStringParameterValue(TXMPreferences.NAME).isEmpty()) {
205
//			this.userName = this.getStringParameterValue(TXMPreferences.NAME);
206
//		}
204
		if (!this.getStringParameterValue(TXMPreferences.NAME).isEmpty()) {
205
			this.userName = this.getStringParameterValue(TXMPreferences.NAME);
206
		}
207 207

  
208 208
		// loads parameters from local result node, current command preferences or default command preferences
209 209
		try {
......
218 218
	}
219 219

  
220 220
	public void setUserName(String name) {
221
		//userName = name;
222
		this.saveParameter(TXMPreferences.NAME, name);
221
		userName = name;
222
		//this.saveParameter(TXMPreferences.NAME, name);
223 223
	}
224 224

  
225 225
	/**
......
713 713
		// internal data to save for unserialization
714 714
		this.saveParameter("class", this.getClass().getName());
715 715
		// store the user name if exists otherwise the simple name
716
		if(this.getStringParameterValue(TXMPreferences.NAME).isEmpty())	{
716
		if(this.userName != null)	{
717
			this.saveParameter(TXMPreferences.NAME, this.userName);
718
		}
719
		else	{
717 720
			this.saveParameter(TXMPreferences.NAME, this.getSimpleName());
718 721
		}
719 722
		this.saveParameter(TXMPreferences.RESULT_UUID, this.uniqueID);
......
1763 1766
	 * @return the userName (never null) "" if not set
1764 1767
	 */
1765 1768
	public String getUserName() {
1766
		return this.getStringParameterValue(TXMPreferences.NAME);
1769
		//return this.getStringParameterValue(TXMPreferences.NAME);
1770
		return userName;
1767 1771
	}
1768 1772

  
1769 1773
	@Override

Formats disponibles : Unified diff