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

Invoiced / invoiced-java / #255

02 Feb 2024 11:00PM CUT coverage: 81.958%. Remained the same
#255

push

github

jaredtking
Add publish action

695 of 848 relevant lines covered (81.96%)

0.82 hits per line

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

42.86
/src/main/java/com/invoiced/entity/AbstractItem.java
1
package com.invoiced.entity;
2

3
import com.fasterxml.jackson.databind.SerializationFeature;
4
import com.invoiced.exception.EntityException;
5
import com.invoiced.util.Util;
6

7
public abstract class AbstractItem {
1✔
8

9
  @Override
10
  public String toString() {
11
    try {
12
      return super.toString() + " JSON: " + this.toJsonString();
1✔
13
    } catch (Throwable c) {
×
14
      throw new RuntimeException(c);
×
15
    }
16
  }
17

18
  public String toJsonString() throws EntityException {
19
    try {
20
      return Util.getMapper().enable(SerializationFeature.INDENT_OUTPUT).writeValueAsString(this);
1✔
21
    } catch (Throwable c) {
×
22
      throw new EntityException(c);
×
23
    }
24
  }
25
}
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