On 10 January 2016 at 16:52, Martin Grigorov <mgrigo...@apache.org> wrote:

> >
>
> I was confused that Isis moved to 1.8 with 1.10.0, but now I see it is
> still 1.7 (https://github.com/apache/isis/blob/master/core/pom.xml#L60-L61
> )
>
>
Indeed... nothing changed in 1.10.0

It's kind of odd that these settings weren't sufficient to prevent the
error: my understanding was that, even if building with a JDK8 JVM (as I
did), that these settings would flag up and prevent any accidental use of
JDK8 APIs.  But obviously not!

Anyway, with toolchains configured the errors that Nacho identified did all
get flagged up when I did the build (and obviously I fixed them all before
doing the release).  So I am pretty certain that using toolchains will
ensure that this issue doesn't arise in the future.

Thx
Dan




>
> >
> >
> > ~~~
> >
> > Meanwhile, I've cut 1.11.1 RC1 we the appropriate fixes, this is now
> being
> > voted on in the dev@ mailing list.  This vote will stay open for min 72
> > hours, but if it passes then we should be able to release 1.11.1 on Wed
> pm
> > or Thu am.
> >
> > Thx
> > Dan
> >
> >
> >
> >
> >
> >
> >
> > > Martin Grigorov
> > > Wicket Training and Consulting
> > > https://twitter.com/mtgrigorov
> > >
> > > On Fri, Jan 8, 2016 at 12:35 PM, Dan Haywood <
> > d...@haywood-associates.co.uk
> > > >
> > > wrote:
> > >
> > > > Hi Nacho,
> > > >
> > > > Thanks for reporting this, which is obviously a problem.
> > > >
> > > > I think we should issue a patch (1.11.1) to fix that.  And obviously
> I
> > > need
> > > > to look at the release procedures so that this error doesn't occur in
> > the
> > > > future.
> > > >
> > > > I'll try to get a vote out this weekend.
> > > >
> > > > Thx
> > > > Dan
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > On 8 January 2016 at 11:28, Nacho Cánovas Rejón <
> > > > n.cano...@gesconsultor.com>
> > > > wrote:
> > > >
> > > > > Hi everybody.
> > > > >
> > > > >
> > > > >
> > > > > I updated Apache ISIS version to 1.11 and I have a Java Version
> > > Problem.
> > > > >
> > > > >
> > > > >
> > > > > Apache ISIS is compatible with Java 1.7 and 1.8, but in two changes
> > > > > (ISIS-1257: c6c3066e3b7e58dc1d338e44ba4ca926dc29d1ef and ISIS-1213:
> > > > > 6ec46332ef2ad50959148751e90222d13a8eecf3) you use a method that
> only
> > > > exists
> > > > > in Java 1.8 (
> > > > > <
> > > > >
> > > >
> > >
> >
> https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Method.html#get
> > > > > ParameterCount--> getParameterCount())
> > > > >
> > > > >
> > > > >
> > > > > We don’t want to migrate to 1.8 because it requires so many changes
> > on
> > > > our
> > > > > app, so if you can change code to be compatible, these are the
> > changes
> > > I
> > > > > made:
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > >
> >
> isis\core\metamodel\src\main\java\org\apache\isis\core\metamodel\facets\Anno
> > > > > tations.java
> > > > >
> > > > >
> > > > >
> > > > > private static <T extends Annotation> void appendEvaluators(
> > > > >
> > > > >             final Class<?> cls,
> > > > >
> > > > >             final Class<T> annotationClass,
> > > > >
> > > > >             final List<Evaluator<T>> evaluators) {
> > > > >
> > > > >
> > > > >
> > > > >         for (Method method : cls.getDeclaredMethods()) {
> > > > >
> > > > >             if(MethodScope.OBJECT.matchesScopeOf(method) &&
> > > > >
> > > > >                     method.getParameterCount()
> > > > > method.getParameterTypes().length == 0) {
> > > > >
> > > > >                 final Annotation annotation =
> > > > > method.getAnnotation(annotationClass);
> > > > >
> > > > >                 if(annotation != null) {
> > > > >
> > > > >                     evaluators.add(new MethodEvaluator(method,
> > > > > annotation));
> > > > >
> > > > >                 }
> > > > >
> > > > >             }
> > > > >
> > > > >         }
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > >
> >
> isis\core\metamodel\src\main\java\org\apache\isis\core\metamodel\services\co
> > > > > ntainer\DomainObjectContainerDefault.java
> > > > >
> > > > >
> > > > >
> > > > > public <T> T mixin(final Class<T> mixinClass, final Object
> mixedIn) {
> > > > >
> > > > >         final ObjectSpecification objectSpec =
> > > > > getSpecificationLoader().loadSpecification(mixinClass);
> > > > >
> > > > >         final MixinFacet mixinFacet =
> > > > > objectSpec.getFacet(MixinFacet.class);
> > > > >
> > > > >         if(mixinFacet == null) {
> > > > >
> > > > >             throw new NonRecoverableException("Class '" +
> > > > > mixinClass.getName() + " is not a mixin");
> > > > >
> > > > >         }
> > > > >
> > > > >         if(!mixinFacet.isMixinFor(mixedIn.getClass())) {
> > > > >
> > > > >             throw new NonRecoverableException("Mixin class '" +
> > > > > mixinClass.getName() + " is not a mixin for supplied object '" +
> > > mixedIn
> > > > +
> > > > > "'");
> > > > >
> > > > >         }
> > > > >
> > > > >         final Constructor<?>[] constructors =
> > > > mixinClass.getConstructors();
> > > > >
> > > > >         for (Constructor<?> constructor : constructors) {
> > > > >
> > > > >             if(constructor.getParameterCount()
> > > > > constructor.getParameterTypes().length == 1 &&
> > > > >
> > > > >
> > > > >
> > >
> constructor.getParameterTypes()[0].isAssignableFrom(mixedIn.getClass()))
> > > > {
> > > > >
> > > > >                 final Object mixin;
> > > > >
> > > > >                 try {
> > > > >
> > > > >                     mixin = constructor.newInstance(mixedIn);
> > > > >
> > > > >                     return (T)injectServicesInto(mixin);
> > > > >
> > > > >                 } catch (InstantiationException |
> > > IllegalAccessException
> > > > |
> > > > > InvocationTargetException e) {
> > > > >
> > > > >                     throw new NonRecoverableException(e);
> > > > >
> > > > >                 }
> > > > >
> > > > >             }
> > > > >
> > > > >         }
> > > > >
> > > > >
> > > > >
> > > > > This is the documentation of JAVA with allowed methods depending on
> > > > > version:
> > > > >
> > > > >
> > >
> https://docs.oracle.com/javase/7/docs/api/java/lang/reflect/Method.html
> > > > >
> > > > >
> > >
> https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Method.html
> > > > >
> > > > >
> > > > >
> > > > > Best regards and happy new year.
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > >
> >
>

Reply via email to