Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    private static final String ANDROID_BASE_DIR = "androidBaseDir";

    private static void checkBaseDirValue(String baseDir) {
        if (baseDir.contains("/../")) {
            throw new IllegalArgumentException(ANDROID_BASE_DIR + " can't have \"..\" symbols");
        }

        if (baseDir.startsWith("../")) {
            throw new IllegalArgumentException(ANDROID_BASE_DIR + " can't starts with ..\" symbol");
        }

        if (baseDir.contains("/./")) {
            throw new IllegalArgumentException(ANDROID_BASE_DIR + " can't have \".\" symbols");
        }

        if (baseDir.contains("/./")) {
            throw new IllegalArgumentException(ANDROID_BASE_DIR + " can't have \".\" symbols");
        }
    }
}