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

Support custom black list. #29

Merged
merged 4 commits into from
Jan 3, 2019
Merged

Support custom black list. #29

merged 4 commits into from
Jan 3, 2019

Conversation

leizhiyuan
Copy link
Contributor

@leizhiyuan leizhiyuan commented Jan 2, 2019

use resource file and switcher to define blacklist .so user can set it by themself

use java resource path instead of the absolute path
use serialize.blacklist.file to define it.

@ujjboy
Copy link
Member

ujjboy commented Jan 2, 2019

CI failed.

Add this to pom.xml

<build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
            </resource>
        </resources>

@codecov
Copy link

codecov bot commented Jan 2, 2019

Codecov Report

Merging #29 into 3.x will increase coverage by 0.1%.
The diff coverage is 74.07%.

Impacted file tree graph

@@            Coverage Diff            @@
##              3.x      #29     +/-   ##
=========================================
+ Coverage   25.48%   25.58%   +0.1%     
=========================================
  Files         157      157             
  Lines       11016    11041     +25     
  Branches     1951     1959      +8     
=========================================
+ Hits         2807     2825     +18     
- Misses       7923     7925      +2     
- Partials      286      291      +5
Impacted Files Coverage Δ
.../hessian/internal/InternalNameBlackListFilter.java 77.41% <74.07%> (-22.59%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d3b4f4c...7f5c1aa. Read the comment docs.

@leizhiyuan leizhiyuan requested a review from ujjboy January 2, 2019 07:12
@leizhiyuan leizhiyuan added this to the 3.3.5 milestone Jan 2, 2019
Copy link
Member

@ujjboy ujjboy left a comment

Choose a reason for hiding this comment

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

Add test case.

Scanner scanner = new Scanner(file);
while (scanner.hasNextLine()) {
String line = scanner.nextLine();
result.add(line);
Copy link
Member

Choose a reason for hiding this comment

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

Add to list if not blank.

String line = scanner.nextLine();
result.add(line);
}
scanner.close();
Copy link
Member

Choose a reason for hiding this comment

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

move to finally.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok

@ujjboy ujjboy merged commit c783c61 into sofastack:3.x Jan 3, 2019
@ujjboy ujjboy changed the title optimize sec black list Support custom black list. Jan 3, 2019
@ujjboy ujjboy added the enhancement New feature or request label Jan 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants