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

leeonky / test-charm-java / 290

08 Sep 2025 03:25PM UTC coverage: 74.312% (-0.003%) from 74.315%
290

push

circleci

leeonky
Introduce PropertyWriterDecorator

10 of 25 new or added lines in 6 files covered. (40.0%)

20 existing lines in 10 files now uncovered.

8155 of 10974 relevant lines covered (74.31%)

0.74 hits per line

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

15.38
/bean-util/src/main/java/com/github/leeonky/util/PropertyWriterDecorator.java
1
package com.github.leeonky.util;
2

3
import java.util.function.BiConsumer;
4

5
public class PropertyWriterDecorator<T> extends PropertyAccessorDecorator<T, PropertyWriter<T>> implements PropertyWriter<T> {
6
    public PropertyWriterDecorator(PropertyWriter<T> writer) {
7
        super(writer);
1✔
8
    }
1✔
9

10
    @Override
11
    public BiConsumer<T, Object> setter() {
NEW
12
        return accessor.setter();
×
13
    }
14

15
    @Override
16
    public void setValue(T bean, Object value) {
17
        try {
NEW
18
            setter().accept(bean, tryConvert(value));
×
NEW
19
        } catch (CannotSetElementByIndexException e) {
×
NEW
20
            throw e;
×
NEW
21
        } catch (IllegalArgumentException e) {
×
NEW
22
            String propertyName = getBeanType().isCollection() ? "[" + getName() + "]" : "." + getName();
×
NEW
23
            throw new IllegalArgumentException(String.format("Can not set %s to property %s%s<%s>",
×
NEW
24
                    value == null ? "null" : Classes.getClassName(value) + "[" + value + "]",
×
NEW
25
                    getBeanType().getName(), propertyName, getType().getName()), e);
×
NEW
26
        }
×
NEW
27
    }
×
28
}
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