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

oracle / opengrok / #3716

30 Nov 2023 08:55AM UTC coverage: 66.158% (+0.05%) from 66.106%
#3716

push

web-flow
Refactoring to reduce sonar code smell fixes (#4485)

---------

Signed-off-by: Gino Augustine <ginoaugustine@gmail.com>
Co-authored-by: Vladimir Kotal <vlada@kotalovi.cz>

389 of 478 new or added lines in 51 files covered. (81.38%)

11 existing lines in 9 files now uncovered.

38764 of 58593 relevant lines covered (66.16%)

0.66 hits per line

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

0.0
/opengrok-indexer/src/main/java/org/opengrok/indexer/util/WrapperIOException.java
1
/*
2
 * CDDL HEADER START
3
 *
4
 * The contents of this file are subject to the terms of the
5
 * Common Development and Distribution License (the "License").
6
 * You may not use this file except in compliance with the License.
7
 *
8
 * See LICENSE.txt included in this distribution for the specific
9
 * language governing permissions and limitations under the License.
10
 *
11
 * When distributing Covered Code, include this CDDL HEADER in each
12
 * file and include the License file at LICENSE.txt.
13
 * If applicable, add the following below this CDDL HEADER, with the
14
 * fields enclosed by brackets "[]" replaced with your own identifying
15
 * information: Portions Copyright [yyyy] [name of copyright owner]
16
 *
17
 * CDDL HEADER END
18
 */
19

20
/*
21
 * Copyright (c) 2023, Oracle and/or its affiliates.
22
 * Portions Copyright (c) 2023, Gino Augustine <gino.augustine@oracle.com>.
23
 */
24
package org.opengrok.indexer.util;
25

26
import java.io.IOException;
27

28
/**
29
 * Runtime exception thrown instead IO Exception.
30
 * This is useful since java streams api don't support api throwing checked exception
31
 *
32
 * @author Gino Augustine
33
 */
34
public class WrapperIOException extends RuntimeException {
35
    private static final long serialVersionUID = 1L;
36

37
    /**
38
     * Constructs a new runtime exception with the specified cause and a
39
     * detail message of {@code (cause==null ? null : cause.toString())}
40
     * (which typically contains the class and detail message of
41
     * {@code cause}).  This constructor is useful for runtime exceptions
42
     * that are little more than wrappers  IO Exceptions.
43
     *
44
     * @param ioException the cause (which is saved for later retrieval by the
45
     *              {@link #getCause()} method).  (A {@code null} value is
46
     *              permitted, and indicates that the cause is nonexistent or
47
     *              unknown.)
48
     */
49
    public WrapperIOException(IOException ioException) {
NEW
50
        super(ioException);
×
NEW
51
    }
×
52

53
    public IOException getParentIOException() {
NEW
54
        return (IOException) getCause();
×
55
    }
56
}
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