Skip to content

Dev/1.15.8 #83

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 15, 2023
Merged

Dev/1.15.8 #83

merged 2 commits into from
Nov 15, 2023

Conversation

alexjhawk
Copy link
Collaborator

No description provided.

@alexjhawk alexjhawk self-assigned this Nov 14, 2023
@alexjhawk alexjhawk requested a review from it-hms November 14, 2023 16:48
@alexjhawk alexjhawk marked this pull request as ready for review November 14, 2023 16:48
@alexjhawk alexjhawk requested a review from TomKimsey November 14, 2023 16:48
@alexjhawk alexjhawk added the bug Something isn't working label Nov 14, 2023
Copy link
Collaborator

@TomKimsey TomKimsey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General code clarity improvements

@@ -371,6 +371,16 @@ private static synchronized void processTagListEBDLine(String line)
case indexUnit:
String tagUnit = currentToken;

// Remove wrapping quotes if present
final char quoteChar = '"';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be named doubleQuoteChar to avoid ambiguity?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated, although I think it is/was fine either way.

At some point, code needs to be considered self-explanatory, otherwise, it introduces unnecessary redundancy. In situations like this, I don't have a hard preference against including variables such as doubleQuoteChar, but I don't think it is better than hardcoded ".

Given the code comment, a hardcoded " should have its meaning easily interpreted, and adding variable(s) can arguably make the code more difficult to follow in some situations simply because it results in longer code blocks.

final int firstCharIndex = 0;
final int secondCharIndex = 1;
final int lastCharIndex = tagUnit.length() - 1;
if (tagUnit.charAt(firstCharIndex) == quoteChar
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (tagUnit.charAt(firstCharIndex) == quoteChar
if (tagUnit.charAt(firstCharIndex) == quoteChar

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed

Removed extra quotes from being included in the
unit field of TagInfo objects since the unit field
is already a string object and the extra quotes are
redundant/confusing.
@alexjhawk alexjhawk merged commit aee6869 into main Nov 15, 2023
@alexjhawk alexjhawk deleted the dev/1.15.8 branch November 15, 2023 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants