Problem
The convenience Java.Lang.Thread constructors that accept a .NET Action (instead of an IRunnable) in src/Mono.Android/Java.Lang/Thread.cs lack /// XML documentation. These are public, user-facing APIs shipped in Mono.Android.dll, so IntelliSense and generated API docs show no description for them.
Location
- File(s):
src/Mono.Android/Java.Lang/Thread.cs
- Line(s): 58, 60, 62, 64, 66
Current Code
public Thread (Action runHandler) : this (new RunnableImplementor (runHandler)) {}
public Thread (Action runHandler, string threadName) : this (new RunnableImplementor (runHandler), threadName) {}
public Thread (ThreadGroup group, Action runHandler) : this (group, new RunnableImplementor (runHandler)) {}
public Thread (ThreadGroup group, Action runHandler, string threadName) : this (group, new RunnableImplementor (runHandler), threadName) {}
public Thread (ThreadGroup group, Action runHandler, string threadName, long stackSize) : this (group, new RunnableImplementor (runHandler), threadName, stackSize) {}
Suggested Fix
Add a /// doc comment to each of the five constructors with a <summary> and a <param> for each parameter. Follow the style already used elsewhere in src/Mono.Android/ (see Android.Util/Log.cs and Android.Views/KeyCharacterMap.cs), including a <seealso href=...> link to the Android Thread documentation. Example for the first two:
/// <summary>
/// Initializes a new <see cref="Thread"/> that runs the specified <paramref name="runHandler"/> when started.
/// </summary>
/// <param name="runHandler">The delegate to execute on the new thread.</param>
/// <seealso href="(developer.android.com/redacted) documentation for <c>java.lang.Thread</c></seealso>
public Thread (Action runHandler) : this (new RunnableImplementor (runHandler)) {}
/// <summary>
/// Initializes a new <see cref="Thread"/> with the specified name that runs the specified <paramref name="runHandler"/> when started.
/// </summary>
/// <param name="runHandler">The delegate to execute on the new thread.</param>
/// <param name="threadName">The name of the new thread.</param>
/// <seealso href="(developer.android.com/redacted),%20java.lang.String)">Android documentation for <c>java.lang.Thread</c></seealso>
public Thread (Action runHandler, string threadName) : this (new RunnableImplementor (runHandler), threadName) {}
Document the remaining three constructors the same way, adding <param name="group">The thread group to which the new thread belongs.</param> and <param name="stackSize">The desired stack size for the new thread, or <c>0</c> to use the default.</param> where applicable.
Guidelines
- Only add documentation; do not change any behavior or signatures.
- Use tabs for indentation and Mono formatting conventions (space before
().
- Match the existing
<seealso href=...> doc-link style used in Android.Util/Log.cs.
Acceptance Criteria
Fix-finder metadata
- Script:
04-missing-xml-docs
- Score:
30/30 (actionability: 10, safety: 10, scope: 10)
Generated by Nightly Fix Finder · 83.7 AIC · ⌖ 17.3 AIC · ⊞ 9.4K · ◷
Problem
The convenience
Java.Lang.Threadconstructors that accept a .NETAction(instead of anIRunnable) insrc/Mono.Android/Java.Lang/Thread.cslack///XML documentation. These are public, user-facing APIs shipped inMono.Android.dll, so IntelliSense and generated API docs show no description for them.Location
src/Mono.Android/Java.Lang/Thread.csCurrent Code
Suggested Fix
Add a
///doc comment to each of the five constructors with a<summary>and a<param>for each parameter. Follow the style already used elsewhere insrc/Mono.Android/(seeAndroid.Util/Log.csandAndroid.Views/KeyCharacterMap.cs), including a<seealso href=...>link to the AndroidThreaddocumentation. Example for the first two:Document the remaining three constructors the same way, adding
<param name="group">The thread group to which the new thread belongs.</param>and<param name="stackSize">The desired stack size for the new thread, or <c>0</c> to use the default.</param>where applicable.Guidelines
().<seealso href=...>doc-link style used inAndroid.Util/Log.cs.Acceptance Criteria
Action-basedThreadconstructors have///XML documentation with<summary>and<param>entries.Fix-finder metadata
04-missing-xml-docs30/30(actionability: 10, safety: 10, scope: 10)