1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-05 08:05:24 +02:00

Make a message cloneable

This commit is contained in:
Kushal Munir 2006-10-25 03:39:10 +00:00
parent c923ecb2cc
commit ea4e43aff4

View file

@ -474,4 +474,17 @@ public class SystemMessage
return sub.toString();
}
/**
* Creates a new message with the same component, subcomponent, number, level 1 and level 2 text as this message.
* @see java.lang.Object#clone()
*/
protected Object clone() throws CloneNotSupportedException {
try {
return new SystemMessage(component, subComponent, messageNumber, indicator, level1NS, level2NS);
}
catch (IndicatorException e) {
return null;
}
}
}