-
-
Notifications
You must be signed in to change notification settings - Fork 60
Warning clear #246
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
Warning clear #246
Conversation
…to maintain the user's machine state the encoding opt was added in build.xml at the EntryPoint target, thus not changing the machine status and runing the program with the asked enconding (#243) Signed-off-by: Jataki <manu-roberto@hotmail.com>
This commit served the purpose of cleaning off the warning messages. Fixes used: * Code deletion * Code commenting * Code fixing * TODOs One warning remaining that I couldn't get rid off. Some comments I put in are probably material to open new issues (refactoring and such in need) Signed-off-by: Jataki <manu-roberto@hotmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had started making some of these changes myself, but hadn't committed yet. Glad you started on it.
Please address the comments in this review.
g.drawLine(0, j + OFFSET_Y, clipBounds.width, j + OFFSET_Y); | ||
} | ||
} | ||
//For debugging |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I use this function often. Would prefer one of the following:
- Block comment
- SuppressWarning
@SuppressWarnings("unused") | ||
// by heritance this object already has a reader with the attribute name "lock" | ||
// this shouldn't be needed | ||
// TODO delete and refactor code |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's delete it right away.
@@ -60,7 +60,11 @@ | |||
* may be used directly when a different DOM implementation is preferred. | |||
*/ | |||
public class HtmlParser { | |||
private static final Logger logger = Logger.getLogger(HtmlParser.class.getName()); | |||
public ErrorHandler getErrorHandler() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this added?
|| values.isEmpty()) { | ||
//TODO the empty validation wasn't here, it was added because the called method | ||
// returns an empty list instead of null - confirm if this extra verification | ||
// isn't harmful as the code didn't had it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fine. In fact, you can remove the null check. From the documentation of getSelectedValuesList
, it doesn't seem to return null
ever.
for ( ExportableFloat fi : finfo.floats) { | ||
fi.pendingPlacement = true; | ||
} | ||
}*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please leave this intact. I have currently disabled the cache because of some bugs, but want to re-enable it later.
// } | ||
// } else { | ||
// newY = y; | ||
// } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's leave it intact for now.
public final FontMetrics getFontMetrics() { | ||
FontMetrics fm = this.iFontMetrics; | ||
if (fm == null) { | ||
// TODO getFontMetrics deprecated. How to get text width? | ||
// sugestion: using LineMetrics instead |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes that's a good suggestion. Please create an issue for this and remove the comment and SuppressWarnings
here.
@@ -133,7 +133,6 @@ public void run() { | |||
} else if ("GRINDER".equals(command)) { | |||
final DataOutputStream dos = new DataOutputStream(s.getOutputStream()); | |||
if (blankIdx != -1) { | |||
@SuppressWarnings("null") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have probably not enabled Annotation based Null analysis
in your IDE. I use Eclipse with this setting and without the SupressWarnings there is a warning on the following line.
connection.getHeaderFields().forEach((key, value) -> System.out.println(" " + key + " : " + value)); | ||
} | ||
} | ||
// It is referenced in this class so the method stays in case it's needed in the future |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use block comment when commenting out multiple lines of code.
@@ -247,15 +247,6 @@ private static String extractCharset(final java.net.URL responseURL, final Strin | |||
return locales; | |||
} | |||
|
|||
private static String getDefaultCharset(final URL url) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would prefer block commenting instead of removal.
This commit served the purpose of cleaning off the warning messages. Fixes used:
One warning remaining that I couldn't get rid off: The expression of type Iterator[] needs unchecked conversion to conform to Iterator[] @ RTable.java. Please see if a suppressWarning would make since (in my opinion, no, but I just couldn't see an answer for this).
Some suppressWarnings I put in are probably material to open new issues (code replace and refactoring and such in need) - I ask the maintainers to check them out and open new issues if that's the case. You can assign them to me, I just thought it wasn't material for this issue.