mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-15 17:56:17 +01:00
Reduce code smells (#2089)
Reduce code smells found by deepsource.io. We focused on the low-hanging fruits and not breaking any api.
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
package sonia.scm.repository.xml;
|
||||
|
||||
import sonia.scm.SCMContextProvider;
|
||||
@@ -66,8 +66,8 @@ public class PathBasedRepositoryLocationResolver extends BasicRepositoryLocation
|
||||
|
||||
private final Clock clock;
|
||||
|
||||
private Long creationTime;
|
||||
private Long lastModified;
|
||||
private long creationTime;
|
||||
private long lastModified;
|
||||
|
||||
@Inject
|
||||
public PathBasedRepositoryLocationResolver(SCMContextProvider contextProvider, InitialRepositoryLocationResolver initialRepositoryLocationResolver, FileSystem fileSystem) {
|
||||
@@ -162,7 +162,7 @@ public class PathBasedRepositoryLocationResolver extends BasicRepositoryLocation
|
||||
}
|
||||
}
|
||||
|
||||
private void onLoadDates(Long creationTime, Long lastModified) {
|
||||
private void onLoadDates(long creationTime, long lastModified) {
|
||||
this.creationTime = creationTime;
|
||||
this.lastModified = lastModified;
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ class PathDatabase {
|
||||
this.storePath = storePath;
|
||||
}
|
||||
|
||||
void write(Long creationTime, Long lastModified, Map<String, Path> pathDatabase) {
|
||||
void write(long creationTime, long lastModified, Map<String, Path> pathDatabase) {
|
||||
ensureParentDirectoryExists();
|
||||
LOG.trace("write repository path database to {}", storePath);
|
||||
|
||||
@@ -107,7 +107,7 @@ class PathDatabase {
|
||||
}
|
||||
}
|
||||
|
||||
private void writeRepositoriesStart(XMLStreamWriter writer, Long creationTime, Long lastModified) throws XMLStreamException {
|
||||
private void writeRepositoriesStart(XMLStreamWriter writer, long creationTime, long lastModified) throws XMLStreamException {
|
||||
writer.writeStartElement(ELEMENT_REPOSITORIES);
|
||||
writer.writeAttribute(ATTRIBUTE_CREATION_TIME, String.valueOf(creationTime));
|
||||
writer.writeAttribute(ATTRIBUTE_LAST_MODIFIED, String.valueOf(lastModified));
|
||||
|
||||
Reference in New Issue
Block a user