[jira] [Updated] (NETBEANS-6192) Netbeans 11.0 very slow performance on RHEL 7

2021-11-10 Thread satendra gupta (Jira)


 [ 
https://issues.apache.org/jira/browse/NETBEANS-6192?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

satendra gupta updated NETBEANS-6192:
-
Issue Type: Task  (was: Improvement)

> Netbeans 11.0 very slow performance on RHEL 7
> -
>
> Key: NETBEANS-6192
> URL: https://issues.apache.org/jira/browse/NETBEANS-6192
> Project: NetBeans
>  Issue Type: Task
>Affects Versions: 11.0
>Reporter: satendra gupta
>Priority: Critical
>
> i recently migrated from RHEL6 to RHEL7 and i observe very slow performance 
> on RHEL7. i am using Netbeans 11.0 with JDK 8



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[jira] [Created] (NETBEANS-6193) Can't use attributes with interface constants and methods

2021-11-10 Thread Junichi Yamamoto (Jira)
Junichi Yamamoto created NETBEANS-6193:
--

 Summary: Can't use attributes with interface constants and methods
 Key: NETBEANS-6193
 URL: https://issues.apache.org/jira/browse/NETBEANS-6193
 Project: NetBeans
  Issue Type: Bug
  Components: php - Editor
Affects Versions: 12.5
Reporter: Junichi Yamamoto
Assignee: Junichi Yamamoto


The following code is valid. However, if we use attributes with interface 
constants and methods, syntax errors occur.

Example code:
{code:php}
getReflectionConstant('I_CONST'),
$refI->getMethod('method'),
$refI->getMethod('method')->getParameters()[0],
$refI->getMethod('method')->getParameters()[1],
];

foreach ($sourcesI as $r) {
$attr = $r->getAttributes();
var_dump(get_class($r), count($attr));

foreach ($attr as $a) {
var_dump($a->getName(), $a->getArguments());
}

echo "\n";
}{code}
Result:

string(15) "ReflectionClass"
int(1)
string(2) "I1"
array(0) {
}

string(23) "ReflectionClassConstant"
int(1)
string(2) "I2"
array(1) {
  [0]=>
  int(1)
}

string(16) "ReflectionMethod"
int(1)
string(2) "I3"
array(0) {
}

string(19) "ReflectionParameter"
int(1)
string(2) "I4"
array(0) {
}

string(19) "ReflectionParameter"
int(2)
string(2) "I5"
array(0) {
}
string(2) "I6"
array(1) {
  [0]=>
  string(4) "test"
}

Steps to reproduce:
 # Create a PHP project
 # Create a new file
 # Copy and paste the above example code



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[jira] [Created] (NETBEANS-6192) Netbeans 11.0 very slow performance on RHEL 7

2021-11-10 Thread satendra gupta (Jira)
satendra gupta created NETBEANS-6192:


 Summary: Netbeans 11.0 very slow performance on RHEL 7
 Key: NETBEANS-6192
 URL: https://issues.apache.org/jira/browse/NETBEANS-6192
 Project: NetBeans
  Issue Type: Improvement
Affects Versions: 11.0
Reporter: satendra gupta


i recently migrated from RHEL6 to RHEL7 and i observe very slow performance on 
RHEL7. i am using Netbeans 11.0 with JDK 8



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[jira] [Commented] (NETBEANS-6172) NetBeans screen scaling with Windows 10

2021-11-10 Thread Eirik Bakke (Jira)


[ 
https://issues.apache.org/jira/browse/NETBEANS-6172?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17441955#comment-17441955
 ] 

Eirik Bakke commented on NETBEANS-6172:
---

In that case the current behavior is as intended.

You should be able to do add a runtime parameter "-Dsun.java2d.uiScale=1" to 
get small fonts (works on my machine on both Java 9 and Java 16). Just make 
sure the parameter is actually passed.

