Skip to content

Commit

Permalink
added some javadoc. Corrected .ruleset and android_pmd_ruleset.xml, as
Browse files Browse the repository at this point in the history
had wrong classref to Xpathrule
  • Loading branch information
fredgrott committed Jan 21, 2012
1 parent ce88f5e commit 36e4b45
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .ruleset
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<rule name="CallSuperFirst"
since="4.2.5" language="java"
message="super should be called at the start of the method"
class="net.sourceforge.pmd.lang.rule.XPathRule"
class="net.sourceforge.pmd.rules.XPathRule"
externalInfoUrl="http://pmd.sourceforge.net/rules/java/android.html#CallSuperFirst">
<description>Super should be called at the start of the method</description>
<priority>3</priority>
Expand Down Expand Up @@ -57,7 +57,7 @@ public class DummyActivity extends Activity {
<rule name="CallSuperLast"
since="4.2.5" language="java"
message="super should be called at the end of the method"
class="net.sourceforge.pmd.lang.rule.XPathRule"
class="net.sourceforge.pmd.rules.XPathRule"
externalInfoUrl="http://pmd.sourceforge.net/rules/java/android.html#CallSuperLast">
<description>Super should be called at the end of the method</description>
<priority>3</priority>
Expand Down Expand Up @@ -99,7 +99,7 @@ public class DummyActivity extends Activity {
<rule name="DoNotHardCodeSDCard"
since="4.2.6" language="java"
message="Do not hardcode /sdcard."
class="net.sourceforge.pmd.lang.rule.XPathRule"
class="net.sourceforge.pmd.rules.XPathRule"
externalInfoUrl="http://pmd.sourceforge.net/rules/java/android.html#DoNotHardCodeSDCard">
<description>Use Environment.getExternalStorageDirectory() instead of "/sdcard"</description>
<priority>3</priority>
Expand Down
6 changes: 3 additions & 3 deletions android_pmd_ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<rule name="CallSuperFirst"
since="4.2.5" language="java"
message="super should be called at the start of the method"
class="net.sourceforge.pmd.lang.rule.XPathRule"
class="net.sourceforge.pmd.rules.XPathRule"
externalInfoUrl="http://pmd.sourceforge.net/rules/java/android.html#CallSuperFirst">
<description>Super should be called at the start of the method</description>
<priority>3</priority>
Expand Down Expand Up @@ -57,7 +57,7 @@ public class DummyActivity extends Activity {
<rule name="CallSuperLast"
since="4.2.5" language="java"
message="super should be called at the end of the method"
class="net.sourceforge.pmd.lang.rule.XPathRule"
class="net.sourceforge.pmd.rules.XPathRule"
externalInfoUrl="http://pmd.sourceforge.net/rules/java/android.html#CallSuperLast">
<description>Super should be called at the end of the method</description>
<priority>3</priority>
Expand Down Expand Up @@ -99,7 +99,7 @@ public class DummyActivity extends Activity {
<rule name="DoNotHardCodeSDCard"
since="4.2.6" language="java"
message="Do not hardcode /sdcard."
class="net.sourceforge.pmd.lang.rule.XPathRule"
class="net.sourceforge.pmd.rules.XPathRule"
externalInfoUrl="http://pmd.sourceforge.net/rules/java/android.html#DoNotHardCodeSDCard">
<description>Use Environment.getExternalStorageDirectory() instead of "/sdcard"</description>
<priority>3</priority>
Expand Down
11 changes: 11 additions & 0 deletions src/com/github/shareme/bddandroid/BDDAndroidActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import android.view.Window;
import android.widget.TextView;

// TODO: Auto-generated Javadoc
/**
* This is a simple LunarLander activity that houses a single LunarView. It
* demonstrates...
Expand All @@ -36,18 +37,26 @@
* </ul>
*/
public class BDDAndroidActivity extends Activity {

/** The Constant MENU_EASY. */
private static final int MENU_EASY = 1;

/** The Constant MENU_HARD. */
private static final int MENU_HARD = 2;

/** The Constant MENU_MEDIUM. */
private static final int MENU_MEDIUM = 3;

/** The Constant MENU_PAUSE. */
private static final int MENU_PAUSE = 4;

/** The Constant MENU_RESUME. */
private static final int MENU_RESUME = 5;

/** The Constant MENU_START. */
private static final int MENU_START = 6;

/** The Constant MENU_STOP. */
private static final int MENU_STOP = 7;

/** A handle to the thread that's actually running the animation. */
Expand Down Expand Up @@ -109,6 +118,8 @@ public boolean onOptionsItemSelected(MenuItem item) {
case MENU_HARD:
mLunarThread.setDifficulty(LunarThread.DIFFICULTY_HARD);
return true;
default:
break;
}

return false;
Expand Down

0 comments on commit 36e4b45

Please sign in to comment.