Skip to content

Commit 4999ffe

Browse files
committed
check branch filter with equals()
1 parent deece98 commit 4999ffe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/jenkinsci/plugins/gogs/GogsWebHook.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ public void doIndex(StaplerRequest req, StaplerResponse rsp) throws IOException
230230

231231
// filter branch, not ref not match branch filter, skip trigger.
232232
boolean isRefMatched = true;
233-
if (branchFilter != null && branchFilter != "*" && branchFilter.length() > 0) {
233+
if (branchFilter != null && !branchFilter.equals("*") && branchFilter.length() > 0) {
234234
isRefMatched = ref == null || ref.length() == 0 || ref.endsWith(branchFilter);
235235
}
236236

0 commit comments

Comments
 (0)