Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8090061

[WebView] replace "char*" with "const char*" where appropriate

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 9
    • 9
    • javafx
    • None
    • web

    Backports

      Description

        In web/src/main/native/Source/WebCore/platform/java/api/BackForwardListJava.cpp, in the methods:

        static jmethodID initMethod(JNIEnv* env, jclass cls, char* name, char* signature)
        static jmethodID initCtor(JNIEnv*, jclass cls, char* sugnature)

        The pointers to char should be made const. Otherwise, this may cause compilation errors with VS 2012 when "/Zc:strictStrings" is set (which should not be done by default though):

        ..\..\..\..\src\main\native\Source\WebCore\platform\java\api\BackForwardListJava.cpp(46) : error C2664: 'jmethodID initMethod(JNIEnv *,jclass,char *,char *)' : cannot convert argument 3 from 'const char [7]' to 'char *'
        17:37:19.861 [QUIET] [system.out] Conversion from string literal loses const qualifier (see /Zc:strictStrings)
        17:37:19.863 [QUIET] [system.out] ..\..\..\..\src\main\native\Source\WebCore\platform\java\api\BackForwardListJava.cpp(75) : error C2664: 'jmethodID initCtor(JNIEnv *,jclass,char *)' : cannot convert argument 3 from 'const char [6]' to 'char *'
        17:37:19.863 [QUIET] [system.out] Conversion from string literal loses const qualifier (see /Zc:strictStrings)
        17:37:19.863 [QUIET] [system.out] ..\..\..\..\src\main\native\Source\WebCore\platform\java\api\BackForwardListJava.cpp(87) : error C2664: 'jmethodID initMethod(JNIEnv *,jclass,char *,char *)' : cannot convert argument 3 from 'const char [18]' to 'char *'
        17:37:19.863 [QUIET] [system.out] Conversion from string literal loses const qualifier (see /Zc:strictStrings)
        17:37:19.864 [QUIET] [system.out] ..\..\..\..\src\main\native\Source\WebCore\platform\java\api\BackForwardListJava.cpp(98) : error C2664: 'jmethodID initMethod(JNIEnv *,jclass,char *,char *)' : cannot convert argument 3 from 'const char [20]' to 'char *'
        17:37:19.864 [QUIET] [system.out] Conversion from string literal loses const qualifier (see /Zc:strictStrings)
        17:37:19.866 [QUIET] [system.out] ..\..\..\..\src\main\native\Source\WebCore\platform\java\api\BackForwardListJava.cpp(311) : error C2664: 'jmethodID initMethod(JNIEnv *,jclass,char *,char *)' : cannot convert argument 3 from 'const char [14]' to 'char *'
        17:37:19.866 [QUIET] [system.out] Conversion from string literal loses const qualifier (see /Zc:strictStrings)

        Attachments

          Issue Links

            Activity

              People

                mbilla Murali Billa
                ant Anton Tarasov (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported: