Data masking

Data masking capabilities of RevDeBug for Java projects and how to use them.

Excluding variables' values from RevDeBug recordings

Built-in data masking can be applied to any variable and will exclude its value from RevDeBug recording.

To use the capability you need to provide the identifiers of variable names to ignore in a rdbIgnore file. Add the rdbIgnore into the project, eg.:

And fill it in with variable names which will get excluded from RevDeBug recordings. Each variable name should be named on a separate line in the file. Regular expressions are accepted to match more than one method at the same time:

After the next full rebuild of the project, the variables matching the names will be excluded from being recorded.

Excluding specified methods from RevDeBug recordings

You can exclude selected methods from RevDeBug recording by annotating them with

"@RevDeBug.RevDeBugIgnore", eg:

public class Main {

    @RevDeBug.RevDeBugIgnore
    public static void main(String[] args) {

        System.out.println("Hello world");
    }

The same can be done with compiler arguments and whole packages or classes can be matched as well. Just add "-AREVDEBUG_EXCLUDE_METHODS" or "-AREVDEBUG_EXCLUDE" to RevDeBug options in your project build file. Regular expressions are accepted to match more than one method at the same time, eg.:

pom.xml

       <configuration>
           <compilerArgs>
               <!-- ... -->
               <arg>-AREVDEBUG_EXCLUDE_METHODS=.*\.toString\(\)$,.*\.clone\(\)$,.*\.hashCode\(\)$,.*\.get.*$,.*\.set.*$,.*\.is.*$</arg>
               <arg>-AREVDEBUG_EXCLUDE_CLASSES=.*\.[Uu]til(s)?.*$,.*\.[Cc]rypt.*$,.*[Uu]til(s)?$,.*[Cc]rypt(o)?$</arg>
               <!-- ... -->
           </compilerArgs>
       ...

Last updated