Skip to content

Conversation

@rgprajeen
Copy link
Contributor

Added JavaDoc comments to few Java classes.

@codecov-io
Copy link

codecov-io commented Dec 21, 2017

Codecov Report

Merging #1025 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #1025   +/-   ##
======================================
  Coverage    3.71%   3.71%           
======================================
  Files         104     104           
  Lines        5143    5143           
  Branches      489     489           
======================================
  Hits          191     191           
  Misses       4939    4939           
  Partials       13      13
Impacted Files Coverage Δ
...in/java/fr/free/nrw/commons/mwapi/MediaResult.java 0% <ø> (ø) ⬆️
.../java/fr/free/nrw/commons/WelcomePagerAdapter.java 0% <ø> (ø) ⬆️
...in/java/fr/free/nrw/commons/utils/LengthUtils.java 84.21% <ø> (ø) ⬆️
...ain/java/fr/free/nrw/commons/mwapi/LogBuilder.java 0% <ø> (ø) ⬆️
...n/java/fr/free/nrw/commons/CommonsApplication.java 27.65% <ø> (ø) ⬆️
...c/main/java/fr/free/nrw/commons/AboutActivity.java 0% <ø> (ø) ⬆️
app/src/main/java/fr/free/nrw/commons/Utils.java 34.88% <ø> (ø) ⬆️
...n/java/fr/free/nrw/commons/mwapi/UploadResult.java 0% <ø> (ø) ⬆️
...c/main/java/fr/free/nrw/commons/data/Category.java 0% <ø> (ø) ⬆️
app/src/main/java/fr/free/nrw/commons/Media.java 0% <ø> (ø) ⬆️
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0aa20ef...a4e8b9a. Read the comment docs.

public static RefWatcher getRefWatcher(Context context) {
CommonsApplication application = (CommonsApplication) context.getApplicationContext();
return application.refWatcher;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any particular reason to have moved this method?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto code clean up may have been the cause of it

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please move it back? It was intentionally just below the refWatcher declaration.
You can use the page https://github.com/commons-app/apps-android-commons/pull/1025/files to see exactly what you changed :-) Thanks!

import java.util.Map;

/**
* Represents LicenseList
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A list of licenses, actually :-)
Would you mind correcting?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem I will change it

}

/**
* Modifies tag of media
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or create

@rgprajeen rgprajeen changed the title Google CodeIn challenge Added JavaDoc comments to few methods and classes Dec 21, 2017
Copy link
Contributor Author

@rgprajeen rgprajeen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All your suggestions have been fulfilled I guess

import java.util.Map;

/**
* Represents a list of
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing a word I guess?

@commons-app commons-app deleted a comment Dec 21, 2017
}

/**
* Encodes given URL in UTF-8 format
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tricky, please write "URLEncode an URL and make its first character uppercase".

/**
* Encodes given URL in UTF-8 format
* @param url Unformatted URL
* @return Formatted URL
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Encoded URL"

*
* @param context Activity context
*/
public static void startYourself(Context context) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move this method back where it was too, thanks!

}

/**
* Interface used create on clicked callback(s).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am actually not sure what this method does, so can you please remove the Javadoc? Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are mentioning that destroy item comment or the one for interface

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can remove the Javadoc of "public interface Callback {", thanks! :-)

*/
public String getName() {
return name;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please put all of these methods back where they were, thanks!

+ ");";

/**
* Creates new database with provided SQLite database
Copy link
Member

@nicolas-raoul nicolas-raoul Dec 21, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Create new table in provided SQLite database"

}

/**
* Deletes existing database
Copy link
Member

@nicolas-raoul nicolas-raoul Dec 21, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete existing table

}

/**
* Logs in false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what this does, so please remove this javadoc, thanks!

}

/**
* Computes arc length between 2 points
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good! :-)

}

/**
* Gets twice the amount of arc sine of (x)^(1/2)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Calculate the inverse haversine of an angle. See https://en.wikipedia.org/wiki/Haversine_formula"

/**
* Computes square sine function for half of the value entered
* @param x Angle in radians
* @return One-forth of square of sine function
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not exactly ;-) You can leave this one empty.

}

/**
* Computes square sine function for half of the value entered
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Compute haversine"

build.gradle Outdated
}
dependencies {
classpath "com.android.tools.build:gradle:${project.gradleVersion}"
classpath 'com.android.tools.build:gradle:3.0.1'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this intended?

return "";
}
// FIXME: Gross hack bercause my regex skills suck maybe or I am too lazy who knows
// FIXME: Gross hack because my regex skills suck maybe or I am too lazy who knows
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@commons-app commons-app deleted a comment Dec 22, 2017
Copy link
Contributor Author

@rgprajeen rgprajeen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected according to your suggestions

Copy link
Contributor Author

@rgprajeen rgprajeen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected!

Copy link
Contributor Author

@rgprajeen rgprajeen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One last time

Copy link
Contributor Author

@rgprajeen rgprajeen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

??

@nicolas-raoul nicolas-raoul merged commit ed42194 into commons-app:master Dec 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants