Merge branch 'master' of https://github.com/kullfar/pmd into kullfar-master
This commit is contained in:
@ -593,19 +593,25 @@ starts-with(@Image,'Runtime.getRuntime') and
|
|||||||
<example>
|
<example>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
public class GCCall {
|
public class GCCall {
|
||||||
public GCCall() {
|
public GCCall() {
|
||||||
// Explicit gc call !
|
// Explicit gc call !
|
||||||
System.gc();
|
System.gc();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void doSomething() {
|
public void doSomething() {
|
||||||
// Explicit gc call !
|
// Explicit gc call !
|
||||||
Runtime.getRuntime().gc();
|
Runtime.getRuntime().gc();
|
||||||
}
|
}
|
||||||
|
|
||||||
public explicitGCcall() { // Explicit gc call ! System.gc(); }
|
public explicitGCcall() {
|
||||||
|
// Explicit gc call !
|
||||||
|
System.gc();
|
||||||
|
}
|
||||||
|
|
||||||
public void doSomething() { // Explicit gc call ! Runtime.getRuntime().gc(); }
|
public void doSomething() {
|
||||||
|
// Explicit gc call !
|
||||||
|
Runtime.getRuntime().gc();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]]>
|
]]>
|
||||||
</example>
|
</example>
|
||||||
|
Reference in New Issue
Block a user