Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    private static String safeInstanceIdFolderName(String instanceId) {
        if (instanceId != null && instanceId.length() != 0) {
            String instanceFolder = instanceId.replaceAll("(\\p{P}|\\p{Z})", "_");
            return instanceFolder;
        } else {
            throw new IllegalArgumentException("getInstanceFolder: instanceId is null or the empty string!");
        }
    }
}