I committed a fix.

Gary

On Tue, Sep 1, 2015 at 9:06 AM, Gary Gregory <[email protected]> wrote:

> I develop with Eclipse and Oracle 1.7.0_79, all is well there obviously.
>
> On the command line, I get a compile error with 1.7.0_79, sigh:
>
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-compiler-plugin:3.3:compile
> (default-compile) on project log4j-core: Compilation failure: Compilation
> failure:
> [ERROR] required: Class<T>
> [ERROR] found:    Class<BuiltConfiguration>
> [ERROR] where T is a type-variable:
> [ERROR] T extends BuiltConfiguration declared in class
> DefaultConfigurationBuilder
> [ERROR]
> E:\vcs\git\apache\logging\logging-log4j2\log4j-core\src\main\java\org\apache\logging\log4j\core\config\builder\impl\DefaultConfigurationBuilder.java:[202,42]
> error: cannot infer type arguments for DefaultComponentBuilder<>;
> [ERROR] reason: inferred type does not conform to declared bound(s)
> [ERROR] inferred: ComponentBuilder<CAP#1>
> [ERROR] bound(s): ComponentBuilder<ComponentBuilder<CAP#1>>
> [ERROR] where CAP#1 is a fresh type-variable:
> [ERROR] CAP#1 extends ComponentBuilder<CAP#1> from capture of ?
> [ERROR]
> E:\vcs\git\apache\logging\logging-log4j2\log4j-core\src\main\java\org\apache\logging\log4j\core\config\builder\impl\DefaultConfigurationBuilder.java:[209,42]
> error: cannot infer type arguments for DefaultComponentBuilder<>;
> [ERROR] -> [Help 1]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the
> -e switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions,
> please read the following articles:
> [ERROR] [Help 1]
> http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
> [ERROR]
> [ERROR] After correcting the problems, you can resume the build with the
> command
> [ERROR]   mvn <goals> -rf :log4j-core
>
> Compilation is fine in Java version: 1.8.0_45, vendor: Oracle Corporation.
>
> I'll take a look.
>
> Gary
>
>
>
> On Tue, Sep 1, 2015 at 6:47 AM, Ralph Goers <[email protected]>
> wrote:
>
>> My Java version info -
>>
>> java version "1.7.0_67"
>> Java(TM) SE Runtime Environment (build 1.7.0_67-b01)
>> Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)
>>
>> Interestingly, I don’t see an error in IntelliJ
>>
>>
>> On Sep 1, 2015, at 6:11 AM, Ralph Goers <[email protected]>
>> wrote:
>>
>> After this change I am not getting the following compile failure
>>
>> [ERROR] Failed to execute goal
>> org.apache.maven.plugins:maven-compiler-plugin:3.3:compile
>> (default-compile) on project log4j-core: Compilation failure: Compilation
>> failure:
>> [ERROR] required: Class<T>
>> [ERROR] found:    Class<BuiltConfiguration>
>> [ERROR] where T is a type-variable:
>> [ERROR] T extends BuiltConfiguration declared in class
>> DefaultConfigurationBuilder
>> [ERROR]
>> /Users/rgoers/projects/apache/logging/log4j/log4j2/logging-log4j2/log4j-core/src/main/java/org/apache/logging/log4j/core/config/builder/impl/DefaultConfigurationBuilder.java:[202,42]
>> error: cannot infer type arguments for DefaultComponentBuilder<>;
>> [ERROR] reason: inferred type does not conform to declared bound(s)
>> [ERROR] inferred: ComponentBuilder<CAP#1>
>> [ERROR] bound(s): ComponentBuilder<ComponentBuilder<CAP#1>>
>> [ERROR] where CAP#1 is a fresh type-variable:
>> [ERROR] CAP#1 extends ComponentBuilder<CAP#1> from capture of ?
>> [ERROR]
>> /Users/rgoers/projects/apache/logging/log4j/log4j2/logging-log4j2/log4j-core/src/main/java/org/apache/logging/log4j/core/config/builder/impl/DefaultConfigurationBuilder.java:[209,42]
>> error: cannot infer type arguments for DefaultComponentBuilder<>;
>>
>> On Aug 31, 2015, at 11:52 AM, [email protected] wrote:
>>
>> Repository: logging-log4j2
>> Updated Branches:
>>  refs/heads/LOG4J2-952 c73ef9f4c -> 310d65dd3
>>
>>
>> Fix Generics compiler warnings.
>>
>> Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
>> Commit:
>> http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/310d65dd
>> Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/310d65dd
>> Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/310d65dd
>>
>> Branch: refs/heads/LOG4J2-952
>> Commit: 310d65dd369a6f7513d51dd6a76713bcb0a53d12
>> Parents: c73ef9f
>> Author: ggregory <[email protected]>
>> Authored: Mon Aug 31 11:52:49 2015 -0700
>> Committer: ggregory <[email protected]>
>> Committed: Mon Aug 31 11:52:49 2015 -0700
>>
>> ----------------------------------------------------------------------
>> .../core/config/builder/impl/DefaultConfigurationBuilder.java    | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>> ----------------------------------------------------------------------
>>
>>
>>
>> http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/310d65dd/log4j-core/src/main/java/org/apache/logging/log4j/core/config/builder/impl/DefaultConfigurationBuilder.java
>> ----------------------------------------------------------------------
>> diff --git
>> a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/builder/impl/DefaultConfigurationBuilder.java
>> b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/builder/impl/DefaultConfigurationBuilder.java
>> index b505de6..95d5281 100644
>> ---
>> a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/builder/impl/DefaultConfigurationBuilder.java
>> +++
>> b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/builder/impl/DefaultConfigurationBuilder.java
>> @@ -211,13 +211,13 @@ public class DefaultConfigurationBuilder<T extends
>> AssembledConfiguration> imple
>>     @Override
>>     @SuppressWarnings({"unchecked", "rawtypes"})
>>     public ComponentBuilder<ComponentBuilder> newComponent(String name,
>> String type) {
>> -        return new DefaultComponentBuilder(this, name, type);
>> +        return new DefaultComponentBuilder<>(this, name, type);
>>     }
>>
>>     @Override
>>     @SuppressWarnings({"unchecked", "rawtypes"})
>>     public ComponentBuilder<ComponentBuilder> newComponent(String name,
>> String type, String value) {
>> -        return new DefaultComponentBuilder(this, name, type, value);
>> +        return new DefaultComponentBuilder<>(this, name, type, value);
>>     }
>>
>>     @Override
>>
>>
>>
>>
>>
>
>
> --
> E-Mail: [email protected] | [email protected]
> Java Persistence with Hibernate, Second Edition
> <http://www.manning.com/bauer3/>
> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
> Spring Batch in Action <http://www.manning.com/templier/>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>



-- 
E-Mail: [email protected] | [email protected]
Java Persistence with Hibernate, Second Edition
<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Reply via email to