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

leeonky / test-charm-java / 293

12 Sep 2025 04:43PM UTC coverage: 74.22% (-0.09%) from 74.312%
293

push

circleci

leeonky
create sub list from spec list in spec

33 of 42 new or added lines in 8 files covered. (78.57%)

32 existing lines in 11 files now uncovered.

8234 of 11094 relevant lines covered (74.22%)

0.74 hits per line

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

71.43
/bean-util/src/main/java/com/github/leeonky/util/PropertyWriter.java
1
package com.github.leeonky.util;
2

3
import java.lang.reflect.Type;
4
import java.util.function.BiConsumer;
5

6
public interface PropertyWriter<T> extends PropertyAccessor<T> {
7

8
    BiConsumer<T, Object> setter();
9

10
    default void setValue(T bean, Object value) {
11
        try {
12
            setter().accept(bean, tryConvert(value));
1✔
13
        } catch (CannotSetElementByIndexException e) {
1✔
14
            throw e;
1✔
15
        } catch (IllegalArgumentException e) {
1✔
16
            String propertyName = getBeanType().isCollection() ? "[" + getName() + "]" : "." + getName();
1✔
17
            throw new IllegalArgumentException(String.format("Can not set %s to property %s%s<%s>",
1✔
18
                    value == null ? "null" : Classes.getClassName(value) + "[" + value + "]",
1✔
19
                    getBeanType().getName(), propertyName, getType().getName()), e);
1✔
20
        }
1✔
21
    }
1✔
22

23
    default PropertyWriter<T> decorateType(BeanClass<? extends T> newType) {
NEW
24
        if (newType == getType())
×
UNCOV
25
            return this;
×
UNCOV
26
        return new PropertyWriterDecorator<T>(this) {
×
27
            @Override
28
            public Type getGenericType() {
NEW
29
                return newType.getGenericType();
×
30
            }
31
        };
32
    }
33
}
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

© 2026 Coveralls, Inc