// Copyright (c) 2021, Fr.Terrot. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package io.gitea.model; public class GiteaUser { /** Name is user FullName or Login when FullName is empty. */ static public String getName(User user) { String name = ""; if (user != null) { name = user.getFullName(); if (name.isBlank() || name.isEmpty()) name = user.getLogin(); } return name; } }