Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-3205

Address compiler warnings when targeting Java 8

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 4.0.0
    • None
    • Build
    • None

    Description

      Now that we are targeting Java 8 source and target compatibility in the 4.x branch, some new generics-related compiler warnings are appearing during compilation. Examples include

      /Users/jeff/mongo-java-driver/driver-core/src/main/com/mongodb/operation/CommandOperationHelper.java:112: warning: [overloads] <T#1>executeWrappedCommandProtocol(ReadBinding,String,BsonDocument,CommandTransformer<BsonDocument,T#1>) in CommandOperationHelper is potentially ambiguous with <T#2>executeWrappedCommandProtocol(ReadBinding,String,BsonDocument,Decoder<T#2>) in CommandOperationHelper
          static <T> T executeWrappedCommandProtocol(final ReadBinding binding, final String database, final BsonDocument command,
       
      /Users/jeff/mongo-java-driver/driver-core/src/main/com/mongodb/client/model/Filters.java:163: warning: [unchecked] Possible heap pollution from parameterized vararg type TItem
          public static <TItem> Bson in(final String fieldName, final TItem... values)
       
      
      

      The purpose of this ticket is to address or suppress these warnings so they don't distract us from new problems.

      Attachments

        Activity

          People

            jeff.yemin@mongodb.com Jeffrey Yemin
            jeff.yemin@mongodb.com Jeffrey Yemin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: