Skip to content

Commit 66d0c67

Browse files
committed
fixed documentation for new policies (#121)
1 parent 58eaef6 commit 66d0c67

File tree

2 files changed

+30
-26
lines changed

2 files changed

+30
-26
lines changed

docs/task_documentation.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1458,12 +1458,14 @@ in the following path and name adjustments:
14581458
<dd class="plain-dd">
14591459
<pre><code class="language-plaintext">A/A/A/MyClass.properties
14601460
A/A/A/SomeResource.txt
1461-
com/mycompany/shared/SharedResource.txt
1461+
A/A/shared/SharedResource.txt
14621462
META-INF/services/com.mycompany.myproduct.MyClass
14631463
META-INF/services/com.mycompany.shared.SharedService</code></pre>
14641464
<p>
14651465
The path <code class="plain-code">com/mycompany/shared</code> does not match
1466-
any package name in the code base and thus is not changed.
1466+
any package name, but its path fragments
1467+
<code class="plain-code">com/mycompany</code> match the package name
1468+
<code class="plain-code">com.mycompany</code> and thus are changed.
14671469
<br>
14681470
The two service provider configuration files are not adjusted.
14691471
</p>
@@ -1502,12 +1504,14 @@ META-INF/services/com.mycompany.shared.SharedService</code></pre>
15021504
<dd class="plain-dd">
15031505
<pre><code class="language-plaintext">A/A/A/A.properties
15041506
A/A/A/SomeResource.txt
1505-
com/mycompany/shared/SharedResource.txt
1507+
A/A/shared/SharedResource.txt
15061508
META-INF/services/A.A.A.A
15071509
META-INF/services/com.mycompany.shared.SharedService</code></pre>
15081510
<p>
15091511
The path <code class="plain-code">com/mycompany/shared</code> does not match
1510-
any package name in the code base and thus is not changed.
1512+
any package name, but its path fragments
1513+
<code class="plain-code">com/mycompany</code> match the package name
1514+
<code class="plain-code">com.mycompany</code> and thus are changed.
15111515
<br>
15121516
The name <code class="plain-code">com.mycompany.shared.SharedService</code>
15131517
does not match any qualified class name and thus is not changed.
@@ -1521,8 +1525,8 @@ A/A/shared/SharedResource.txt
15211525
META-INF/services/A.A.A.A
15221526
META-INF/services/A.A.shared.SharedService</code></pre>
15231527
<p>
1524-
The path <code class="plain-code">com/mycompany/shared</code> does
1525-
not match any package name, but its path fragments
1528+
The path <code class="plain-code">com/mycompany/shared</code> does not match
1529+
any package name, but its path fragments
15261530
<code class="plain-code">com/mycompany</code> match the package name
15271531
<code class="plain-code">com.mycompany</code> and thus are changed.
15281532
<br>

src/main/java/com/yworks/yguard/ObfuscatorTask.java

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2748,17 +2748,17 @@ public enum ReplaceContentPolicy {
27482748
none,
27492749
/**
27502750
* If class obfuscation yields
2751-
* com.yworks.SampleClass -> A.A.A
2751+
* com.yworks.SampleClass -&gt; A.A.A
27522752
* then text in resource files will be adjusted as follows
2753-
* com.yworks.SampleStuff -> A.A.SampleStuff
2754-
* com.other.OtherStuff -> A.other.OtherStuff
2753+
* com.yworks.SampleStuff -&gt; A.A.SampleStuff
2754+
* com.other.OtherStuff -&gt; A.other.OtherStuff
27552755
*/
27562756
lenient,
27572757
/**
27582758
* If class obfuscation yields
2759-
* com.yworks.SampleClass -> A.A.A
2759+
* com.yworks.SampleClass -&gt; A.A.A
27602760
* then text in resource files will be adjusted as follows
2761-
* com.yworks.SampleClass -> A.A.A
2761+
* com.yworks.SampleClass -&gt; A.A.A
27622762
*/
27632763
strict;
27642764
}
@@ -2774,42 +2774,42 @@ public enum ReplacePathPolicy {
27742774
none, // replaceName = false, replacePath = false
27752775
/**
27762776
* If class obfuscation yields
2777-
* com.yworks.SampleClass -> A.A.A
2777+
* com.yworks.SampleClass -&gt; A.A.A
27782778
* then resource files will be renamed as follows
2779-
* com/yworks/SampleStuff.properties -> A/A/SampleStuff.properties
2780-
* com/other/OtherStuff.properties -> com/other/OtherStuff.properties
2779+
* com/yworks/SampleStuff.properties -&gt; A/A/SampleStuff.properties
2780+
* com/other/OtherStuff.properties -&gt; A/other/OtherStuff.properties
27812781
*/
27822782
path, // replaceName = false, replacePath = true, default
27832783
/**
27842784
* If class obfuscation yields
2785-
* com.yworks.SampleClass -> A.A.A
2785+
* com.yworks.SampleClass -&gt; A.A.A
27862786
* then resource files will be renamed as follows
2787-
* com/yworks/SampleStuff.properties -> com/yworks/A.properties
2788-
* com/other/OtherStuff.properties -> com/other/OtherStuff.properties
2787+
* com/yworks/SampleStuff.properties -&gt; com/yworks/A.properties
2788+
* com/other/OtherStuff.properties -&gt; com/other/OtherStuff.properties
27892789
*/
27902790
name, // replaceName = true, replacePath = false
27912791
/**
27922792
* If class obfuscation yields
2793-
* com.yworks.SampleClass -> A.A.A
2793+
* com.yworks.SampleClass -&gt; A.A.A
27942794
* then resource files will be renamed as follows
2795-
* com/yworks/SampleStuff.properties -> A/A/A.properties
2796-
* com/other/OtherStuff.properties -> com/other/OtherStuff.properties
2795+
* com/yworks/SampleStuff.properties -&gt; A/A/A.properties
2796+
* com/other/OtherStuff.properties -&gt; com/other/OtherStuff.properties
27972797
*/
27982798
file, // replaceName = true, replacePath = true
27992799
/**
28002800
* If class obfuscation yields
2801-
* com.yworks.SampleClass -> A.A.A
2801+
* com.yworks.SampleClass -&gt; A.A.A
28022802
* then resource files will be renamed as follows
2803-
* com/yworks/SampleStuff.properties -> A/A/A.properties
2804-
* com/yworks/OtherStuff.properties -> A/A/OtherStuff.properties
2803+
* com/yworks/SampleStuff.properties -&gt; A/A/A.properties
2804+
* com/other/OtherStuff.properties -&gt; A/other/OtherStuff.properties
28052805
*/
28062806
fileorpath,
28072807
/**
28082808
* If class obfuscation yields
2809-
* com.yworks.SampleClass -> A.A.A
2809+
* com.yworks.SampleClass -&gt; A.A.A
28102810
* then resource files will be renamed as follows
2811-
* com/yworks/SampleStuff.properties -> A/A/A.properties
2812-
* com/other/OtherStuff.properties -> A/other/OtherStuff.properties
2811+
* com/yworks/SampleStuff.properties -&gt; A/A/A.properties
2812+
* com/other/OtherStuff.properties -&gt; A/other/OtherStuff.properties
28132813
*/
28142814
lenient
28152815
}

0 commit comments

Comments
 (0)