mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 10:19:23 +02:00
GP-5326 fixed junit tests and removed check for default field names
This commit is contained in:
parent
2f581d0ead
commit
9429fa0a8e
4 changed files with 7 additions and 22 deletions
|
@ -117,8 +117,10 @@ public interface DataTypeComponent {
|
|||
*
|
||||
* @param fieldName the new field name for this component.
|
||||
*
|
||||
* @throws DuplicateNameException if another component of the parent has
|
||||
* the specified field name.
|
||||
* @throws DuplicateNameException This is actually never thrown anymore. All the other ways
|
||||
* of naming fields did not perform this check and it would cause quite a bit of churn to
|
||||
* add that exception to all the other methods that affect field names. So to be consistent,
|
||||
* we no longer do the check in this method.
|
||||
*/
|
||||
public void setFieldName(String fieldName) throws DuplicateNameException;
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ public interface InternalDataTypeComponent extends DataTypeComponent {
|
|||
public default String cleanupFieldName(String name) {
|
||||
// For now, silently convert whitespace to underscores
|
||||
String fieldName = StringUtilities.whitespaceToUnderscores(name);
|
||||
if (StringUtils.isBlank(fieldName) || fieldName.equals(getDefaultFieldName())) {
|
||||
if (StringUtils.isBlank(fieldName)) {
|
||||
fieldName = null;
|
||||
}
|
||||
return fieldName;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue