Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 187247

Summary: org.eclipse.jdt.internal.core.builder.State#copyFrom is a misnomer
Product: [Eclipse Project] JDT Reporter: Maxime Daniel <maxime_daniel>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: Olivier_Thomann
Version: 3.3   
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard: stalebug

Description Maxime Daniel CLA 2007-05-16 09:12:53 EDT
Source based, since 2002. Comment specifically applies to version v_761.

The intuitive meaning of copyFrom would be that it performs a copy from the parameter, which is not what it does (specifically, it clears the knownPackageNames, which is somewhat resetting a cache, but also increments the buildNumber field, which deserves to be reflected in the name of the method somehow - initializeFrom?).

Note also that the contents of the catch block lines 86-98 could arguably be simplified if we consider that SimpleLookupTable is final and its clone method won't throw any CloneNotSupportedException, and that SimpleLookupTable could omit the throws clause altogether.
Comment 1 Olivier Thomann CLA 2009-06-25 15:25:55 EDT
Kent, please evaluate.
If invalid, close it.
Thanks.
Comment 2 Eclipse Genie CLA 2020-03-03 17:19:40 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.