Apply suggestions from code review
Additionally moved issue sanitization from server to client. Co-authored-by: DieGurke <maxi@kske.dev> Co-authored-by: CyB3RC0nN0R <kske@outlook.de>
This commit is contained in:
		@@ -6,31 +6,28 @@ package envoy.event;
 | 
			
		||||
 * <p>
 | 
			
		||||
 * Project: <strong>common</strong><br>
 | 
			
		||||
 * File: <strong>IssueProposal.java</strong><br>
 | 
			
		||||
 * Created: <strong>Aug 5, 2020</strong><br>
 | 
			
		||||
 * Created: <strong>05.08.2020</strong><br>
 | 
			
		||||
 *
 | 
			
		||||
 * @author Leon Hofmeister
 | 
			
		||||
 * @since Envoy Common v0.2-beta
 | 
			
		||||
 */
 | 
			
		||||
public class IssueProposal extends Event<String> {
 | 
			
		||||
 | 
			
		||||
	private final String	submitterName;
 | 
			
		||||
	private final String	description;
 | 
			
		||||
	private final boolean	bug;
 | 
			
		||||
 | 
			
		||||
	private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * @param title         the title of the reported bug
 | 
			
		||||
	 * @param description   the description of this bug
 | 
			
		||||
	 * @param submitterName the user who submitted the bug
 | 
			
		||||
	 * @param isBug         determines whether this {@code IssueProposal} is
 | 
			
		||||
	 *                      supposed to be a
 | 
			
		||||
	 *                      feature or a bug (true = bug, false = feature)
 | 
			
		||||
	 * @param title       the title of the reported bug
 | 
			
		||||
	 * @param description the description of this bug
 | 
			
		||||
	 * @param isBug       determines whether this {@code IssueProposal} is
 | 
			
		||||
	 *                    supposed to be a
 | 
			
		||||
	 *                    feature or a bug (true = bug, false = feature)
 | 
			
		||||
	 * @since Envoy Common v0.2-beta
 | 
			
		||||
	 */
 | 
			
		||||
	public IssueProposal(String title, String description, String submitterName, boolean isBug) {
 | 
			
		||||
	public IssueProposal(String title, String description, boolean isBug) {
 | 
			
		||||
		super(title);
 | 
			
		||||
		this.submitterName	= submitterName;
 | 
			
		||||
		this.description	= description;
 | 
			
		||||
		bug					= isBug;
 | 
			
		||||
	}
 | 
			
		||||
@@ -42,16 +39,9 @@ public class IssueProposal extends Event<String> {
 | 
			
		||||
	public String getDescription() { return description; }
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * @return the name of the user who sent this bug report
 | 
			
		||||
	 * @since Envoy Common v0.2-beta
 | 
			
		||||
	 */
 | 
			
		||||
	public String getSubmitterName() { return submitterName; }
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * @return whether this issue is supposed to be a bug - if false it is intended
 | 
			
		||||
	 * @return whether this issue is supposed to be a bug - otherwise it is intended
 | 
			
		||||
	 *         as a feature
 | 
			
		||||
	 * @since Envoy Common v0.2-beta
 | 
			
		||||
	 */
 | 
			
		||||
	public boolean isBug() { return bug; }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user