Project

General

Profile

Revision c4bfb623

IDc4bfb6232e193b19ad67c418301b510a7ddf5b33
Parent 1e037cd6
Child bb006ee7

Added by Andreas Müller over 2 years ago

cleanup

View differences:

cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/CdmTypeScanner.java
39 39
        String _basePackage = basePackage == null ? defaultBasePackage : basePackage;
40 40
        List<Class<? extends T>> classes = new ArrayList<Class<? extends T>>();
41 41
        for (BeanDefinition candidate : findCandidateComponents(_basePackage)) {
42
                Class cls = ClassUtils.resolveClassName(candidate.getBeanClassName(),
42
                @SuppressWarnings("unchecked")
43
                Class<? extends T> cls = (Class<? extends T>)ClassUtils.resolveClassName(candidate.getBeanClassName(),
43 44
                        ClassUtils.getDefaultClassLoader());
44 45
                classes.add(cls);
45 46
        }
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/TaxonServiceImpl.java
504 504
    public Taxon findAcceptedTaxonFor(UUID synonymUuid, UUID classificationUuid,
505 505
            boolean includeUnpublished, List<String> propertyPaths) throws UnpublishedException{
506 506

  
507
        Taxon result = null;
508
        Long count = 0l;
509

  
510 507
        Synonym synonym = null;
511 508

  
512 509
        try {
......
521 518
        Classification classificationFilter = null;
522 519
        if(classificationUuid != null){
523 520
            try {
524
            classificationFilter = classificationDao.load(classificationUuid);
521
                classificationFilter = classificationDao.load(classificationUuid);
525 522
            } catch (NullPointerException e){
526 523
                throw new EntityNotFoundException("No Classification entity found for " + classificationUuid);
527 524
            }
......
530 527
            }
531 528
        }
532 529

  
533
        count = dao.countAcceptedTaxonFor(synonym, classificationFilter) ;
530
        long count = dao.countAcceptedTaxonFor(synonym, classificationFilter) ;
534 531
        if(count > 0){
535
            result = dao.acceptedTaxonFor(synonym, classificationFilter, propertyPaths);
532
            Taxon result = dao.acceptedTaxonFor(synonym, classificationFilter, propertyPaths);
536 533
            checkPublished(result, includeUnpublished, "Accepted taxon unpublished");
534
            return result;
535
        }else{
536
            return null;
537 537
        }
538

  
539
        return result;
540 538
    }
541 539

  
542 540
    @Override

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)