aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-10-04Mostly migrate off jsr305.cpovirk
- Mostly migrate to Checker Framework declaration annotations. - Migrate @GuardedBy to a custom annotation for now. (We would migrate to Error Prone's, but that's causing me problems as I experiment with JPMS.) Compare to b/69411537 for Guava. I've left @ParametersAreNonnullByDefault in place for now, but we'd need to remove it to fully eliminate the jsr305 dep. RELNOTES=Migrated from jsr305 `@Nullable` to Checker Framework `@NullableDecl`. In addition to the new dependency on the Checker Framework annotations, we keep the dependency on jsr305 for now so that we can keep using `@ParametersAreNonNullByDefault`. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=272713254
2019-10-04Update Travis JDK to JDK11.cpovirk
This is an attempt to fix the error: install-jdk.sh 2019-09-17 Expected feature release number in range of 9 to 14, but got: 8 The command "~/bin/install-jdk.sh --target "/home/travis/oraclejdk8" --workspace "/home/travis/.cache/install-jdk" --feature "8" --license "BCL"" failed and exited with 3 during . It is similar to CL 253584474 RELNOTES=n/a ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=272528889
2019-10-02Fix exception message - add missing closing parenthesisEvgeny Mandrikov
Fixes https://github.com/google/jimfs/pull/37 RELNOTES=n/a ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=272510710
2019-10-02Removed TODO comment for making heap disks configurable, assahmed10315
its already implemented Fixes #36 RELNOTES=n/a ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=272432078
2019-06-06Update to Truth 0.45, and address deprecations.cpovirk
Renames may include: - containsAllOf => containsAtLeast - containsAllIn => containsAtLeastElementsIn - isSameAs => isSameInstanceAs - isOrdered => isInOrder - isStrictlyOrdered => isInStrictOrder The other major change is to change custom subjects to extend raw Subject instead of supplying type parameters. The type parameters are being removed from Subject. This CL will temporarily produce rawtypes warnings, which will go away when I remove the type parameters (as soon as this batch of CLs is submitted). Some CLs in this batch also migrate calls away from actualAsString(). Its literal replacement is `"<" + actual + ">"` (unless an object overrides actualCustomStringRepresentation()), but usually I've made a larger change, such as switching from an old-style "Not true that..." failure message to one generated with the Fact API. In that case, the new code usually contains a direct reference to this.actual (a field that I occasionally had to create). Another larger change I sometimes made is to switch from a manual check-and-fail approach to instead use check(...). And sometimes I just remove a withMessage() call that's no longer necessary now that the code uses check(...), or I introduce a check(...) call. (An assertion made with check(...) automatically includes the actual value from the original subject, so there's no need to set it again with withMessage().) Finally, there's one CL in this batch in which I migrate a Correspondence subclass to instead use Correspondence.from. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=251486146
2019-06-06Assert that snapshot elements are ordered, as suggested by the comment.glorioso
RELNOTES=n/a ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=250762064
2019-06-06Fix internal build breakage from making assertThat(SortedSet) @GoogleInternal.cpovirk
(https://github.com/google/truth/issues/556) RELNOTES=n/a ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=250746093
2019-05-15Migrate users from the old, deprecated Subject.fail* methods to the new ↵cpovirk
Subject.fail* methods or, in some cases, to Subject.check. Most of the changes in this CL were made manually. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=247414164
2019-05-08Instead of calling Subject.actual(), store the actual value in a field, and ↵cpovirk
read that. actual() is being removed. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=247003356
2019-05-07Remove PathSubject.andThat().cgdecker
RELNOTES=n/a ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=246869377
2019-05-07Migrate Truth Subjects from no-arg check() to the overload that accepts a ↵cpovirk
description. The overload that accepts a description generally produces better failure messages: - The first line of the message it produces is something like: "value of: myProto.getResponse()" (where "getResponse()" is taken from the provided description) - The last line of the message it produces is something like: "myProto was: response: query was throttled" (the full value of myProto) - And the existing text goes in between. Additional motivation: We are deleting the no-arg overload externally (and probably internally thereafter). ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=246824728
2019-05-05Migrate Truth subjects from the old fail(String, Object) to the new ↵cpovirk
failWithActual(String, Object), tweaking verbs for the new grammar. Before: fail("has foo", expected); After: failWithActual("expected to have foo", expected); ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=246144541
2019-04-29Migrate from assertThat(foo).named("foo") to assertWithMessage("foo").that(foo).cpovirk
(The exact change is slightly different in some cases, like when using custom subjects or check(), but it's always a migration from named(...) to [assert]WithMessage(...).) named(...) is being removed. This CL may slightly modify the failure messages produced, but all the old information will still be present. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=245027649
2019-04-29Migrate from containsAllOf to containsAtLeast.cpovirk
The two behave identically, and containsAllOf is being removed. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=244876613
2019-04-29Update to Truth 0.44.cpovirk
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=244875885
2019-04-29Migrate Truth subjects from a manual "test and fail" approach to one using ↵cpovirk
Subject.check(...). Before: if (actual().foo() != expected) { fail("has foo", expected); } After: check("foo()").that(actual().foo()).isEqualTo(expected); This CL changes the format of the failure message. The new message will typically contain the same information as the old, but if some is missing, let us know, and consider adding a test. The overload of check(...) used by this CL was added in Truth 0.40. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=244408001
2019-04-29Run google-java-format over all of JimFS.kak
RELNOTES=Run google-java-format over all of JimFS. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=244231542
2019-04-18Enable GoodTime-API for JimFS. (#79)Ron Shapiro
RELNOTES=n/a ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=244183449
2019-03-21Stop trying to build/test Jimfs with JDK7 on Travis.cgdecker
Since we use error-prone for the @Beta checker and error-prone versions since 2.0.5 require JDK8 (https://github.com/google/error-prone/issues/369), it can't work. RELNOTES=n/a ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=239632959
2019-03-21Fix an issue with Files.newOutputStream for Jimfs where it wouldn't truncate ↵cgdecker
the file if the TRUNCATE_EXISTING option was explicitly provided and the WRITE option wasn't. The code that handles TRUNCATE_EXISTING requires that WRITE also be present for it to do anything (because it's documented that it's ignored otherwise), but newOutputStream should always add the WRITE option if the user doesn't provide it because an OutputStream is obviously for writing. (This matches the default behavior of FileSystemProvider.newOutputStream as well.) Fixes #77 RELNOTES=Fixed an issue where `Files.newOutputStream` wouldn't truncate the file if the `TRUNCATE_EXISTING` option was explicitly provided and the `WRITE` option wasn't. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=237818016
2019-03-21Update Guava versionronshapiro
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=225212188
2018-04-05Update Jimfs dependency versions and add the beta checker.cgdecker
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=191475833
2018-04-03Merge pull request #66 from google/sync-master-2018/04/03Colin Decker
Moe Sync
2018-04-03Change getSubject() to actual() in PathSubject.cgdecker
RELNOTES=n/a ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=191319699
2018-01-22Merge pull request #64 from google/sync-master-2018/01/22Colin Decker
Moe sync
2018-01-22Update maven-javadoc-plugin to 3.0.0.cpovirk
This is necessary to build with JDK9. (You can still build *for* older versions of Java to maintain compatibility; this is just to work with build tools from JDK9, as will become the Google default.) As part of that, migrate from additionalparam, which was deprecated and removed last year, to additionalOptions. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=182543366
2018-01-16Suppress errors for streams that contain closeable resources (#63)Ron Shapiro
RELNOTES=N/A ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=181787747
2018-01-05Merge pull request #59 from google/sync-master-2018/01/05Colin Decker
Moe sync
2018-01-05Ensure streams that encapsulate a closeable resource are closedcushon
This cleanup is being performed in preparation for enabling a compiler error. From the javadoc for Files.list: The returned stream encapsulates a DirectoryStream. If timely disposal of file system resources is required, the try-with-resources construct should be used to ensure that the stream's close method is invoked after the stream operations are completed. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=180930883
2017-12-04Also remove gpg.skip/maven-gpg-plugin from caliper and jimfs. (#58)Ron Shapiro
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=177639026
2017-11-27Remove oraclejdk7 environment from Travis build, as oraclejdk7 no longer ↵cgdecker
seems to be available. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=177059513
2017-11-27Merge pull request #57 from google/sync-master-2017/11/15Colin Decker
Moe sync
2017-11-20Update to guava-23.4-androidronshapiro
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=176378503
2017-11-20Update Truth to 0.36 to take advantage of FailureMetadataronshapiro
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=175893610
2017-11-20Replace truth.FailureStrategy with truth.FailureMetadata in custom Subjects.jijiang
Also changed truth.SubjectFactory to truth.Subject.Factory (plain renaming) and use method reference instead of anonymous class to create the factory when applicable. FailureMetadata, an opaque object to its users, is introduced to replace FailureStrategy in in custom Subject in order to resolve some existing flaws of FailureStrategy as well as enable new features to be added to Truth. New API is available in Truth-0.36, if there is a build/pom.xml, it's also updated to use this version. More information: See [] & [] Tested: TAP --sample for global presubmit queue [] ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=175818007
2017-08-03Merge pull request #52 from google/sync-master-2017/08/03Ron Shapiro
Moe sync
2017-08-03Fix the outdated link of google's java style guideTianyin Xu
Closes https://github.com/google/jimfs/pull/50 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=161623508
2017-06-14Merge pull request #48 from google/sync-master-06/14/2017Colin Decker
Moe sync
2017-06-14Introduce a meaningful .toString() for JimFS's Configuration class. Standard ↵diamondm
configurations have short, meaningful names (e.g. "Configuration{Unix}") while custom instances include the relevant details of the configuration. Resolves https://github.com/google/jimfs/issues/45 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=158857133
2017-06-05Merge pull request #46 from google/sync-master-06/05/2017Colin Decker
Moe sync
2017-06-05Fix comparison in JimfsPath that will always return false (as ArrayDeque is notdiamondm
a List) to simply compare the collections' elements. Eclipse caught this issue, warning "Unlikely argument type for equals(): ImmutableList<Name> seems to be unrelated to Deque<Name>". Also applied two ErrorProne fixes to "Use grouping parenthesis to make the operator precedence explicit". ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=157605901
2016-04-01Ignore errors that prevent Jimfs.newFileSystem from working in an ↵cgdecker
environment where ServiceLoader doesn't work correctly to load the SystemJimfsFileSystemProvider. This is in relation to https://github.com/google/jimfs/issues/31... I don't entirely understand what's going on there, but it does seem like an exception being thrown from FileSystems.newFileSystem should not prevent the user from getting the FileSystem that's already been created just because it can't be cached. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=118790127
2016-04-01Fix a potential issue where a JimfsFileSystem would not be removed from the ↵cgdecker
static cache if SystemJimfsFileSystemProvider isn't found in the installed providers list but can be loaded from its ClassLoader by ServiceLoader. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=118472638
2016-03-23A couple attribute-related changes:cgdecker
- Throw UOE instead of IAE when attempting to set an attribute that can't be set at all during file creation. This matches the behavior of the real file system implementations. - Make the owner:owner attribute not settable during file creation, which also matches the actual behavior. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=117965277
2016-03-22Small formatting fix.cgdecker
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=117853112
2016-03-22Merge pull request #30 from jasontedor/attributes-uoeColin Decker
Throw UOE when setting unsupported attributes
2016-03-21Throw UOE when setting unsupported attributesJason Tedor
This commit modifies the behavior when setting unsupported attributes to throw an UnsupportedOperationException instead of an IllegalArgumentException. This is to make JimfsFileSystemProvider#createDirectory and JimfsFileSystemProvider#newByteChannel behave consistently with the Javadocs for FileSystemProvider#createDirectory and FileSystemProvider#newByteChannel which require an UnsupportedOperationException to be thrown when the array of attributes contains attributes which can not be set. In particular, these methods are invoked via Files#createTempDirectory and Files#createFile which have the same requirement regarding throwing an UnsupportedOperationException when the array of attributes contains attributes which can not be set. Most notably, this causes a discrepancy between the handling of Jimfs when configured to act like a Windows filesystem versus the behavior of sun.nio.fs.WindowsFileSystem where the former will throw an IllegalArgumentException if an attempt is made to set a POSIX attribute but the latter will throw an UnsupportedOperationException (consistent with the Javadocs).
2016-03-14Update references to guava-libraries.googlecode.com to the Github location ↵cgdecker
in pom.xml files. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=116982529
2016-03-14Update the travis configurations to only build the "master" branch or any ↵cgruber
branches prefixed with "release" in order to reduce the duplicate use of build bots on travis for pull requests based on non-user-fork-originated branches. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=116275195
2016-02-16Jimfs 1.1 has been released; update the README.cgdecker
While we're at it, update the snapshot version (tentatively) to 2.0 and update a couple dependency versions. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=114616654