Skip to content
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

Code bugs. #505

Merged
merged 9 commits into from
Apr 6, 2018
Merged

Code bugs. #505

merged 9 commits into from
Apr 6, 2018

Conversation

RusTit
Copy link
Contributor

@RusTit RusTit commented Apr 6, 2018

At first i thought that something is broken, but after some tests I realized that everything work (flower image sizes). So calculation can be removed.
Fuchsia has one section.


Foxglove - two.

2018-04-06_15 50 51
2018-04-06_15 50 52
2018-04-06_15 51 08
2018-04-06_15 51 10

@RusTit
Copy link
Contributor Author

RusTit commented Apr 6, 2018

From Idea:
Reports a null check followed by an instanceof check or a method call which will surely return false when null is passed (e.g. Class.isInstance). Since the instanceof operator always returns false for null, there is no need to have an additional null check.
Here is an example of a violation:
if (x != null && x instanceof String) { ... }
The quickfix changes this code to:
if (x instanceof String) { ... }

@RusTit
Copy link
Contributor Author

RusTit commented Apr 6, 2018

@Nedelosk I will be grateful if you review this and #504 today

@Nedelosk Nedelosk merged commit 42435ea into ForestryMC:master-MC1.12 Apr 6, 2018
public final class EmptyHelper {
private EmptyHelper() {}

public static final String EMPTY_STRING = "";
Copy link
Member

Choose a reason for hiding this comment

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

I think this is probably overkill, I'd be surprised if the JVM does not have some kind of optimization for the empty string.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hm. Probably you are right.
But now I used StringUtils.Empty (as you can see in #504)

Copy link
Member

Choose a reason for hiding this comment

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

Ok, sounds good.

@RusTit RusTit deleted the code_bugs branch April 15, 2018 01:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants