Looks fine.
Thank you for the contribution! I'll sponsor the fix.

On 09/07/2019 23:25, Andrey Turbanov wrote:
Take a look to the text in the patch below, it looks like a Gmail wrap the long lines in 
the plain text email(see the place of "#")
Ok. One more try.
https://bugs.openjdk.java.net/browse/JDK-6573239



Index: src/demo/share/jfc/SwingSet2/TreeDemo.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/demo/share/jfc/SwingSet2/TreeDemo.java (revision 
79c5d568f33ce59eafe6e29ad8f0d86ed2e72c90)
+++ src/demo/share/jfc/SwingSet2/TreeDemo.java (date 1562011731697)
@@ -1,6 +1,6 @@
  /*
   *
- * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
@@ -74,7 +74,7 @@

      public JScrollPane createTree() {
          DefaultMutableTreeNode top = new 
DefaultMutableTreeNode(getString("TreeDemo.music"));
-        DefaultMutableTreeNode catagory = null ;
+        DefaultMutableTreeNode category = null;
          DefaultMutableTreeNode artist = null;
          DefaultMutableTreeNode record = null;

@@ -94,12 +94,12 @@
                  char linetype = line.charAt(0);
                  switch(linetype) {
                     case 'C':
-                     catagory = new DefaultMutableTreeNode(line.substring(2));
-                     top.add(catagory);
+                     category = new DefaultMutableTreeNode(line.substring(2));
+                     top.add(category);
                       break;
                     case 'A':
-                     if(catagory != null) {
-                         catagory.add(artist = new 
DefaultMutableTreeNode(line.substring(2)));
+                     if(category != null) {
+                         category.add(artist = new 
DefaultMutableTreeNode(line.substring(2)));
                       }
                       break;
                     case 'R':
Index: 
test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/tree/resources/tree.txt
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- 
test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/tree/resources/tree.txt
 (revision 79c5d568f33ce59eafe6e29ad8f0d86ed2e72c90)
+++ 
test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/tree/resources/tree.txt
 (date 1562011731723)
@@ -8,7 +8,7 @@
  # A = Artist    / Composer                                                    
 #
  # R = Record    / Style                                                       
 #
  # S = Song Name / Composition                                                 
 #
-# C = Catagory                                                                 
#
+# C = Category                                                                 
#
  #                                                                             
 #
  
################################################################################
  C Classical
Index: src/demo/share/jfc/SwingSet2/resources/tree.txt
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/demo/share/jfc/SwingSet2/resources/tree.txt (revision 
79c5d568f33ce59eafe6e29ad8f0d86ed2e72c90)
+++ src/demo/share/jfc/SwingSet2/resources/tree.txt (date 1562011731698)
@@ -8,7 +8,7 @@
  # A = Artist    / Composer                                                    
 #
  # R = Record    / Style                                                       
 #
  # S = Song Name / Composition                                                 
 #
-# C = Catagory                                                                 
#
+# C = Category                                                                 
#
  #                                                                             
 #
  
################################################################################
  C Classical
Index: 
test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/tree/TreeDemo.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- 
test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/tree/TreeDemo.java
 (revision 79c5d568f33ce59eafe6e29ad8f0d86ed2e72c90)
+++ 
test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/tree/TreeDemo.java
 (date 1562011731722)
@@ -1,5 +1,5 @@
  /*
- * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved.
   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   *
   * This code is free software; you can redistribute it and/or modify it
@@ -83,7 +83,7 @@

      private JTree createTree() {
          DefaultMutableTreeNode top = new 
DefaultMutableTreeNode(resourceManager.getString("TreeDemo.music"));
-        DefaultMutableTreeNode catagory = null;
+        DefaultMutableTreeNode category = null;
          DefaultMutableTreeNode artist = null;
          DefaultMutableTreeNode record = null;

@@ -103,12 +103,12 @@
                  char linetype = line.charAt(0);
                  switch (linetype) {
                      case 'C':
-                        catagory = new 
DefaultMutableTreeNode(line.substring(2));
-                        top.add(catagory);
+                        category = new 
DefaultMutableTreeNode(line.substring(2));
+                        top.add(category);
                          break;
                      case 'A':
-                        if (catagory != null) {
-                            catagory.add(artist = new 
DefaultMutableTreeNode(line.substring(2)));
+                        if (category != null) {
+                            category.add(artist = new 
DefaultMutableTreeNode(line.substring(2)));
                          }
                          break;
                      case 'R':



--
Best regards, Sergey.

Reply via email to