> NetBeans screen scaling with Windows 10 
> 
>
> Key: NETBEANS-6172
> URL: https://issues.apache.org/jira/browse/NETBEANS-6172
> Project: NetBeans
>  Issue Type: Improvement
>  Components: javaee - Hibernate
>Affects Versions: 12.4
> Environment: Windows 10, NetBeans 12.0
>Reporter: Sergio García
>Assignee: Eirik Bakke
>Priority: Major
>  Labels: HiDPI
> Attachments: LoginScaled.png, LoginScaled_Real.png
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
>  
>  In the latest versions of Netbeans I have been able to verify that the 
> Netbeans IDE is rescaled according to the latent configuration in Windows 10 
> (dpi); this new behavior is fine and improves the development environment. 
> However it is also a problem as it also visually rescales the GUIs in the 
> debugging process; i'm using Maven to compile and execute the program.
>  In my case, having a GUI adapted to the real size of my monitor screen is 
> important. I have tried to solve this problem by parameterizing the java with 
> commands like "-Dsun.java2d.uiScale = 1.0" or by disabling the windows 
> rescaling option that exists in the "java.exe" and "javaw.exe" properties but 
> this does not work for NetBeans. It also doesn't work to change the Netbeans 
> setting with the parameter "-J-Dsun.java2d.dpiaware = true".
>   
>  *It would be interesting to have a clear and functional way to avoid 
> rescaling windows to facilitate the visual design of the GUIs.*



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[jira] [Created] (NETBEANS-6191) Netbeans Java Editor fails to recognize java.sql module types

2021-11-10 Thread k thurston ng (Jira)
k thurston ng created NETBEANS-6191:
---

 Summary: Netbeans Java Editor fails to recognize java.sql module 
types
 Key: NETBEANS-6191
 URL: https://issues.apache.org/jira/browse/NETBEANS-6191
 Project: NetBeans
  Issue Type: Bug
  Components: java - Editor
Affects Versions: 12.2
Reporter: k thurston ng
 Attachments: nebeans-platform-modules.png, netbeans-modules.png

*Product Version:* Apache NetBeans IDE 11.0 (Build 
incubator-netbeans-release-404-on-20190319)

*Java:* 11.0.2; OpenJDK 64-Bit Server VM 11.0.2+9-LTS

*Runtime:* OpenJDK Runtime Environment 11.0.2+9-LTS

*System:* Windows 10 version 10.0 running on amd64;

 

I'm using the "Java with Ant -> Java Class Library" project template

 

In the Java Editor, when trying to use any of the classes included in the 
java.sql module (e.g. java.sql.Connection, java.sql.DriverManager, etc.) - many 
of the features of the java editor don't work.

 

auto-completion when importing java.sql.Connection (not a big deal, I can just 
type it "manually"), but

if I Ctl-click on the import (to view source) - nothing happens

Similarly if I select the type and then go to view its JavaDoc in the JavaDoc 
window, it displays "JavaDoc not found"

 

Note: I can build the project no problem, I can run Junit 4 tests – no problem 
- so I'm fairly confident in my deduction that the ant scripts are not at 
issue, and clearly the run-time system is able to find, load, and verify the 
necessary types with no issue, so it's not as if my JDK image is at issue.

 

What I have noticed however, is that the java.sql module is not listed in the 
project window, libraries:

 

!netbeans-modules.png!

 

So is there a problem with the "platform" definition:

 

!nebeans-platform-modules.png!

 

Sure seems not to be, the platform manager window lists java.sql as expected.

 

I realize that these "problems" (the editor vis a vis the project-window) may 
be entirely unrelated.  But what I have noticed is that I only encounter this 
editor problem when it comes to types that are defined in modules that are 
*not* listed/displayed in the project window (the problem is not restricted to 
java.sql module, same goes for java.logging, and I'm sure many others).

 

This is a bit baffling; I used the jmod command line tool to look at the module 
definitions for java.sql and say java.xml and I don't see anything that would 
distinguish them and result in one (java.sql) being "unrecognized" and the 
other (java.xml) being recognized by the editor/project window

 

I saw in the netbeans.conf file that there are a lot --add-opens and 
--add-exports JVM parameters, and I tried to explicitly 
--add-modules=ALL-DEFAULT, but that had no effect.

 

Also, the sources for java.sql are in the same .zip file as for all the other 
sources, same for the javadoc - so it's not that the sources or javadoc are 
missing - the same src.zip work fine, again, for all the types included in the 
listed platform modules in the properties window.

 

I can only surmise that the netbeans code that, presumably using reflection, 
lists all the "system" modules (which is used to populate the 
property-window->Libraries) is somehow ignoring java.sql, java.logging, etc.  
Although, again, I don't really see on what basis it privileges some modules 
over others (and of course the same bug isn't afflicting the platform manager 
window as shown above)

 

P.S.  I've also encountered this exact same bug using Netbeans 12.2 and JDK-15 
on another computer - so it's not specific to either the JDK or Netbeans 
version; I also looked in the Netbeans log and couldn't find any message that 
seems to relate to this problem.

 

 

 

 

 

 

 

 

 



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[jira] [Commented] (NETBEANS-6179) Open Project dialog can take over 30 seconds to appear on Windows.

2021-11-10 Thread Neil C Smith (Jira)


[ 
https://issues.apache.org/jira/browse/NETBEANS-6179?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17441856#comment-17441856
 ] 

Neil C Smith commented on NETBEANS-6179:


Thanks for the confirmation. So not caused by JDK 17 changes there then! Need 
to figure out why Open File isn't affected by this then. You can find a lot of 
reports of this issue with the JDK in general.

> Open Project dialog can take over 30 seconds to appear on Windows.
> --
>
> Key: NETBEANS-6179
> URL: https://issues.apache.org/jira/browse/NETBEANS-6179
> Project: NetBeans
>  Issue Type: Bug
>  Components: ide - Performance
> Environment: Wndows10 Pro
> Java 17.0.1 (Zulu + JavaFX)
> NetBeans 12.6-rc2 (and earlier)
>Reporter: Scott Palmer
>Priority: Major
>  Labels: performance
> Attachments: NetBeans126_OpenProject.nps, NetBeans126_OpenProject2.nps
>
>
> On Windows systems with disconnected mapped network drives, the "Open 
> Project" dialog can take over 30 seconds to appear.  The "Open File" dialog 
> does not suffer from this issue.
> While attempts to actually access the unavailable network drives can 
> logically lead to timeouts, since the open Project dialog will initially be 
> browsing in folder unrelated to the disconnected drive letters, there is no 
> reason that they should be holding up the initialization of the dialog.
> VisualVM snapshot data collected while triggering and waiting for the Open 
> Project dialog is attached.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[jira] [Commented] (NETBEANS-6190) Scrolling method list disabled when JavaDoc visible

2021-11-10 Thread Neil C Smith (Jira)


[ 
https://issues.apache.org/jira/browse/NETBEANS-6190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17441844#comment-17441844
 ] 

Neil C Smith commented on NETBEANS-6190:


Is this problem specific to one Look and Feel?

> Scrolling method list disabled when JavaDoc visible
> ---
>
> Key: NETBEANS-6190
> URL: https://issues.apache.org/jira/browse/NETBEANS-6190
> Project: NetBeans
>  Issue Type: Bug
>Affects Versions: 12.5
> Environment: Netbeans 12.5 on Windows 10.
>Reporter: Maurits de Jong
>Priority: Major
> Attachments: netbeans-scrolling.gif
>
>
> Scrolling the method list stops working as soon as the JavaDoc window pops up.
> For example, when I type `new StringBuilder().` and then ctrl + space, then a 
> small window with StringBuilder's method and field list shows up. I am able 
> to use the scroll wheel of my mouse to scroll through the list, but then this 
> stops working as soon as the corresponding JavaDoc window is shown.
> I have added an attachment with a GIF in it which shows what's happening. 
> Here, after I do ctrl+space, the method list shows up, and then the Javadoc 
> for the first method of StringBuilder, which is accept(CharSequence), is 
> shown. Then I scroll all the way down, but nothing appears to happen. 
> However, when I click the last method of the list, which appears to be 
> chars() in my view, then still wait(long timeoutMillis, int nanos) is shown.
> It _looks_ like that there is a problem with the _drawing_ of the elements, 
> rather than with the scrolling itself.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[netbeans] branch delivery updated: [NETBEANS-6107] Use Gradle 7.3 Tooling API

2021-11-10 Thread neilcsmith
This is an automated email from the ASF dual-hosted git repository.

neilcsmith pushed a commit to branch delivery
in repository https://gitbox.apache.org/repos/asf/netbeans.git


The following commit(s) were added to refs/heads/delivery by this push:
 new e535cc4  [NETBEANS-6107] Use Gradle 7.3 Tooling API
 new 364a20b  Merge pull request #3313 from lkishalmi/NETBEANS-6107-2
e535cc4 is described below

commit e535cc4be6f96a025ab7e761e6126d95433fe697
Author: Laszlo Kishalmi 
AuthorDate: Wed Nov 10 00:19:40 2021 -0800

[NETBEANS-6107] Use Gradle 7.3 Tooling API
---
 extide/libs.gradle/external/binaries-list | 2 +-
 ...ng-api-7.3-rc-1-license.txt => gradle-tooling-api-7.3-license.txt} | 4 ++--
 ...ling-api-7.3-rc-1-notice.txt => gradle-tooling-api-7.3-notice.txt} | 0
 extide/libs.gradle/nbproject/project.properties   | 2 +-
 extide/libs.gradle/nbproject/project.xml  | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/extide/libs.gradle/external/binaries-list 
