From 5cf4714f0675349ed599707e024cf0e70fe114b2 Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Thu, 30 May 2013 18:00:10 +0300 Subject: [PATCH] Clean up the whole tree --- .classpath | 2 +- .pmd | 945 ++++++++++++++++++ AndroidManifest.xml | 11 +- res/layout/{addevent.xml => add_event.xml} | 0 res/layout/{eventview.xml => event_view.xml} | 0 res/layout/login.xml | 57 +- res/menu/{eventmenu.xml => event.xml} | 0 res/menu/{mainmenu.xml => main.xml} | 0 res/values/strings.xml | 6 +- src/ro/ieval/unical/AddEventActivity.java | 11 + src/ro/ieval/unical/Constants.java | 8 - ...ventDialog.java => DeleteEventDialog.java} | 13 +- ...ctivity.java => DisplayEventActivity.java} | 29 +- src/ro/ieval/unical/Event.java | 6 +- ...{loginActivity.java => LoginActivity.java} | 14 +- src/ro/ieval/unical/MainActivity.java | 46 + src/ro/ieval/unical/Utils.java | 8 - src/ro/ieval/unical/addEventActivity.java | 15 - src/ro/ieval/unical/mainActivity.java | 53 - 19 files changed, 1053 insertions(+), 171 deletions(-) create mode 100644 .pmd rename res/layout/{addevent.xml => add_event.xml} (100%) rename res/layout/{eventview.xml => event_view.xml} (100%) rename res/menu/{eventmenu.xml => event.xml} (100%) rename res/menu/{mainmenu.xml => main.xml} (100%) create mode 100644 src/ro/ieval/unical/AddEventActivity.java delete mode 100644 src/ro/ieval/unical/Constants.java rename src/ro/ieval/unical/{deleteEventDialog.java => DeleteEventDialog.java} (53%) rename src/ro/ieval/unical/{displayEventActivity.java => DisplayEventActivity.java} (58%) rename src/ro/ieval/unical/{loginActivity.java => LoginActivity.java} (63%) create mode 100644 src/ro/ieval/unical/MainActivity.java delete mode 100644 src/ro/ieval/unical/Utils.java delete mode 100644 src/ro/ieval/unical/addEventActivity.java delete mode 100644 src/ro/ieval/unical/mainActivity.java diff --git a/.classpath b/.classpath index 001d94d..a900c98 100644 --- a/.classpath +++ b/.classpath @@ -1,6 +1,6 @@ - + diff --git a/.pmd b/.pmd new file mode 100644 index 0000000..5b88d72 --- /dev/null +++ b/.pmd @@ -0,0 +1,945 @@ + + + false + .ruleset + + + LooseCoupling + Type Resolution Rules + + + CloneMethodMustImplementCloneable + Type Resolution Rules + + + UnusedImports + Type Resolution Rules + + + SignatureDeclareThrowsException + Type Resolution Rules + + + IfStmtsMustUseBraces + Braces Rules + + + WhileLoopsMustUseBraces + Braces Rules + + + IfElseStmtsMustUseBraces + Braces Rules + + + ForLoopsMustUseBraces + Braces Rules + + + UseSingleton + Design Rules + + + SimplifyBooleanReturns + Design Rules + + + SimplifyBooleanExpressions + Design Rules + + + SwitchStmtsShouldHaveDefault + Design Rules + + + AvoidDeeplyNestedIfStmts + Design Rules + + + AvoidReassigningParameters + Design Rules + + + SwitchDensity + Design Rules + + + ConstructorCallsOverridableMethod + Design Rules + + + AccessorClassGeneration + Design Rules + + + FinalFieldCouldBeStatic + Design Rules + + + CloseResource + Design Rules + + + NonStaticInitializer + Design Rules + + + DefaultLabelNotLastInSwitchStmt + Design Rules + + + NonCaseLabelInSwitchStatement + Design Rules + + + OptimizableToArrayCall + Design Rules + + + BadComparison + Design Rules + + + EqualsNull + Design Rules + + + ConfusingTernary + Design Rules + + + InstantiationToGetClass + Design Rules + + + IdempotentOperations + Design Rules + + + SimpleDateFormatNeedsLocale + Design Rules + + + ImmutableField + Design Rules + + + UseLocaleWithCaseConversions + Design Rules + + + AvoidProtectedFieldInFinalClass + Design Rules + + + AssignmentToNonFinalStatic + Design Rules + + + MissingStaticMethodInNonInstantiatableClass + Design Rules + + + AvoidSynchronizedAtMethodLevel + Design Rules + + + MissingBreakInSwitch + Design Rules + + + UseNotifyAllInsteadOfNotify + Design Rules + + + AvoidInstanceofChecksInCatchClause + Design Rules + + + AbstractClassWithoutAbstractMethod + Design Rules + + + SimplifyConditional + Design Rules + + + CompareObjectsWithEquals + Design Rules + + + PositionLiteralsFirstInComparisons + Design Rules + + + UnnecessaryLocalBeforeReturn + Design Rules + + + NonThreadSafeSingleton + Design Rules + + + UncommentedEmptyMethod + Design Rules + + + UncommentedEmptyConstructor + Design Rules + + + AvoidConstantsInterface + Design Rules + + + UnsynchronizedStaticDateFormatter + Design Rules + + + PreserveStackTrace + Design Rules + + + UseCollectionIsEmpty + Design Rules + + + ClassWithOnlyPrivateConstructorsShouldBeFinal + Design Rules + + + EmptyMethodInAbstractClassShouldBeAbstract + Design Rules + + + SingularField + Design Rules + + + ReturnEmptyArrayRatherThanNull + Design Rules + + + AbstractClassWithoutAnyMethod + Design Rules + + + TooFewBranchesForASwitchStatement + Design Rules + + + AvoidCatchingThrowable + Strict Exception Rules + + + SignatureDeclareThrowsException + Type Resolution Rules + + + ExceptionAsFlowControl + Strict Exception Rules + + + AvoidCatchingNPE + Strict Exception Rules + + + AvoidThrowingRawExceptionTypes + Strict Exception Rules + + + AvoidThrowingNullPointerException + Strict Exception Rules + + + AvoidRethrowingException + Strict Exception Rules + + + DoNotExtendJavaLangError + Strict Exception Rules + + + DoNotThrowExceptionInFinally + Strict Exception Rules + + + AvoidThrowingNewInstanceOfSameException + Strict Exception Rules + + + UnusedPrivateField + Unused Code Rules + + + UnusedLocalVariable + Unused Code Rules + + + UnusedPrivateMethod + Unused Code Rules + + + UnusedFormalParameter + Unused Code Rules + + + MoreThanOneLogger + Java Logging Rules + + + LoggerIsNotStaticFinal + Java Logging Rules + + + SystemPrintln + Java Logging Rules + + + AvoidPrintStackTrace + Java Logging Rules + + + AvoidDuplicateLiterals + String and StringBuffer Rules + + + StringInstantiation + String and StringBuffer Rules + + + StringToString + String and StringBuffer Rules + + + InefficientStringBuffering + String and StringBuffer Rules + + + UnnecessaryCaseChange + String and StringBuffer Rules + + + UseStringBufferLength + String and StringBuffer Rules + + + AppendCharacterWithChar + String and StringBuffer Rules + + + ConsecutiveLiteralAppends + String and StringBuffer Rules + + + UseIndexOfChar + String and StringBuffer Rules + + + InefficientEmptyStringCheck + String and StringBuffer Rules + + + InsufficientStringBufferDeclaration + String and StringBuffer Rules + + + UselessStringValueOf + String and StringBuffer Rules + + + StringBufferInstantiationWithChar + String and StringBuffer Rules + + + UseEqualsToCompareStrings + String and StringBuffer Rules + + + AvoidStringBufferField + String and StringBuffer Rules + + + ReplaceVectorWithList + Migration Rules + + + ReplaceHashtableWithMap + Migration Rules + + + ReplaceEnumerationWithIterator + Migration Rules + + + AvoidEnumAsIdentifier + Migration Rules + + + AvoidAssertAsIdentifier + Migration Rules + + + IntegerInstantiation + Migration Rules + + + ByteInstantiation + Migration Rules + + + ShortInstantiation + Migration Rules + + + LongInstantiation + Migration Rules + + + JUnit4TestShouldUseBeforeAnnotation + Migration Rules + + + JUnit4TestShouldUseAfterAnnotation + Migration Rules + + + JUnit4TestShouldUseTestAnnotation + Migration Rules + + + JUnit4SuitesShouldUseSuiteAnnotation + Migration Rules + + + JUnitUseExpected + Migration Rules + + + UseProperClassLoader + J2EE Rules + + + MDBAndSessionBeanNamingConvention + J2EE Rules + + + RemoteSessionInterfaceNamingConvention + J2EE Rules + + + LocalInterfaceSessionNamingConvention + J2EE Rules + + + LocalHomeNamingConvention + J2EE Rules + + + RemoteInterfaceNamingConvention + J2EE Rules + + + DoNotCallSystemExit + J2EE Rules + + + StaticEJBFieldShouldBeFinal + J2EE Rules + + + DoNotUseThreads + J2EE Rules + + + LocalVariableCouldBeFinal + Optimization Rules + + + MethodArgumentCouldBeFinal + Optimization Rules + + + AvoidInstantiatingObjectsInLoops + Optimization Rules + + + UseArrayListInsteadOfVector + Optimization Rules + + + SimplifyStartsWith + Optimization Rules + + + UseStringBufferForStringAppends + Optimization Rules + + + UseArraysAsList + Optimization Rules + + + AvoidArrayLoops + Optimization Rules + + + UnnecessaryWrapperObjectCreation + Optimization Rules + + + AddEmptyString + Optimization Rules + + + EmptyCatchBlock + Basic Rules + + + EmptyIfStmt + Basic Rules + + + EmptyWhileStmt + Basic Rules + + + EmptyTryBlock + Basic Rules + + + EmptyFinallyBlock + Basic Rules + + + EmptySwitchStatements + Basic Rules + + + JumbledIncrementer + Basic Rules + + + ForLoopShouldBeWhileLoop + Basic Rules + + + UnnecessaryConversionTemporary + Basic Rules + + + OverrideBothEqualsAndHashcode + Basic Rules + + + DoubleCheckedLocking + Basic Rules + + + ReturnFromFinallyBlock + Basic Rules + + + EmptySynchronizedBlock + Basic Rules + + + UnnecessaryReturn + Basic Rules + + + EmptyStaticInitializer + Basic Rules + + + UnconditionalIfStatement + Basic Rules + + + EmptyStatementNotInLoop + Basic Rules + + + BooleanInstantiation + Basic Rules + + + UnnecessaryFinalModifier + Basic Rules + + + CollapsibleIfStatements + Basic Rules + + + UselessOverridingMethod + Basic Rules + + + ClassCastExceptionWithToArray + Basic Rules + + + AvoidDecimalLiteralsInBigDecimalConstructor + Basic Rules + + + UselessOperationOnImmutable + Basic Rules + + + MisplacedNullCheck + Basic Rules + + + UnusedNullCheckInEquals + Basic Rules + + + AvoidThreadGroup + Basic Rules + + + BrokenNullCheck + Basic Rules + + + BigIntegerInstantiation + Basic Rules + + + AvoidUsingOctalValues + Basic Rules + + + AvoidUsingHardCodedIP + Basic Rules + + + CheckResultSet + Basic Rules + + + AvoidMultipleUnaryOperators + Basic Rules + + + EmptyInitializer + Basic Rules + + + MethodReturnsInternalArray + Security Code Guidelines + + + ArrayIsStoredDirectly + Security Code Guidelines + + + CouplingBetweenObjects + Coupling Rules + + + ExcessiveImports + Coupling Rules + + + LooseCoupling + Type Resolution Rules + + + DuplicateImports + Import Statement Rules + + + DontImportJavaLang + Import Statement Rules + + + UnusedImports + Type Resolution Rules + + + ImportFromSamePackage + Import Statement Rules + + + TooManyStaticImports + Import Statement Rules + + + JUnitStaticSuite + JUnit Rules + + + JUnitSpelling + JUnit Rules + + + JUnitAssertionsShouldIncludeMessage + JUnit Rules + + + JUnitTestsShouldIncludeAssert + JUnit Rules + + + TestClassWithoutTestCases + JUnit Rules + + + UnnecessaryBooleanAssertion + JUnit Rules + + + UseAssertEqualsInsteadOfAssertTrue + JUnit Rules + + + UseAssertSameInsteadOfAssertTrue + JUnit Rules + + + UseAssertNullInsteadOfAssertTrue + JUnit Rules + + + SimplifyBooleanAssertion + JUnit Rules + + + UnnecessaryConstructor + Controversial Rules + + + NullAssignment + Controversial Rules + + + UnusedModifier + Controversial Rules + + + AssignmentInOperand + Controversial Rules + + + AtLeastOneConstructor + Controversial Rules + + + DontImportSun + Controversial Rules + + + SuspiciousOctalEscape + Controversial Rules + + + CallSuperInConstructor + Controversial Rules + + + UnnecessaryParentheses + Controversial Rules + + + DefaultPackage + Controversial Rules + + + BooleanInversion + Controversial Rules + + + DataflowAnomalyAnalysis + Controversial Rules + + + AvoidFinalLocalVariable + Controversial Rules + + + AvoidUsingShortType + Controversial Rules + + + AvoidUsingVolatile + Controversial Rules + + + AvoidUsingNativeCode + Controversial Rules + + + AvoidAccessibilityAlteration + Controversial Rules + + + DoNotCallGarbageCollectionExplicitly + Controversial Rules + + + ShortMethodName + Naming Rules + + + VariableNamingConventions + Naming Rules + + + MethodNamingConventions + Naming Rules + + + ClassNamingConventions + Naming Rules + + + AbstractNaming + Naming Rules + + + AvoidDollarSigns + Naming Rules + + + MethodWithSameNameAsEnclosingClass + Naming Rules + + + SuspiciousHashcodeMethodName + Naming Rules + + + SuspiciousConstantFieldName + Naming Rules + + + SuspiciousEqualsMethodName + Naming Rules + + + AvoidFieldNameMatchingTypeName + Naming Rules + + + AvoidFieldNameMatchingMethodName + Naming Rules + + + NoPackage + Naming Rules + + + PackageCase + Naming Rules + + + MisleadingVariableName + Naming Rules + + + BooleanGetMethodName + Naming Rules + + + NPathComplexity + Code Size Rules + + + ExcessiveMethodLength + Code Size Rules + + + ExcessiveParameterList + Code Size Rules + + + ExcessiveClassLength + Code Size Rules + + + CyclomaticComplexity + Code Size Rules + + + ExcessivePublicCount + Code Size Rules + + + TooManyFields + Code Size Rules + + + NcssMethodCount + Code Size Rules + + + NcssTypeCount + Code Size Rules + + + NcssConstructorCount + Code Size Rules + + + TooManyMethods + Code Size Rules + + + EmptyFinalizer + Finalizer Rules + + + FinalizeOnlyCallsSuperFinalize + Finalizer Rules + + + FinalizeOverloaded + Finalizer Rules + + + FinalizeDoesNotCallSuperFinalize + Finalizer Rules + + + FinalizeShouldBeProtected + Finalizer Rules + + + AvoidCallingFinalize + Finalizer Rules + + + UseCorrectExceptionLogging + Jakarta Commons Logging Rules + + + ProperLogger + Jakarta Commons Logging Rules + + + BeanMembersShouldSerialize + JavaBean Rules + + + MissingSerialVersionUID + JavaBean Rules + + + ProperCloneImplementation + Clone Implementation Rules + + + CloneThrowsCloneNotSupportedException + Clone Implementation Rules + + + CloneMethodMustImplementCloneable + Type Resolution Rules + + + false + true + diff --git a/AndroidManifest.xml b/AndroidManifest.xml index b5b6a8c..dd5e5d1 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -1,7 +1,7 @@ + android:versionName="0.1" > - + - - + - - + + \ No newline at end of file diff --git a/res/layout/addevent.xml b/res/layout/add_event.xml similarity index 100% rename from res/layout/addevent.xml rename to res/layout/add_event.xml diff --git a/res/layout/eventview.xml b/res/layout/event_view.xml similarity index 100% rename from res/layout/eventview.xml rename to res/layout/event_view.xml diff --git a/res/layout/login.xml b/res/layout/login.xml index c04cf76..e3af67c 100644 --- a/res/layout/login.xml +++ b/res/layout/login.xml @@ -4,60 +4,25 @@ android:layout_height="match_parent" android:orientation="vertical" > - + android:ems="10" + android:hint="@string/username" /> - - - - - - - - - - - - - - - - + android:layout_height="wrap_content" + android:ems="10" + android:hint = "@string/password" + android:inputType="textPassword" />