Hi all,

I poked at this a little bit today.  I managed to find some common patterns, so I worked across the code base and knocked out a few smaller modules.

When I tried gt-coverage, I hit issues with JAI using raw Maps.  Should the plan there be to Suppress those readily?

In gt-referencing, I hit two issues:

A.  Raw 'Unit' needing to be cast to Unit<Time> and the like.  Sounds like that a suppression?

B.  Lots of declarations in the AuthorityFactoryProxy[1] look like this:
privatestaticfinalClass/*<? extends IdentifiedObject>*/[] TYPES

Can the comments be removed?

Generally, how much of the API should be up for change as part of this?

For instance, GeneralParameterValue maybe should take type parameters[2], and ObjectCache[3] could also be parameterized (or replaced with something like Caffeine or Guava.

Thoughts?

Cheers,

Jim

1. https://github.com/geotools/geotools/blob/master/modules/library/referencing/src/main/java/org/geotools/referencing/factory/AuthorityFactoryProxy.java#L77

2. https://github.com/geotools/geotools/blob/master/modules/library/opengis/src/main/java/org/opengis/parameter/GeneralParameterValue.java#L28

3.


On 7/6/20 2:46 AM, Andrea Aime wrote:
On Sun, Jul 5, 2020 at 8:44 PM Jody Garnett <jody.garn...@gmail.com <mailto:jody.garn...@gmail.com>> wrote:


    Looking at the diff that is indeed much more readable.

    I would like to help out and really focus on the docs and code
    examples.

    Do you have specific examples that you did not know how to fix
    that you could point me at?


There are cases that I think cannot be fixed, but only suppressed, like these:

  * Using reflection to get value of a field, the cast on return is
    unchecked, two cases here:
    
https://github.com/geotools/geotools/pull/3043/files#diff-bd3a99c28048a08c5f16c25cb33d5fe5R123
  * Using the Array class, which returns Object results that need
    casting:
    
https://github.com/geotools/geotools/pull/3043/files#diff-70e0570500f24cc12d8ac92e170d5aa2R172
  * Using a enum value to replace null, Null.PLACEHOLDER is not the
    same type as the keys in the map, by design:
    
https://github.com/geotools/geotools/pull/3043/files#diff-4eb4e400417d4aa1f96fe91b67e5a704R457

However there are also cases where I'm not sure... RangeSet is the festival of unchecked casts, but I could not find an easy way to address them: https://github.com/geotools/geotools/pull/3043/files#diff-a6babed8dadc28c52af15c4c531afbecR50 I have the feeling the API and functionality ought to be changed in order to avoid the current issues, which is one the
things I'm trying _not_ to do in this effort.

Cheers
Andrea

== GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information. == Ing. Andrea Aime @geowolf Technical Lead GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa (LU) phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549 http://www.geo-solutions.it http://twitter.com/geosolutions_it ------------------------------------------------------- /Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia. This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail./



_______________________________________________
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel


_______________________________________________
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to