b/extide/libs.gradle/external/binaries-list
index 121211d..6b1f130 100644
--- a/extide/libs.gradle/external/binaries-list
+++ b/extide/libs.gradle/external/binaries-list
@@ -14,4 +14,4 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-B2123DF25C938DD072C7D07716629AABEF0ABD10 gradle-tooling-api-7.3-rc-1.jar
\ No newline at end of file
+526C85998C50C960237920A9D98580F35801525D gradle-tooling-api-7.3.jar
\ No newline at end of file
diff --git 
a/extide/libs.gradle/external/gradle-tooling-api-7.3-rc-1-license.txt 
b/extide/libs.gradle/external/gradle-tooling-api-7.3-license.txt
similarity index 99%
rename from extide/libs.gradle/external/gradle-tooling-api-7.3-rc-1-license.txt
rename to extide/libs.gradle/external/gradle-tooling-api-7.3-license.txt
index d6bae9d..d1d04e9 100644
--- a/extide/libs.gradle/external/gradle-tooling-api-7.3-rc-1-license.txt
+++ b/extide/libs.gradle/external/gradle-tooling-api-7.3-license.txt
@@ -1,7 +1,7 @@
 Name: Gradle Wrapper
 Description: Gradle Tooling API
-Version: 7.3-rc-1
-Files: gradle-tooling-api-7.3-rc-1.jar
+Version: 7.3
+Files: gradle-tooling-api-7.3.jar
 License: Apache-2.0
 Origin: Gradle Inc.
 URL: https://gradle.org/
