java-and-jvm
  • Simone

    Simone

    04/04/2022, 4:56 PM
    anyone know how can i convert this java code to coldfusion
    private static Data getdata(String url) {
    
            if (url != null) {
    
                String path = null;
                try {
                    path = new URL(url).getPath().substring(1);
                } catch (MalformedURLException e) {
                    e.printStackTrace();
                }
    
                if (path != null) {
    
                    if (path.indexOf('/') == -1) {
                        return getData(url, "User");
                    } else {
                        if (path.contains("music")) {
                            return getData(url, "Music");
                        } else if (path.contains("video")) {
                            return getData(url, "Video");
                        } else if (path.contains("tag")) {
                            return getData(url, "Tag");
                        }
                    }
                }
            }
    
            return null;
        }
  • c

    cfsimplicity

    08/11/2022, 10:05 AM
    Anyone got any insight into why ACF won't allow the Excel Streaming Reader java lib's
    builder().open()
    method to be called? https://github.com/cfsimplicity/spreadsheet-cfml/issues/297
  • salted

    salted

    10/16/2022, 4:01 AM
    Has anyone used java 17 with cf 2018?
  • salted

    salted

    10/16/2022, 4:02 AM
    The latest update for 2018 recommends the latest lts java and technically 11 is the latest compatible
  • salted

    salted

    10/16/2022, 4:03 AM
    But it's easier to bump a java version than a cf one as there's no cost involved for that
  • b

    bdw429s

    11/03/2022, 7:53 PM
    I'm trying to test something right now with nested/inner classes and I'm wracking my brains trying to think of a part of the JDK that uses inner classes. Does anyone know of an example off the top of your head?
  • b

    bdw429s

    11/03/2022, 7:53 PM
    I Googled and just found 38 thousand guides on how to write my own inner classes 🙄
  • b

    bdw429s

    11/03/2022, 7:56 PM
    As example of what I mean would be
    java.lang.ProcessHandleImpl$Info
    except that class appears to only exist on JDK 11+ and I need this test to run on Java 8 at the moment
  • b

    bdw429s

    11/03/2022, 8:09 PM
    Meh, I've wasted enough time on this. Here's the ticket-- feel free to comment if you have any ideashttps://luceeserver.atlassian.net/browse/LDEV-4259
  • m

    mtbrown

    11/03/2022, 10:46 PM
    Most of the JDK inner classes I know of are
    private
    . I'm not sure if that matters. But some of the Collections API appears to have a non-private inner class for a
    Spliterator
    . They're
    static
    , so not sure if that matters either. For example,
    java.util.ArrayList
    has one called
    ArrayListSpliterator
    .