Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZCS-12002:failed test case of testBug64974 #1393

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

rupeshtelus
Copy link
Contributor

@rupeshtelus rupeshtelus commented Aug 29, 2022

ticket - https://jira.corp.synacor.com/browse/ZCS-12002
issue - failed test case of testBug64974

solution - if the html doesn't contain any start tag ( exp - '<!--' ) then it doesn't need to do operations of splitting & replacing tags , so added if conditions above it , if the length will be > 1 then only it will do all operations

formattedHtml = formattedHtml + strAfterSplit;
}
//ZCS-12002 ( failed test case for testBug64974 )
//if the html doesn't containing start then skipping other operations
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add space after //

//if the html doesn't containing start then skipping other operations
if (arrOfStr.length > 1) {
for (String strAfterSplit : arrOfStr) {
if (!strAfterSplit.equals("") && strAfterSplit.contains(end)) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For safety reasons (and avoiding a NullPoitnerException), you should compare the literal string to the variable.

!strAfterSpit.equals("")

should be:

!"".equals(strAfterSpit)

@silentsakky
Copy link
Member

The original fix of ZBUG-2547 has been reworked in f82c5af
We will have to do rework on this PR also

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants