I tried applying RfValidator to our codebase:
 1. Eclipse fails compilation with a StackOverflowError (will try with a
greater stack, currently have -Xms128m in my eclipse.ini), so I launched
it using http://maven-annotation-plugin.googlecode.com/
 2. it reports a warning with "Cannot fully validate proxy since type
<domain type> is not available" (OK, no problem) but then reports many
"A proxy must be annotated with ProxyFor, ProxyForName, or JsonRpcProxy"
errors on the same .java file. See notes in ProxyScanner.
 3. I get warnings/errors in domain validation about methods that either
exist in the domain class or have been annotated with
SkipInterfaceValidation. See notes in DomainChecker.

It seems to otherwise have fixed issue 5926, yay! (I don't see any error
or warning reported about those, maybe I missed them but I don't think
so)

And I like the "has no default constructor" message! (can it be just a
DiagnosticKind.NOTE ? although I'm not sure how/where people will see
the message then, if at all)


http://gwt-code-reviews.appspot.com/1467804/diff/3002/user/src/com/google/web/bindery/requestfactory/apt/DomainChecker.java
File
user/src/com/google/web/bindery/requestfactory/apt/DomainChecker.java
(right):

http://gwt-code-reviews.appspot.com/1467804/diff/3002/user/src/com/google/web/bindery/requestfactory/apt/DomainChecker.java#newcode58
user/src/com/google/web/bindery/requestfactory/apt/DomainChecker.java:58:
this.params = new ArrayList<TypeMirror>(params.size());
Wrap in a Collections.unmodifiableList() (as a safeguard)

http://gwt-code-reviews.appspot.com/1467804/diff/3002/user/src/com/google/web/bindery/requestfactory/apt/DomainChecker.java#newcode187
user/src/com/google/web/bindery/requestfactory/apt/DomainChecker.java:187:
state.poison(checkedType, "Could not find domain method similar to %s",
sb);
Should pass clientMethodElement, otherwise @SkipInterfaceValidation will
only be checked on the class, not on the method.

http://gwt-code-reviews.appspot.com/1467804/diff/3002/user/src/com/google/web/bindery/requestfactory/apt/ProxyScanner.java
File
user/src/com/google/web/bindery/requestfactory/apt/ProxyScanner.java
(right):

http://gwt-code-reviews.appspot.com/1467804/diff/3002/user/src/com/google/web/bindery/requestfactory/apt/ProxyScanner.java#newcode78
user/src/com/google/web/bindery/requestfactory/apt/ProxyScanner.java:78:
state.addMapping(x, domain);
This should be called even if domain==null, maybe with a special value,
to take note that the proxy has been seen, so that
TransportableTypeVisitor doesn't bail each time it sees it later.

http://gwt-code-reviews.appspot.com/1467804/diff/3002/user/src/com/google/web/bindery/requestfactory/apt/TypeSimplifier.java
File
user/src/com/google/web/bindery/requestfactory/apt/TypeSimplifier.java
(right):

http://gwt-code-reviews.appspot.com/1467804/diff/3002/user/src/com/google/web/bindery/requestfactory/apt/TypeSimplifier.java#newcode53
user/src/com/google/web/bindery/requestfactory/apt/TypeSimplifier.java:53:
private boolean boxPrimitives;
make 'final'

http://gwt-code-reviews.appspot.com/1467804/diff/3002/user/src/com/google/web/bindery/requestfactory/apt/TypeSimplifier.java#newcode64
user/src/com/google/web/bindery/requestfactory/apt/TypeSimplifier.java:64:
List<TypeMirror> newArgs = new ArrayList<TypeMirror>();
Initialize capacity at x.getTypeArguments().size().

http://gwt-code-reviews.appspot.com/1467804/diff/3002/user/test/com/google/web/bindery/requestfactory/server/RequestFactoryInterfaceValidatorTest.java
File
user/test/com/google/web/bindery/requestfactory/server/RequestFactoryInterfaceValidatorTest.java
(right):

http://gwt-code-reviews.appspot.com/1467804/diff/3002/user/test/com/google/web/bindery/requestfactory/server/RequestFactoryInterfaceValidatorTest.java#newcode45
user/test/com/google/web/bindery/requestfactory/server/RequestFactoryInterfaceValidatorTest.java:45:
// This annotation is temporary until RFIV and this test are removed
Just so that it's clear for everyone, maybe add a note saying the RFIV
only processes SkipInterfaceValidation on methods, not on types (even
less containing types), and that this annotation here is for the
annotation processor.

http://gwt-code-reviews.appspot.com/1467804/

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to