Hi, I am using JDK 1.8.0_66 (64bits), I update the JDK and send result.
Thanks Brad!

      De: "[email protected]" <[email protected]>
 Para: 'A Huarte' <[email protected]>; [email protected] 
 Enviado: Martes 26 de diciembre de 2017 23:47
 Asunto: RE: [Geotools-devel] GeoTools gt-metadata module does not build in 
master...
   
#yiv4982168487 #yiv4982168487 -- _filtered #yiv4982168487 
{font-family:Helvetica;panose-1:2 11 6 4 2 2 2 2 2 4;} _filtered #yiv4982168487 
{panose-1:2 4 5 3 5 4 6 3 2 4;} _filtered #yiv4982168487 
{font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;}#yiv4982168487 
#yiv4982168487 p.yiv4982168487MsoNormal, #yiv4982168487 
li.yiv4982168487MsoNormal, #yiv4982168487 div.yiv4982168487MsoNormal 
{margin:0cm;margin-bottom:.0001pt;font-size:11.0pt;}#yiv4982168487 a:link, 
#yiv4982168487 span.yiv4982168487MsoHyperlink 
{color:#0563C1;text-decoration:underline;}#yiv4982168487 a:visited, 
#yiv4982168487 span.yiv4982168487MsoHyperlinkFollowed 
{color:#954F72;text-decoration:underline;}#yiv4982168487 
p.yiv4982168487msonormal0, #yiv4982168487 li.yiv4982168487msonormal0, 
#yiv4982168487 div.yiv4982168487msonormal0 
{margin-right:0cm;margin-left:0cm;font-size:11.0pt;}#yiv4982168487 
span.yiv4982168487EmailStyle18 {color:windowtext;}#yiv4982168487 
.yiv4982168487MsoChpDefault {font-size:10.0pt;} _filtered #yiv4982168487 
{margin:72.0pt 72.0pt 72.0pt 72.0pt;}#yiv4982168487 
div.yiv4982168487WordSection1 {}#yiv4982168487 I tried this with a clean 
checkout of master on a windows box (which I don’t normally do, but for this 
test…).I’m not able to reproduce. My environment is slightly different in that 
I’m not using Eclipse, but rather building on Netbeans 8.2.I am definitely 
using a 64 bit Java 8 (C:\Program Files\Java\jdk1.8.0_144).  Is it possible 
that you have an older JDK? IIRC, Eclipse Mars was a JDK 7 based build.  Brad  
From: A Huarte via GeoTools-Devel [mailto:[email protected]] 
Sent: Tuesday, 26 December 2017 10:54 PM
To: Geotools-Devel List <[email protected]>
Subject: [Geotools-devel] GeoTools gt-metadata module does not build in 
master...  Hi, I am trying to build GeoTools and I get two errors in 
gt-metadata module.I use Eclipse - Mars.1 Release (4.5.1) - in Windows.    
...\modules\library\metadata\src\main\java\org\geotools\factory\CategoryRegistry.java
  1)   public CategoryRegistry(final FactoryRegistry factoryRegistry,           
 final Iterable<Class<?>> categories) {        ...        // use an 
unmodifiable map to guarantee immutability        this.categories = 
stream(categories)                .collect(                        
collectingAndThen(                                toMap(category -> category,   
                                   category -> new 
InstanceRegistry<>(factoryRegistry,category), <-- ERROR                         
             (firstRegistry, secondRegistry) -> secondRegistry),                
                      Collections::unmodifiableMap));    }  ERROR --> Type 
mismatch: cannot convert from Object to 
Map<Class<?>,CategoryRegistry.InstanceRegistry<?>>    2)     public <S> 
Optional<S> getInstanceOfType(Class<S> type) {        ...        return 
streamCategories().filter(category -> category.isAssignableFrom(type))          
      .map(this::instanceRegistry)                                              
                                <-- ERROR                .flatMap(registry -> 
stream(registry.getInstanceOfType(type))).findFirst();    }  ERROR -> Type 
mismatch: cannot convert from Stream<Object> to <unknown>        I can fix 
these errors with a pair of minor changes:  1)    public CategoryRegistry(final 
FactoryRegistry factoryRegistry,            final Iterable<Class<?>> 
categories) {        ...        // use an unmodifiable map to guarantee 
immutability        this.categories = stream(categories)                
.collect(                        collectingAndThen(                             
   toMap(category -> category,                                      category -> 
new InstanceRegistry<Class<?>>(factoryRegistry,category),                       
               (firstRegistry, secondRegistry) -> secondRegistry),              
                        Collections::unmodifiableMap));    }  2)     public <S> 
Optional<S> getInstanceOfType(Class<S> type) {        ...        return 
streamCategories().filter(category -> category.isAssignableFrom(type))          
      .map(category -> (InstanceRegistry<?>) instanceRegistry(category))        
        .flatMap(registry -> 
stream(registry.getInstanceOfType(type))).findFirst();    }    But I do not 
know if they are right. Could you help me? Am I missing anything?  Thanks in 
advanceAlvaro  

   
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
GeoTools-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to