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

ebourg / jsign / #377

28 Aug 2025 03:42PM UTC coverage: 83.089% (-0.02%) from 83.106%
#377

push

ebourg
Upgraded Bouncy Castle LTS to 2.73.8 (#321)

4869 of 5860 relevant lines covered (83.09%)

0.83 hits per line

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

87.5
/jsign-ant/src/main/java/net/jsign/AntLogHandler.java
1
/*
2
 * Copyright 2024 Emmanuel Bourg
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

17
package net.jsign;
18

19
import java.util.logging.Handler;
20
import java.util.logging.Level;
21
import java.util.logging.LogRecord;
22

23
import org.apache.tools.ant.Project;
24
import org.apache.tools.ant.Task;
25

26
/**
27
 * Console implementation for Ant tasks.
28
 *
29
 * @since 7.0
30
 */
31
class AntLogHandler extends Handler {
32

33
    private final Task task;
34

35
    public AntLogHandler(Task task) {
1✔
36
        this.task = task;
1✔
37
    }
1✔
38

39
    @Override
40
    public void publish(LogRecord record) {
41
        int level = record.getLevel().intValue();
1✔
42
        if (level >= Level.SEVERE.intValue()) {
1✔
43
            task.log(record.getMessage(), record.getThrown(), Project.MSG_ERR);
1✔
44
        } else if (level >= Level.WARNING.intValue()) {
1✔
45
            task.log(record.getMessage(), record.getThrown(), Project.MSG_WARN);
1✔
46
        } else if (level >= Level.INFO.intValue()) {
1✔
47
            task.log(record.getMessage(), record.getThrown(), Project.MSG_INFO);
1✔
48
        } else if (level >= Level.FINE.intValue()) {
1✔
49
            task.log(record.getMessage(), record.getThrown(), Project.MSG_VERBOSE);
1✔
50
        } else {
51
            task.log(record.getMessage(), record.getThrown(), Project.MSG_DEBUG);
1✔
52
        }
53
    }
1✔
54

55
    @Override
56
    public void flush() {
57
    }
×
58

59
    @Override
60
    public void close() throws SecurityException {
61
    }
×
62
}
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