File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed
org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/utils Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -23,10 +23,7 @@ public final class ScopeNames {
2323
2424 public static @ Nullable String getContributor (final String scopeName ) {
2525 final int separatorAt = scopeName .indexOf (CONTRIBUTOR_SEPARATOR );
26- if (separatorAt == -1 ) {
27- return "" ;
28- }
29- return scopeName .substring (separatorAt + 1 );
26+ return separatorAt == -1 ? null : scopeName .substring (separatorAt + 1 );
3027 }
3128
3229 /**
@@ -38,10 +35,7 @@ public static boolean hasContributor(final String scopeName) {
3835
3936 public static String withoutContributor (final String scopeName ) {
4037 final int separatorAt = scopeName .indexOf (CONTRIBUTOR_SEPARATOR );
41- if (separatorAt == -1 ) {
42- return scopeName ;
43- }
44- return scopeName .substring (0 , separatorAt );
38+ return separatorAt == -1 ? scopeName : scopeName .substring (0 , separatorAt );
4539 }
4640
4741 private ScopeNames () {
You can’t perform that action at this time.
0 commit comments