4747 * For the change list at project level, see {@link SCM}.
4848 *
4949 * <p>
50- * {@link Iterator} is expected to return newer changes first then older changes
51- * later.
50+ * {@link Iterator} is expected to return newer changes first then older changes later.
5251 *
5352 * @author Kohsuke Kawaguchi
5453 */
@@ -117,7 +116,6 @@ public final Object[] getItems() {
117116
118117 /**
119118 * Optional identification of the kind of SCM being used.
120- *
121119 * @return a short token, such as the SCM's main CLI executable name
122120 * @since 1.284
123121 */
@@ -128,7 +126,6 @@ public String getKind() {
128126
129127 /**
130128 * Constant instance that represents no changes.
131- *
132129 * @since 1.568
133130 */
134131 public static ChangeLogSet <? extends ChangeLogSet .Entry > createEmpty (Run build ) {
@@ -156,8 +153,16 @@ protected void setParent(ChangeLogSet parent) {
156153 }
157154
158155 /**
159- * Returns a human readable display name of the commit number, revision number,
160- * etc.
156+ * Returns a human readable display name of the commit number, revision number, and such thing
157+ * that identifies this entry.
158+ *
159+ * <p>
160+ * This method is primarily intended for visualization of the data.
161+ *
162+ * @return
163+ * null if such a concept doesn't make sense for the implementation. For example,
164+ * in CVS there's no single identifier for commits. Each file gets a different revision number.
165+ * @since 1.405
161166 */
162167 @ Exported
163168 public String getCommitId () {
@@ -166,26 +171,38 @@ public String getCommitId() {
166171
167172 /**
168173 * Returns the timestamp of this commit in the {@link Date#getTime()} format.
174+ *
175+ * <p>
176+ * This method is primarily intended for visualization of the data.
177+ *
178+ * @return
179+ * -1 if the implementation doesn't support it (for example, in CVS a commit
180+ * spreads over time between multiple changes on multiple files, so there's no single timestamp.)
181+ * @since 1.405
169182 */
170183 @ Exported
171184 public long getTimestamp () {
172185 return -1 ;
173186 }
174187
175188 /**
176- * Gets the first line commit message (short message).
189+ * Gets the "commit message".
190+ *
191+ * <p>
192+ * The exact definition depends on the individual SCM implementation.
193+ *
194+ * @return
195+ * Can be empty but never null.
177196 */
178197 @ Exported
179198 public abstract String getMsg ();
180199
181- /**
182- * Returns the full commit message.
200+ /** Returns the full commit message.
183201 *
184- * Default implementation returns the same value as getMsg().
185- * SCM implementations can override this if they support full message
186- * separately.
202+ * Default implementation returns the same value as {@link #getMsg()}.
203+ * SCM implementations may override if they provide a separate full message.
187204 *
188- * @since TODO
205+ * @since 2.552
189206 */
190207 @ Exported
191208 public String getComment () {
@@ -194,26 +211,46 @@ public String getComment() {
194211
195212 /**
196213 * The user who made this change.
214+ *
215+ * @return
216+ * never null.
197217 */
198218 @ Exported
199219 public abstract User getAuthor ();
200220
201221 /**
202- * Returns affected paths.
222+ * Returns a set of paths in the workspace that was
223+ * affected by this change.
224+ *
225+ * <p>
226+ * Contains string like 'foo/bar/zot'. No leading/trailing '/',
227+ * and separator must be normalized to '/'.
228+ *
229+ * @return never null.
203230 */
204231 @ Exported
205232 public abstract Collection <String > getAffectedPaths ();
206233
207234 /**
208- * Returns affected files.
235+ * Returns a set of paths in the workspace that was
236+ * affected by this change.
237+ * <p>
238+ * Noted: since this is a new interface, some of the SCMs may not have
239+ * implemented this interface. The default implementation for this
240+ * interface is throw UnsupportedOperationException
241+ * <p>
242+ * It doesn't throw NoSuchMethodException because I rather to throw a
243+ * runtime exception
244+ *
245+ * @return AffectedFile never null.
246+ * @since 1.309
209247 */
210248 public Collection <? extends AffectedFile > getAffectedFiles () {
211249 String scm = "this SCM" ;
212250 ChangeLogSet parent = getParent ();
213251 if (null != parent ) {
214252 String kind = parent .getKind ();
215- if (null != kind && !kind .trim ().isEmpty ())
216- scm = kind ;
253+ if (null != kind && !kind .trim ().isEmpty ()) scm = kind ;
217254 }
218255 throw new UnsupportedOperationException ("getAffectedFiles() is not implemented by " + scm );
219256 }
@@ -227,11 +264,9 @@ public String getMsgAnnotated() {
227264 try {
228265 a .annotate (parent .run , this , markup );
229266 } catch (RuntimeException e ) {
230- LOGGER .info ("ChangeLogAnnotator " + a .toString () + " failed to annotate message '" + getMsg ()
231- + "'; " + e .getMessage ());
267+ LOGGER .info ("ChangeLogAnnotator " + a .toString () + " failed to annotate message '" + getMsg () + "'; " + e .getMessage ());
232268 } catch (Error e ) {
233- LOGGER .severe ("ChangeLogAnnotator " + a + " failed to annotate message '" + getMsg () + "'; "
234- + e .getMessage ());
269+ LOGGER .severe ("ChangeLogAnnotator " + a + " failed to annotate message '" + getMsg () + "'; " + e .getMessage ());
235270 }
236271
237272 return markup .toString (false );
@@ -266,6 +301,7 @@ public interface AffectedFile {
266301 */
267302 String getPath ();
268303
304+
269305 /**
270306 * Return whether the file is new/modified/deleted
271307 */
0 commit comments