• Claudio Bley's avatar
    Fix compilation error when using -source 1.x · e3aa13fe
    Claudio Bley authored
    When using JDK 1.8 with the compiler option `-source 1.6` or `-source
    1.7` or JDK 1.7 with the `-source 1.6` compiler option, compilation
    failed with:
    
    ```
    src/main/java/org/libvirt/event/DomainEvent.java:63: error: incompatible types: inference variable T#1 has incompatible upper bounds Enum<T#2>,T#3
            return this.type.obtain(this.detail);
                                   ^
      where T#1,T#2,T#3 are type-variables:
        T#1 extends Enum<T#1> declared in method <T#1>obtain(int)
        T#2 extends T#3
        T#3 extends Enum<T#3>,DomainEventDetail declared in method <T#3>getDetail()
    ```
    
    Actually, it compiles just fine using a 1.6, 1.7 or 1.8 Java compiler
    when omitting the -source option.
    
    Remove the `obtain` method altogether and use the `safeAt` method
    directly instead.
    e3aa13fe
Name
Last commit
Last update
..
main/java/org/libvirt Loading commit data...
test Loading commit data...
.cvsignore Loading commit data...