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

Commonjava / indy-tracking-service / 44786446415

20 Nov 2026 05:46PM UTC coverage: 37.562% (-29.5%) from 67.036%
44786446415

push

github

rnc
Bump org.commonjava.atlas:atlas-relationships-api from 1.2.2 to 1.2.3

Bumps [org.commonjava.atlas:atlas-relationships-api](https://github.com/Commonjava/atlas) from 1.2.2 to 1.2.3.
- [Release notes](https://github.com/Commonjava/atlas/releases)
- [Commits](https://github.com/Commonjava/atlas/compare/atlas-parent-1.2.2...atlas-parent-1.2.3)

---
updated-dependencies:
- dependency-name: org.commonjava.atlas:atlas-relationships-api
  dependency-version: 1.2.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

678 of 1805 relevant lines covered (37.56%)

0.75 hits per line

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

0.0
/src/main/java/org/commonjava/indy/service/tracking/model/dto/ContentEntryDTO.java
1
/**
2
 * Copyright (C) 2022-2023 Red Hat, Inc. (https://github.com/Commonjava/indy-tracking-service)
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
package org.commonjava.indy.service.tracking.model.dto;
17

18
import org.commonjava.indy.service.tracking.model.StoreKey;
19
import org.commonjava.indy.service.tracking.model.StoreType;
20
import org.commonjava.indy.service.tracking.model.TrackingKey;
21

22
import java.io.Externalizable;
23
import java.io.IOException;
24
import java.io.ObjectInput;
25
import java.io.ObjectOutput;
26

27
import static org.commonjava.indy.service.tracking.model.pkg.PackageTypeConstants.PKG_TYPE_MAVEN;
28

29
public class ContentEntryDTO
×
30
                implements Comparable<ContentEntryDTO>, Externalizable
31
{
32
    private static final int VERSION = 1;
33

34
    private StoreKey storeKey;
35

36
    private String path;
37

38
    public StoreKey getStoreKey()
39
    {
40
        return storeKey;
×
41
    }
42

43
    public void setStoreKey( StoreKey storeKey )
44
    {
45
        this.storeKey = storeKey;
×
46
    }
×
47

48
    public String getPath()
49
    {
50
        return path;
×
51
    }
52

53
    public void setPath( String path )
54
    {
55
        this.path = path;
×
56
    }
×
57

58
    @Override
59
    public int compareTo( final ContentEntryDTO other )
60
    {
61
        int comp = storeKey.compareTo( other.getStoreKey() );
×
62
        if ( comp == 0 )
×
63
        {
64
            comp = path.compareTo( other.getPath() );
×
65
        }
66
        return comp;
×
67
    }
68

69
    @Override
70
    public void writeExternal( ObjectOutput out ) throws IOException
71
    {
72
        out.writeObject( Integer.toString( VERSION ) );
×
73
        out.writeObject( storeKey.getPackageType() );
×
74
        out.writeObject( storeKey.getName() );
×
75
        out.writeObject( storeKey.getType().name() );
×
76
        out.writeObject( path == null ? "" : path );
×
77

78
    }
×
79

80
    @Override
81
    public void readExternal( ObjectInput in ) throws IOException, ClassNotFoundException
82
    {
83
        Object whatIsThis = in.readObject();
×
84
        int version;
85
        String packageType;
86
        if ( whatIsThis == null )
×
87
        {
88
            // we see NumberFormatException: For input string: "null" in parseInt. It might be because we forget
89
            // to persist the trackingKey for some reason. In this case, we just ignore it and continues
90
            version = 1;
×
91
            packageType = PKG_TYPE_MAVEN;
×
92
        }
93
        else if ( whatIsThis instanceof TrackingKey )
×
94
        {
95
            version = 1;
×
96
            packageType = PKG_TYPE_MAVEN;
×
97
        }
98
        else
99
        {
100
            version = Integer.parseInt( String.valueOf( whatIsThis ) );
×
101
            packageType = (String) in.readObject();
×
102
        }
103
        // TODO: We should make future versioning / deserialization decisions based on the version we read / infer above
104
        if ( version > VERSION )
×
105
        {
106
            throw new IOException( "This class is of an older version: " + VERSION
×
107
                                                   + " vs. the version read from the data stream: " + version
108
                                                   + ". Cannot deserialize." );
109
        }
110
        final String storeKeyName = (String) in.readObject();
×
111
        final StoreType storeType = StoreType.get( (String) in.readObject() );
×
112
        storeKey = new StoreKey( packageType, storeType, storeKeyName );
×
113
        final String pathStr = (String) in.readObject();
×
114
        path = "".equals( pathStr ) ? null : pathStr;
×
115

116
    }
×
117
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc