https://codereview.appspot.com/10679049/diff/1/google-http-client-findbugs/pom.xml File google-http-client-findbugs/pom.xml (right): https://codereview.appspot.com/10679049/diff/1/google-http-client-findbugs/pom.xml#newcode26 google-http-client-findbugs/pom.xml:26: <plugin> Comment that we are suppressing this because we're ...
10 years, 10 months ago
(2013-06-28 21:48:56 UTC)
#2
https://codereview.appspot.com/10679049/diff/1/google-http-client-findbugs/pom.xml File google-http-client-findbugs/pom.xml (right): https://codereview.appspot.com/10679049/diff/1/google-http-client-findbugs/pom.xml#newcode26 google-http-client-findbugs/pom.xml:26: <plugin> On 2013/06/28 21:48:57, yanivi wrote: > Comment that ...
10 years, 10 months ago
(2013-07-01 16:10:04 UTC)
#3
https://codereview.appspot.com/10679049/diff/1/google-http-client-findbugs/po...
File google-http-client-findbugs/pom.xml (right):
https://codereview.appspot.com/10679049/diff/1/google-http-client-findbugs/po...
google-http-client-findbugs/pom.xml:26: <plugin>
On 2013/06/28 21:48:57, yanivi wrote:
> Comment that we are suppressing this because we're OK with a Java 6
requirement
> for the FindBugs plugin.
Done.
https://codereview.appspot.com/10679049/diff/1/google-http-client/src/main/ja...
File google-http-client/src/main/java/com/google/api/client/util/IOUtils.java
(right):
https://codereview.appspot.com/10679049/diff/1/google-http-client/src/main/ja...
google-http-client/src/main/java/com/google/api/client/util/IOUtils.java:238: *
{@link Beta} Attempts to set the given file's permissions such that it can only
be read,
On 2013/06/28 21:48:57, yanivi wrote:
> <br/> after Beta to match style we're using
Done.
https://codereview.appspot.com/10679049/diff/1/google-http-client/src/main/ja...
google-http-client/src/main/java/com/google/api/client/util/IOUtils.java:242: *
Note that this method requires at least Java version 1.6
On 2013/06/28 21:48:57, yanivi wrote:
> This method doesn't require 1.6 per se. It's just that if you are running it
> under Java 5 then doesn't do anything and just returns false. I'd rather keep
> the @return comment short and instead be detailed in the main section of the
> method JavaDoc.
Done.
https://codereview.appspot.com/10679049/diff/1/google-http-client/src/main/ja...
google-http-client/src/main/java/com/google/api/client/util/IOUtils.java:252:
public static boolean setPermissionsToOwnerOnly(File file) throws IOException {
On 2013/06/28 21:48:57, yanivi wrote:
> do we really need to return a boolean? maybe make it void?
I think this is a more intuitive API. Let the caller decide what it means if the
permissions couldn't be changed.
https://codereview.appspot.com/10679049/diff/1/google-http-client/src/main/ja...
google-http-client/src/main/java/com/google/api/client/util/IOUtils.java:260:
return ((Boolean) setReadable.invoke(file, false, false)
On 2013/06/28 21:48:57, yanivi wrote:
> Problem is that the || short-cuts attempts to run the others the moment one
> fails. In particular, if we cannot make it not readable by everyone, we still
> want to try to make it readable by owner. Notice the previous code was doing
> that, so we should try to retain that behavior.
Done.
https://codereview.appspot.com/10679049/diff/1/google-http-client/src/main/ja...
File
google-http-client/src/main/java/com/google/api/client/util/store/FileDataStoreFactory.java
(right):
https://codereview.appspot.com/10679049/diff/1/google-http-client/src/main/ja...
google-http-client/src/main/java/com/google/api/client/util/store/FileDataStoreFactory.java:64:
LOGGER.warning("Unable to change some permissions for: " + dataDirectory);
On 2013/06/28 21:48:57, yanivi wrote:
> why do we need this? we're already logging it inside the setPermissions
method.
Done.
https://codereview.appspot.com/10679049/diff/13001/google-http-client-findbugs/pom.xml File google-http-client-findbugs/pom.xml (right): https://codereview.appspot.com/10679049/diff/13001/google-http-client-findbugs/pom.xml#newcode27 google-http-client-findbugs/pom.xml:27: not part of the library but a tool used ...
10 years, 10 months ago
(2013-07-01 16:41:46 UTC)
#4
https://codereview.appspot.com/10679049/diff/16002/google-http-client/src/main/java/com/google/api/client/util/IOUtils.java File google-http-client/src/main/java/com/google/api/client/util/IOUtils.java (right): https://codereview.appspot.com/10679049/diff/16002/google-http-client/src/main/java/com/google/api/client/util/IOUtils.java#newcode249 google-http-client/src/main/java/com/google/api/client/util/IOUtils.java:249: public static boolean setPermissionsToOwnerOnly(File file) throws IOException { On ...
10 years, 10 months ago
(2013-07-01 17:00:37 UTC)
#5
https://codereview.appspot.com/10679049/diff/16002/google-http-client/src/mai...
File google-http-client/src/main/java/com/google/api/client/util/IOUtils.java
(right):
https://codereview.appspot.com/10679049/diff/16002/google-http-client/src/mai...
google-http-client/src/main/java/com/google/api/client/util/IOUtils.java:249:
public static boolean setPermissionsToOwnerOnly(File file) throws IOException {
On 2013/07/01 16:41:46, yanivi wrote:
> The more I look at this the more I think we shouldn't try to make a
> general-purpose utility out of it. I really think for 1.16 it will be much
> easier to move this to FileDataStoreFactory.
Done.
https://codereview.appspot.com/10679049/diff/16002/google-http-client/src/mai...
google-http-client/src/main/java/com/google/api/client/util/IOUtils.java:260:
failure = !(Boolean) setReadable.invoke(file, true, true)
On 2013/07/01 16:41:46, yanivi wrote:
> would be nice to log a slightly different warning if permissions weren't
changed
> for everybody vs. changed for yourself, like the implementation currently
does.
Done.
https://codereview.appspot.com/10679049/diff/16002/google-http-client/src/mai...
google-http-client/src/main/java/com/google/api/client/util/IOUtils.java:271: }
catch (NoSuchMethodException exception) {
On 2013/07/01 16:41:46, yanivi wrote:
> [optional] would be nice to log a warning when running under Java 5 that
> specifies the permissions weren't changed because you're running under Java 5.
Done.
https://codereview.appspot.com/10679049/diff/13001/google-http-client-findbugs/pom.xml File google-http-client-findbugs/pom.xml (right): https://codereview.appspot.com/10679049/diff/13001/google-http-client-findbugs/pom.xml#newcode27 google-http-client-findbugs/pom.xml:27: not part of the library but a tool used ...
10 years, 10 months ago
(2013-07-01 17:15:15 UTC)
#6
Issue 10679049: http: Add animal-sniffer plugin and fix reported errors
(Closed)
Created 10 years, 10 months ago by ngmiceli
Modified 10 years, 10 months ago
Reviewers: yanivi
Base URL: https://code.google.com/p/google-http-java-client/
Comments: 31