diff --git a/extide/libs.gradle/external/gradle-tooling-api-7.3-rc-1-notice.txt 
b/extide/libs.gradle/external/gradle-tooling-api-7.3-notice.txt
similarity index 100%
rename from extide/libs.gradle/external/gradle-tooling-api-7.3-rc-1-notice.txt
rename to extide/libs.gradle/external/gradle-tooling-api-7.3-notice.txt
diff --git a/extide/libs.gradle/nbproject/project.properties 
b/extide/libs.gradle/nbproject/project.properties
index 17922b1..87d66a4 100644
--- a/extide/libs.gradle/nbproject/project.properties
+++ b/extide/libs.gradle/nbproject/project.properties
@@ -22,4 +22,4 @@ javac.compilerargs=-Xlint -Xlint:-serial
 # For more information, please see http://wiki.netbeans.org/SignatureTest
 sigtest.gen.fail.on.error=false
 
-release.external/gradle-tooling-api-7.3-rc-1.jar=modules/gradle/gradle-tooling-api.jar
+release.external/gradle-tooling-api-7.3.jar=modules/gradle/gradle-tooling-api.jar
diff --git a/extide/libs.gradle/nbproject/project.xml 
b/extide/libs.gradle/nbproject/project.xml
index ec8671c..05c2c38 100644
--- a/extide/libs.gradle/nbproject/project.xml
+++ b/extide/libs.gradle/nbproject/project.xml
@@ -39,7 +39,7 @@
 
 
 
gradle/gradle-tooling-api.jar
-
external/gradle-tooling-api-7.3-rc-1.jar
+
external/gradle-tooling-api-7.3.jar
 
 
 

-
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[jira] [Commented] (NETBEANS-3611) No library found for namespace http://omnifaces.org/ui

2021-11-10 Thread Nicola Isotta (Jira)


[ 
https://issues.apache.org/jira/browse/NETBEANS-3611?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17441799#comment-17441799
 ] 

Nicola Isotta commented on NETBEANS-3611:
-

As of NetBeans 12.5 the problem persists.

I had to downgrade to OminFaces 2.* to get rid of those annoying red badged.

> No library found for namespace http://omnifaces.org/ui
> --
>
> Key: NETBEANS-3611
> URL: https://issues.apache.org/jira/browse/NETBEANS-3611
> Project: NetBeans
>  Issue Type: Bug
>  Components: javaee - JSF
>Affects Versions: 11.1, 11.2
>Reporter: Ömer Faruk Kurt
>Priority: Major
> Attachments: 47298773-eab3a100-d618-11e8-849e-627e6507ee97.png
>
>
> With OmniFace 3.2 you get an error message in a facelet
> {{No library found for namespace http://omnifaces.org/ui}}
> With NetBeans 8.2 en 9.0 you can only have the 8.2 JEE plugins.
> You can actually make JSF2.3 work but adding OmniFaces to a facelet then 
> renders the error.
> I managed to get rid of the error by unpacking the omnifaces-3.2.jar to a 
> directory and add that directory to the libraries of the project and remove 
> the omnifaces-3.2.jar from the libraries.
> After that I changed the XML tag facelet-taglib to a signature as used in 
> mojarra_ext.taglib.xml of javax.faces-2.3.7.jar the error is going away from 
> the facelet.
> I saw a closed issue about a namespace not found in NetBeans 8.2 and I have 
> the same problem.
> [https://github.com/omnifaces/omnifaces/issues/442|https://github.com/omnifaces/omnifaces/issues/url]
> I think the NetBeans webproject is not able to see the new signature of the 
> omnifaces-ui.taglib.xml version 2.3.
> The NetBeans IDE is making a transition to Apache and until Feb. 2019 there 
> will not any renewal on the Jakarta EE plugins for NetBeans supporting JSF 2.3
> [https://cwiki.apache.org/confluence/display/NETBEANS/Apache+NetBeans+Release+Roadmap|https://github.com/omnifaces/omnifaces/issues/url]
> So what I did was to uncheck the package checkbox of the changed directory in 
> the library settings and in the web build/packaging to add the 
> omnifaces-3.2.jar.
> Actually I think it is a NetBeans problem but until feb. 2019 no updates on 
> Jakarta EE to expect from there.
> A picture of 2 projects, 1 with problem and the second with solved problem of 
> the index.xhtml



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[netbeans] branch delivery updated: Correct the parsing of String values in native image.

2021-11-10 Thread neilcsmith
This is an automated email from the ASF dual-hosted git repository.

neilcsmith pushed a commit to branch delivery
in repository https://gitbox.apache.org/repos/asf/netbeans.git


The following commit(s) were added to refs/heads/delivery by this push:
 new dde532f  Correct the parsing of String values in native image.
 new 178570c  Merge pull request #3311 from 
entlicher/NI_StringEncoding_delivery
dde532f is described below

commit dde532fd3535485ee189ba7661311bbb1cb670eb
Author: Martin Entlicher 
AuthorDate: Tue Nov 9 10:54:11 2021 +0100

Correct the parsing of String values in native image.
---
 .../debugger/displayer/JavaVariablesDisplayer.java | 65 +++---
 1 file changed, 58 insertions(+), 7 deletions(-)

diff --git 
a/java/java.nativeimage.debugger/src/org/netbeans/modules/java/nativeimage/debugger/displayer/JavaVariablesDisplayer.java
 
b/java/java.nativeimage.debugger/src/org/netbeans/modules/java/nativeimage/debugger/displayer/JavaVariablesDisplayer.java
index 191e2a9..5f7035e 100644
--- 
a/java/java.nativeimage.debugger/src/org/netbeans/modules/java/nativeimage/debugger/displayer/JavaVariablesDisplayer.java
+++ 
b/java/java.nativeimage.debugger/src/org/netbeans/modules/java/nativeimage/debugger/displayer/JavaVariablesDisplayer.java
@@ -47,6 +47,7 @@ public final class JavaVariablesDisplayer implements 
VariableDisplayer {
 private static final String COMPRESSED_REF_REFIX = "_z_.";
 private static final String PUBLIC = "public";
 private static final String STRING_VALUE = "value";
+private static final String STRING_CODER = "coder";
 private static final String HASH = "hash";
 private static final String UNSET = "";
 
@@ -240,6 +241,16 @@ public final class JavaVariablesDisplayer implements 
VariableDisplayer {
 return null;
 }
 
+private String readArray(NIVariable lengthVariable, int offset, int 
itemSize) {
+int length = Integer.parseInt(lengthVariable.getValue());
+String expressionPath = lengthVariable.getExpressionPath();
+if (expressionPath != null && !expressionPath.isEmpty()) {
+String addressExpr = "&" + expressionPath;
+return debugger.readMemory(addressExpr, 4 + offset, length * 
itemSize); // length has 4 bytes
+}
+return null;
+}
+
 private static NIVariable[] getObjectChildren(NIVariable[] children, int 
from, int to) {
 for (int i = 0; i < children.length; i++) {
 if (HUB.equals(children[i].getName())) {
@@ -290,16 +301,37 @@ public final class JavaVariablesDisplayer implements 
VariableDisplayer {
 @Override
 public String getValue() {
 NIVariable pub = getVarsByName(var.getChildren()).get(PUBLIC);
-Map arrayInfo = 
getVarsByName(getVarsByName(pub.getChildren()).get(STRING_VALUE).getChildren());
+Map varChildren = 
getVarsByName(pub.getChildren());
+Map arrayInfo = 
getVarsByName(varChildren.get(STRING_VALUE).getChildren());
 arrayInfo = getVarsByName(arrayInfo.get(PUBLIC).getChildren());
 NIVariable arrayVariable = arrayInfo.get(ARRAY);
 NIVariable lengthVariable = arrayInfo.get(ARRAY_LENGTH);
-String hexArray = readArray(lengthVariable, 2);
+int length = Integer.parseInt(lengthVariable.getValue());
+NIVariable coderVar = varChildren.get(STRING_CODER);
+int coder = -1;
+if (coderVar != null) {
+String coderStr = coderVar.getValue();
+int space = coderStr.indexOf(' ');
+if (space > 0) {
+coderStr = coderStr.substring(0, space);
+}
+try {
+coder = Integer.parseInt(coderStr);
+} catch (NumberFormatException ex) {
+}
+}
+String hexArray = readArray(lengthVariable, coder == -1 ? 4 : 0, 
2);
 if (hexArray != null) {
-return parseUTF16(hexArray);
+switch (coder) {
+case 0: // Compressed String on JDK 9+
+return parseLatin1(hexArray, length);
+case 1: // UTF-16 String on JDK 9+
+return parseUTF16(hexArray, length/2);
+default: // UTF-16 String on JDK 8
+return parseUTF16(hexArray, length);
+}
 } else { // legacy code
 String arrayExpression = getArrayExpression(arrayVariable);
-int length = Integer.parseInt(lengthVariable.getValue());
 char[] characters = new char[length];
 try {
 for (int i = 0; i < length; i++) {
@@ -313,10 +345,9 @@ public final class JavaVariablesDisplayer implements 
VariableDisplayer {
 }
 }
 
-private String parseUTF16(String hexArray) {
-CharsetDecoder cd

[netbeans] branch delivery updated: Fix of NPE in TruffleAccess.

2021-11-10 Thread neilcsmith
This is an automated email from the ASF dual-hosted git repository.

neilcsmith pushed a commit to branch delivery
in repository https://gitbox.apache.org/repos/asf/netbeans.git


The following commit(s) were added to refs/heads/delivery by this push:
 new 516f21b  Fix of NPE in TruffleAccess.
 new 0c613d1  Merge pull request #3312 from 
entlicher/TruffleAccessNPE_delivery
516f21b is described below

commit 516f21ba3f1085371d80d571fa9fa4ef437950b8
Author: Martin Entlicher 
AuthorDate: Tue Nov 9 11:04:53 2021 +0100

Fix of NPE in TruffleAccess.
---
 .../netbeans/modules/debugger/jpda/truffle/access/TruffleAccess.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git 
a/java/debugger.jpda.truffle/src/org/netbeans/modules/debugger/jpda/truffle/access/TruffleAccess.java
 
b/java/debugger.jpda.truffle/src/org/netbeans/modules/debugger/jpda/truffle/access/TruffleAccess.java
index 7730a71..c45511e 100644
--- 
a/java/debugger.jpda.truffle/src/org/netbeans/modules/debugger/jpda/truffle/access/TruffleAccess.java
+++ 
b/java/debugger.jpda.truffle/src/org/netbeans/modules/debugger/jpda/truffle/access/TruffleAccess.java
@@ -457,10 +457,11 @@ public class TruffleAccess implements 
JPDABreakpointListener {
 private static HitBreakpointInfo[] getBreakpointInfos(ExecutionHaltedInfo 
haltedInfo, JPDAThread thread) {
 ObjectVariable[] breakpointsHit = haltedInfo.breakpointsHit;
 ObjectVariable[] breakpointConditionExceptions = 
haltedInfo.breakpointConditionExceptions;
-int n = breakpointsHit.length;
+int n = (breakpointsHit != null) ? breakpointsHit.length : 0;
 HitBreakpointInfo[] breakpointInfos = null;
 for (int i = 0; i < n; i++) {
-HitBreakpointInfo breakpointInfo = 
HitBreakpointInfo.create(breakpointsHit[i], breakpointConditionExceptions[i]);
+ObjectVariable exception = (breakpointConditionExceptions != null) 
? breakpointConditionExceptions[i] : null;
+HitBreakpointInfo breakpointInfo = 
HitBreakpointInfo.create(breakpointsHit[i], exception);
 if (breakpointInfo != null) {
 if (breakpointInfos == null) {
 breakpointInfos = new HitBreakpointInfo[] { breakpointInfo 
};

-
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists