atlasmap-attic / atlasmap-runtime

AtlasMap runtime engine and design time services
http://atlasmap.io
Other
3 stars 8 forks source link

Java field inspection ignores package private fields #253

Closed igarashitm closed 7 years ago

igarashitm commented 7 years ago

https://github.com/atlasmap/atlasmap-runtime/blob/ce498616965254723428641ab5c03ed80cff4d40/atlas-java-parent/atlas-java-inspect/src/main/java/io/atlasmap/java/inspect/ClassInspectionService.java#L598-L611

mattrpav commented 7 years ago

@igarashitm are you sure this isn't a configuration issue? The inspection service supports configuring a number of those behaviors.. see the "disable*Fields" settings

igarashitm commented 7 years ago

@mattrpav if you look at the if-else clauses it only handle PRIVATE/PROTECTED/PUBLIC and no pattern for if it doesn't have any of them. I'm actually seeing package private fields are ignored on my way fixing #234. Weird thing is that not all the fields, part of them are still handled.

mattrpav commented 7 years ago

Ah.. "package-private".. makes sense.. we'd need to

  1. Update Atlas JavaField modifiers enum to include PACKAGE-PRIVATE as an option
  2. detect at the end of detectModifiers() if one of public, protected and private aren't set and add PACKAGE-PRIVATE