Skip to content

Comments

Clean Code for team/bundles/org.eclipse.core.net#2032

Closed
eclipse-platform-bot wants to merge 0 commit intomasterfrom
clean-code/team/bundles/org.eclipse.core.net
Closed

Clean Code for team/bundles/org.eclipse.core.net#2032
eclipse-platform-bot wants to merge 0 commit intomasterfrom
clean-code/team/bundles/org.eclipse.core.net

Conversation

@eclipse-platform-bot
Copy link
Contributor

The following cleanups were applied:

  • Add final modifier to private fields
  • Add missing '@Deprecated' annotations
  • Add missing '@Override' annotations
  • Add missing '@Override' annotations to implementations of interface methods
  • Convert control statement bodies to block
  • Make inner classes static where possible
  • Remove trailing white spaces on all lines
  • Remove unnecessary array creation for varargs
  • Remove unnecessary suppress warning tokens
  • Remove unused imports
  • Remove unused private constructors
  • Remove unused private fields
  • Remove unused private methods
  • Remove unused private types
  • Replace deprecated calls with inlined content where possible
  • Use pattern matching for instanceof

@github-actions
Copy link
Contributor

github-actions bot commented Jul 13, 2025

Test Results

 1 947 files  ±0   1 947 suites  ±0   1h 39m 47s ⏱️ + 2m 42s
 4 720 tests ±0   4 696 ✅ ±0   24 💤 ±0  0 ❌ ±0 
14 160 runs  ±0  13 993 ✅ ±0  167 💤 ±0  0 ❌ ±0 

Results for commit aecc67f. ± Comparison against base commit cbe2947.

♻️ This comment has been updated with latest results.

@laeubi
Copy link
Contributor

laeubi commented Jul 13, 2025

@jjohnstn in this case private unused fields are removed but they are actually required because we use them to call an external native API.

This is indicated by the @SuppressWarnings("unused") but it seems the cleanup remove them anyways. DO you think it would be possible to exclude items from the cleanup if explicitly marked with @SuppressWarnings("unused")?

@eclipse-platform-bot eclipse-platform-bot force-pushed the clean-code/team/bundles/org.eclipse.core.net branch from 464f791 to a2ce880 Compare July 14, 2025 03:49
@jjohnstn
Copy link
Contributor

@jjohnstn in this case private unused fields are removed but they are actually required because we use them to call an external native API.

This is indicated by the @SuppressWarnings("unused") but it seems the cleanup remove them anyways. DO you think it would be possible to exclude items from the cleanup if explicitly marked with @SuppressWarnings("unused")?

I think a reasonable solution would be to recognize the use of the native Structure class and ignore any checks for classes extending it. What do you think?

@eclipse-platform-bot eclipse-platform-bot force-pushed the clean-code/team/bundles/org.eclipse.core.net branch from a2ce880 to b9c4543 Compare July 15, 2025 03:50
@jjohnstn
Copy link
Contributor

PR eclipse-jdt/eclipse.jdt.ui#2344 has been merged. This will ignore fields in any class that sub-classes com.sun.jna.Structure

@eclipse-platform-bot eclipse-platform-bot force-pushed the clean-code/team/bundles/org.eclipse.core.net branch from b9c4543 to aecc67f Compare July 16, 2025 03:46
@eclipse-platform-bot eclipse-platform-bot force-pushed the clean-code/team/bundles/org.eclipse.core.net branch from aecc67f to 8bedfd8 Compare July 17, 2025 03:43
@eclipse-platform-bot eclipse-platform-bot deleted the clean-code/team/bundles/org.eclipse.core.net branch July 17, 2025 03:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants