<Swing Dev> [13] RFR: JDK-8219914: Change the environment variable for Java Access Bridge logging to have a directory.

Phil Race philip.race at oracle.com
Tue Mar 26 17:12:25 UTC 2019


Can we just call it JAVA_ACCESSBRIDGE_LOGDIR ? 
  filePath[envFilePathLength] = '/'; Is this right ? Does fopen on 
Windows expect this unix style separator ?
53 memcpy(filePath, envfilePath, envFilePathLength*sizeof(char));
56 memcpy(filePath + envFilePathLength + 1 + fileNameLength, ".log", 
4*sizeof(char)); Interesting that you feel it necessary to use 
sizeof(char) when clearly the whole logic, eg see :
50 auto filePathSize = envFilePathLength + 1 + fileNameLength + 5; //1 
for "/", 5 for ".log" and 0; assumes it is 1 ...   PrintDebugString("couldnot open file %s", filePath);

couldnot -> could not

-phil.

On 3/26/19 2:45 AM, Krishna Addepalli wrote:
>
> Hi Phil,
>
> Per our discussion, I have changed the JAVA_ACCESSBRIDGE_LOGFILE to 
> JAVA_ACCESSBRIDGE_LOGDIRECTORY to reflect that it accepts only a 
> directory value in the variable.
>
> I have also changed the code in AccessBridgeDebug.cpp appropriately.
>
> So, currently, the code will look for the environment variable, which 
> should contain path to the directory, and two log files namely 
> “java_access_bridge.log” and “windows_access_bridge.log” will be created.
>
> Link to the JDK Issue: https://bugs.openjdk.java.net/browse/JDK-8219914
>
> Here is the webrev: 
> http://cr.openjdk.java.net/~kaddepalli/8219914/webrev00/
>
> Thanks,
>
> Krishna
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/swing-dev/attachments/20190326/fbf6ee89/attachment.html>


More information about the swing-dev mailing list