maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tibor17 <>
Subject [GitHub] maven pull request: Improved visibility of collections and variabl...
Date Wed, 31 Dec 2014 13:01:23 GMT
Github user Tibor17 commented on the pull request:
    That's clear we must not break current users.
    You kow my problem is, as always when i design any API, how much open the interfaces should
    Here I tried to make final fields handling concurrent collections, but after breaking
two tests I had to break idea with my code ideas. So it's hard to make perfect thread visibility,
because here you have to use concurrent collections everywhere, break the shared collection
instances and copy them everywhere, and run the tests million times by every single change
with instance variable.
    As I did in JUnit, the same regarding thread visibility, I had to struggle with another
developer and it was really pain to talk with him due to he did not understand what i tried
to explain what really happens in memory and so that theory is nice only on the paper.
    You know, api with immutable model snapshots and modifiable services is much easier for
making deterministic behavior. 
    `private Provider<MavenProject> provider;`
    `private Service service;`
    `MavenProject currentSnapshot = provider.get();`
    `String pomProperty = currentSnapshot.getProperty("my-key");// only getters`
    `service.setProperty("my-key", "new property value");`
    The snapshot instance (umodifiable) is not the same as the internal one in project which
is modifiable.
    Wasn't you thinking about some kind of API emulator or adapter in Maven 4?

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message