1

I created a structured search and replace, using this search string:

protected $FieldType$ $FieldName$;

and this replace string:

private $FieldType$ $FieldName$;

to replace, for example, this:

@Autowired
protected JdbcTemplate jdbcTemplate;

with:

@Autowired
private JdbcTemplate jdbcTemplate;

However, the result is this:

private JdbcTemplate jdbcTemplate;

That is, the annotation goes away. How do I avoid this? The code base has many protected fields with various annotations, and I want to leave them untouched whatever they are.

Bas Leijdekkers
  • 23,709
  • 4
  • 70
  • 68
Don Branson
  • 13,631
  • 10
  • 59
  • 101

1 Answers1

1

It turns out this was a bug in Structural Search & Replace.

Bas Leijdekkers
  • 23,709
  • 4
  • 70
  • 68