• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ExpediaGroup / bull / #869

12 Jan 2024 03:17PM CUT coverage: 100.0%. Remained the same
#869

push

web-flow
Bump actions/cache from 3.3.2 to 3.3.3 (#462)

* Bump actions/cache from 3.3.2 to 3.3.3

Bumps [actions/cache](https://github.com/actions/cache) from 3.3.2 to 3.3.3.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3.3.2...v3.3.3)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Trigger notification

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Fabio Borriello <fborriello@expediagroup.com>

1198 of 1198 relevant lines covered (100.0%)

1.95 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/bull-bean-transformer/src/main/java/com/expediagroup/beans/populator/ArrayPopulator.java
1
/**
2
 * Copyright (C) 2019-2023 Expedia, Inc.
3
 *
4
 * Licensed under the Apache License, Version 2.0 (the "License");
5
 * you may not use this file except in compliance with the License.
6
 * You may obtain a copy of the License at
7
 *
8
 * http://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 * Unless required by applicable law or agreed to in writing, software
11
 * distributed under the License is distributed on an "AS IS" BASIS,
12
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 * See the License for the specific language governing permissions and
14
 * limitations under the License.
15
 */
16
package com.expediagroup.beans.populator;
17

18
import static java.util.Arrays.stream;
19

20
import java.lang.reflect.Field;
21

22
import com.expediagroup.beans.transformer.BeanTransformer;
23

24
/**
25
 * Populator for primitive types array.
26
 */
27
class ArrayPopulator extends Populator<Object> implements ICollectionPopulator<Object> {
28

29
    /**
30
     * Default constructor.
31
     * @param beanTransformer the bean transformer containing the field name mapping and transformation functions
32
     */
33
    ArrayPopulator(final BeanTransformer beanTransformer) {
34
        super(beanTransformer);
2✔
35
    }
2✔
36

37
    /**
38
     * {@inheritDoc}
39
     */
40
    @Override
41
    public Object getPopulatedObject(final Field field, final Object fieldValue) {
42
        return getPopulatedObject(field.getType(), reflectionUtils.getArrayType(field), fieldValue, null);
2✔
43
    }
44

45
    /**
46
     * {@inheritDoc}
47
     */
48
    @Override
49
    public Object getPopulatedObject(final Class<?> fieldType, final Class<?> genericFieldType, final Object fieldValue, final Class<?> nestedGenericClass) {
50
        final Object res;
51
        if (classUtils.isPrimitiveTypeArray(fieldValue.getClass()) || classUtils.isPrimitiveOrSpecialType(genericFieldType)) {
2✔
52
            res = fieldValue;
2✔
53
        } else {
54
            res = stream((Object[]) fieldValue)
2✔
55
                    //.parallel()
56
                    .map(o -> classUtils.isPrimitiveOrSpecialType(o.getClass()) ? o : transform(o, genericFieldType)).toArray();
2✔
57
        }
58
        return res;
2✔
59
    }
60
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc