Skip to content

Commit 9371151

Browse files
committed
Replaced hardcoded string for class name
Switched to using getName() on the class object rather than a hardcoded string. Ensures that the TAG is updated when refactoring the class name.
1 parent 2ace234 commit 9371151

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

project_and_code_guidelines.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ As a general rule, we use the class name as tag and we define it as a `static fi
283283

284284
```java
285285
public class MyClass {
286-
private static final String TAG = "MyClass";
286+
private static final String TAG = MyClass.class.getName();
287287

288288
public myMethod() {
289289
Log.e(TAG, "My error message");

0 commit comments

Comments
 (0)