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

Removed redundant static modifier for interface #5214

Closed
wants to merge 1 commit into from
Closed

Removed redundant static modifier for interface #5214

wants to merge 1 commit into from

Conversation

tbw777
Copy link
Contributor

@tbw777 tbw777 commented Jan 5, 2023

No needed to use static modifier for interfaces

Copy link
Contributor

@vieiro vieiro left a comment

Choose a reason for hiding this comment

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

Hi @tbw777 ,

Thanks for your PR. Can you elaborate on the benefit of this PR to the NetBeans project?

Thanks!

No needed to use static modifiers
@tbw777
Copy link
Contributor Author

tbw777 commented Jan 28, 2023

Rebased to master and updated with changes from #5215

@tbw777
Copy link
Contributor Author

tbw777 commented Jan 28, 2023

@vieiro

Can you elaborate on the benefit of this PR to the NetBeans project?

The project will take up
less disk space,
less time to network transfer,
less time to compile,
less time to index in the IDE,
less mem to use in the IDE,
less data with search using,
less distraction for the developer with the PR installed,
less intimidating for new developers

@mbien
Copy link
Member

mbien commented Jan 28, 2023

how much disk space does this save?

@tbw777
Copy link
Contributor Author

tbw777 commented Jan 28, 2023

@mbien
Less then sector size

@vieiro
Copy link
Contributor

vieiro commented Jan 28, 2023

Hi @tbw777 ,

The fact is that the Java compiler ignores "static" in inner interfaces and enums. The bytecode is exactly the same. You can test this yourself compiling these simple classes:

package a.b.c;
public class A {
  public static interface AA {}
  public static enum AAA {}
}

and

package a.b.c;
public class B {
  public interface BB {}
  public enum BBB {}
}

If you compile these classes with javac you'll see that the generated A.class and B.class have exactly the same size.

This does not affect performance, either. Since the generated bytecode is exactly the same the performance will be the same.

The fact is that this PR makes no difference to NetBeans. There will be no difference in performance, network consumption, etc.

We may approve it, since it does some cleaning of the source code, but I will have to review those 729 files, one by one, that you have changed, to make sure all your changes are correct. This is going to take some time to me, because I don't work for this. Maybe one week or two.

During these two weeks I won't be able to do anything else, I'm afraid.

Maybe next time you send a PR you can ask in the mailing list if the PR is worth the effort reviewing, because we would prefer adding new features to NetBeans instead of reviewing PRs that make no difference in performance. What say?

@mbien mbien added the do not merge Don't merge this PR, it is not ready or just demonstration purposes. label Jan 28, 2023
@tbw777
Copy link
Contributor Author

tbw777 commented Jan 29, 2023

i mean source code of course )) Ok

@tbw777 tbw777 mentioned this pull request Feb 2, 2023
@mbien
Copy link
Member

mbien commented Feb 3, 2023

@vieiro I would like to close this one. I don't see the point of this. I hope you haven't started reviewing yet :)

@vieiro
Copy link
Contributor

vieiro commented Feb 4, 2023

@mbien +1 in closing: can't see any advantage in the PR. Compiling >500k LOC because of this is a waste of resources.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code cleanup do not merge Don't merge this PR, it is not ready or just demonstration purposes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants